Commit 2bdbf0b1 by LJM

供应链wms-理货确认-产地拆分多选

parent 1f6030f0
......@@ -11,6 +11,14 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-jianshao:before {
content: "\e8c5";
}
.icon-xinzeng-:before {
content: "\e678";
}
.icon-a-10cangkucangchu3:before {
content: "\e7a0";
}
......
......@@ -42,13 +42,19 @@
<text class="text-prompt">KG</text>
</view>
</view>
<navigator class="box row bothSide verCenter" :url="'/pages/tallyGoods/originSplit?erp_order_sn=' + form.erp_order_sn" hover-class="none">
<text class="label">产地拆分(选填)</text>
<view class="input-wrap-width row bothSide verCenter">
<text class="text">{{ form.detail_json.length > 0 ? '已拆分' + form.detail_json.length : '请选择' }}</text>
<text class="iconfont icon-sanjiaoxing2"></text>
</view>
</navigator>
<view style="border-bottom: 1px solid #e6edf0;">
<navigator class="box row bothSide verCenter" :url="'/pages/tallyGoods/originSplit?erp_order_sn=' + form.erp_order_sn+'&originIndex='+index" hover-class="none" v-for="(item,index) in form.detail_json" :key="index">
<view class="row verCenter">
<text class="label">产地拆分{{index+1}}(选填)</text>
<text class="iconfont icon-xinzeng-" style="color: #197adb;font-size: 44rpx;" @click.stop="add" v-if="index === form.detail_json.length - 1"></text>
<text class="iconfont icon-jianshao" style="color: #197adb;font-size: 46rpx;" @click.stop="reduce(index)" v-if="index != 0"></text>
</view>
<view class="input-wrap-width row bothSide verCenter">
<text class="text">{{ form.detail_json[index].length > 0 ? '已拆分' + form.detail_json[index].length : '请选择' }}</text>
<text class="iconfont icon-sanjiaoxing2"></text>
</view>
</navigator>
</view>
<navigator class="box row bothSide verCenter" :url="'/pages/tallyGoods/manualMerge?erp_order_sn=' + form.erp_order_sn + '&fix_erp_order_sn=' + form.fix_erp_order_sn" hover-class="none">
<text class="label">手动合箱(选填)</text>
<view class="input-wrap-width row verCenter">
......@@ -132,14 +138,19 @@
maxNum: 4, //最大上传图片数量
disabled: false,
switchFlag: false,
paramsOrigin: [
[]
], //产地拆分数据存储
form: {
erp_order_sn: '', //入仓号
erp_order_sn: 'B51590', //入仓号
customs_clearance_price: 0, //清关费
box_num: '0', //箱子
board_num: '0', //板子
gross_weight: '', //合计毛重
pic_json: [], //商检图片
detail_json: [], //产地拆分数据
detail_json: [
[]
], //产地拆分数据
fix_erp_order_sn: '', //手动合箱
pur_pic: '' //采购单上传
}
......@@ -170,9 +181,11 @@
//更新产地拆分国家的数据
uni.$on('updateOriginData', data => {
if (data) {
this.form.detail_json = data.detail_json;
let originIndex = Number(data.originIndex); //转成数字
this.$set(this.form.detail_json, originIndex, data.detail_json);
this.$set(this.paramsOrigin, originIndex, data);
uni.removeStorageSync('paramsOrigin');
uni.setStorageSync('paramsOrigin', data);
uni.setStorageSync('paramsOrigin', this.paramsOrigin);
}
});
},
......@@ -210,6 +223,20 @@
}, 800);
},
/**
* 产地拆分-新增
*/
add() {
this.form.detail_json.push([]);
this.paramsOrigin.push([]);
},
/**
* 产地拆分-减去
*/
reduce(index) {
this.form.detail_json.splice(index, 1);
this.paramsOrigin.splice(index, 1);
},
/**
* 检测入仓号是否理货
*/
checkErpOrderSnIsTally() {
......@@ -456,6 +483,10 @@
this.currentIndex = index;
this.form.customs_clearance_price = index;
},
checkEntryID(detail_json) {
const firstEntryID = detail_json[0][0].entryID;
return detail_json.every(item => item[0].entryID === firstEntryID);
},
/**
* @param {Object} type 1提交并打印
* 提交
......@@ -518,6 +549,17 @@
}
}
const entryIDs = this.form.detail_json.map(array => (array.length > 0 ? array[0].entryID : null));
let result = new Set(entryIDs).size < entryIDs.length;
if (result) {
uni.showModal({
content: '产地拆分所选型号有重复,请检查',
showCancel: false
});
return false;
}
this.request(API.submitTallyGoods, 'POST', this.form, true).then(res => {
if (res.err_code === 0) {
uni.showModal({
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment