mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
调拨流程手机端开发完成
This commit is contained in:
parent
320bbabd16
commit
93fc2808fc
@ -518,6 +518,34 @@ export function saveResourceEnter(_that,_data){
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 调拨提交
|
||||
* @param {Object} _that 上下文对象
|
||||
* @param {Object} _data 请求报文
|
||||
*/
|
||||
export function allocationStoreEnter(_that,_data){
|
||||
return new Promise(function(reslove,reject){
|
||||
_that.context.post({
|
||||
url: url.allocationStoreEnter,
|
||||
data:_data,
|
||||
success: function(res) {
|
||||
reslove(res.data);
|
||||
},
|
||||
fail: function(e) {
|
||||
_that.onoff = true;
|
||||
wx.showToast({
|
||||
title: "服务器异常了",
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改采购
|
||||
* @param {Object} _that 上下文对象
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
},
|
||||
_openEditPurchaseModel:function(_item){
|
||||
uni.navigateTo({
|
||||
url:'/pages/resource/editPurchaseApply?applyId=' + _item.applyOrderId + '&resOrderType=' + _item.resOrderType
|
||||
url:'/pages/resource/editPurchaseApply?applyId=' + _item.applyId + '&resOrderType=' + _item.resOrderType
|
||||
})
|
||||
},
|
||||
/**
|
||||
@ -100,7 +100,7 @@
|
||||
*/
|
||||
_distributionOrder: function(item){
|
||||
uni.navigateTo({
|
||||
url:'/pages/resource/itemOutDo?applyId=' + item.applyOrderId + '&resOrderType=' + item.resOrderType + '&taskId=' + item.taskId
|
||||
url:'/pages/resource/allocationEnterDo?applyId=' + item.applyId + '&taskId=' + item.taskId
|
||||
})
|
||||
},
|
||||
_undoAudit:function(_purchaseApply){
|
||||
|
||||
@ -202,4 +202,6 @@ export default {
|
||||
listVisit: baseUrl+"app/visit.listVisits",
|
||||
auditUndoVisit: baseUrl+"app/visit.auditUndoVisit",
|
||||
queryUndoCount: baseUrl+"callComponent/undo/list",
|
||||
allocationStoreEnter: baseUrl+"app/resourceStore.allocationStoreEnter",
|
||||
|
||||
}
|
||||
|
||||
@ -649,6 +649,15 @@
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/resource/allocationEnterDo",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "调拨",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "white",
|
||||
|
||||
168
pages/resource/allocationEnterDo.vue
Normal file
168
pages/resource/allocationEnterDo.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<view class="select-single-resource">
|
||||
<view class="margin-top">
|
||||
|
||||
<view class="resource-header flex justify-between bg-white">
|
||||
<view class="text-bold">调拨物品</view>
|
||||
<view>
|
||||
</view>
|
||||
</view>
|
||||
<view class=" ">
|
||||
<view class="resource-item bg-white" v-for="(item,index) in resourceStores" :key="index">
|
||||
<view class=" " style="">
|
||||
<view class=" flex-around">
|
||||
<label class="text-df">物品:</label>
|
||||
<text class="ellip text-df">{{item.resName}}-{{item.rstName}}</text>
|
||||
</view>
|
||||
<view class=" flex-around">
|
||||
<label class="text-df">库存:</label>
|
||||
<text class="text-df">{{item.originalStock}}</text>
|
||||
</view>
|
||||
<view class=" flex-around">
|
||||
<label class="text-df">原仓库:</label>
|
||||
<text class="text-df">{{item.shaName}}</text>
|
||||
</view>
|
||||
<view class=" flex-around">
|
||||
<label class="text-df">目标仓库:</label>
|
||||
<text class="text-df">{{item.shzName}}</text>
|
||||
</view>
|
||||
<view class=" flex-around">
|
||||
<label class="text-df">调拨数量:</label>
|
||||
<text class="text-df">{{item.stock}}</text>
|
||||
</view>
|
||||
|
||||
<view class=" flex-around">
|
||||
<label class="text-df">实际数量:</label>
|
||||
<input class=" text-right" type="number" v-model="item.quantity" placeholder="请输入数量"
|
||||
placeholder-class="text-grey text-df" value="" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="margin-top text-right">
|
||||
<button class="cu-btn bg-blue round" @tap="save()">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listAllocationStorehouses,
|
||||
allocationStoreEnter,
|
||||
saveMyAuditOrders
|
||||
} from '../../api/resource/resource.js'
|
||||
// 防止多次点击
|
||||
import {
|
||||
preventClick
|
||||
} from '../../lib/java110/utils/common.js';
|
||||
import Vue from 'vue'
|
||||
Vue.prototype.$preventClick = preventClick;
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
onoff: true,
|
||||
itemEnterOrderInfo: '',
|
||||
applyId: '',
|
||||
taskId: '',
|
||||
resourceStores: [],
|
||||
}
|
||||
},
|
||||
|
||||
onLoad: function(options) {
|
||||
this.java110Context.onLoad();
|
||||
this.applyId = options.applyId;
|
||||
this.taskId = options.taskId;
|
||||
this._loadAllocationResources();
|
||||
},
|
||||
|
||||
onShow: function() {},
|
||||
|
||||
methods: {
|
||||
|
||||
_loadAllocationResources: function() {
|
||||
let _that = this;
|
||||
let _objData = {
|
||||
page: 1,
|
||||
row: 100,
|
||||
applyId: this.applyId,
|
||||
};
|
||||
listAllocationStorehouses(this, _objData)
|
||||
.then(function(res) {
|
||||
_that.resourceStores = res.data
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
save: function() {
|
||||
let _that = this;
|
||||
let msg = '';
|
||||
|
||||
this.resourceStores.forEach(function(item) {
|
||||
if (!item.hasOwnProperty("quantity") || !item.quantity || parseInt(item.quantity) < 0) {
|
||||
msg = '数量未填写';
|
||||
return;
|
||||
}
|
||||
item.quantity = parseInt(item.quantity);
|
||||
});
|
||||
if (msg != '') {
|
||||
vc.toast(msg);
|
||||
uni.showToast({
|
||||
title: msg,
|
||||
icon: 'none'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let _data = {
|
||||
applyId: this.applyId,
|
||||
taskId: this.taskId,
|
||||
resourceStores: this.resourceStores,
|
||||
communityId:this.getCommunityId()
|
||||
}
|
||||
allocationStoreEnter(this, _data)
|
||||
.then(function(res) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
if (res.code == 0) {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.item-remove {
|
||||
border-radius: 15rpx;
|
||||
padding: 2rpx 10rpx;
|
||||
}
|
||||
|
||||
.resource-header {
|
||||
margin-top: 30upx;
|
||||
padding: 20upx
|
||||
}
|
||||
|
||||
.resource-item {
|
||||
margin-top: 2upx;
|
||||
padding: 20upx;
|
||||
|
||||
.flex-around {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 15upx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user