|
|
@@ -1,272 +1,99 @@
|
|
|
<template>
|
|
|
|
|
|
<view>
|
|
|
- <view class="title_box rx-bc">
|
|
|
- <view class="name">最小包装单元</view>
|
|
|
-
|
|
|
- <view class="btn_box rx-bc" @click="handCancelPacking">
|
|
|
- 重置打包
|
|
|
- </view>
|
|
|
+ <view class="col userInp " style="display: flex; align-items: center;">
|
|
|
+ <text class="label lable150 rx-cc">规格选择:</text>
|
|
|
+ <!-- multiple -->
|
|
|
+ <zxz-uni-data-select :localdata="localdataList" v-model="Usertype"
|
|
|
+ @change="changeUserType"></zxz-uni-data-select>
|
|
|
</view>
|
|
|
|
|
|
- <view class="material ">
|
|
|
-
|
|
|
- <view class="content_table">
|
|
|
- <view class="item">
|
|
|
- <view class="lable rx-cc">包装总数 </view>
|
|
|
- <view class="content content_num">
|
|
|
- <input class="uni-input" v-model="formedNumLast" type='digit'></input>
|
|
|
- <view class="unit">{{ objData.unit }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="item rx-sc">
|
|
|
- <view class="rx ww55 ">
|
|
|
- <view class="lable lable150 rx-cc ">最小包装单元</view>
|
|
|
- <view class="content content_num">
|
|
|
- <input class="uni-input" v-model="quantity"></input>
|
|
|
-
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="rx ww45">
|
|
|
- <view class="rx-cc ww80">
|
|
|
- <view style="max-width: 100rpx; font-size: 24rpx;">{{ objData.unit }}</view>/
|
|
|
- </view>
|
|
|
- <view class="content rx-sc">
|
|
|
- <zxz-uni-data-select :localdata="unitList" v-model="unit" dataValue='Key' format='{Value}'
|
|
|
- dataKey="Key" filterable :clear='false'></zxz-uni-data-select>
|
|
|
-
|
|
|
- <view class="penalize" @click="handleSplit">确认</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
|
|
|
+ <view v-for="(item, i) in DispositionList" :key="i">
|
|
|
+ <view class="title_box rx-bc">
|
|
|
+ <!-- 最小包装单元 -->
|
|
|
+ <view class="name">{{ item.titel }}</view>
|
|
|
|
|
|
- <view class="content_table2" v-if='splitList.length'>
|
|
|
- <view class="head row rx-sc">
|
|
|
- <view class="item ww10">序号</view>
|
|
|
- <view class="item ww30">数量</view>
|
|
|
- <view class="item ww50">条码</view>
|
|
|
- <view class="item ww10 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
|
|
|
- <view class="item ww10" v-if="clientEnvironmentId == 3"></view>
|
|
|
- </view>
|
|
|
- <view class="table">
|
|
|
- <u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
|
|
|
- <view class="tr row rx-sc" v-for="(it, idx) in splitList" :key='idx'>
|
|
|
- <view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
|
|
|
- <view class="item ww30 content_num rx-sc">
|
|
|
- <input class="uni-input" v-model="it.quantity" type="digit"></input>
|
|
|
- <view style="width: 260rpx; font-size: 22rpx;"> {{ objData.unit }}/ {{ it.unit }}</view>
|
|
|
- </view>
|
|
|
- <view class="item ww50">
|
|
|
- {{ it.code }}
|
|
|
- </view>
|
|
|
- <view class="item ww10 rx-cc" v-if="!it.parentId" @click="handleCheck(idx, it)">
|
|
|
- <image class="check" v-if='it.check == 1' src='@/static/check.png'>
|
|
|
- </image>
|
|
|
- <image class="check" v-if='it.check == 0 || it.check == null'
|
|
|
- src='@/static/check_no.png'>
|
|
|
- </image>
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- </u-list>
|
|
|
+ <view class="btn_box rx-bc" @click="handCancelPacking">
|
|
|
+ 重置打包
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="material ">
|
|
|
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="title_box rx-bc">
|
|
|
- <view class="name">内包装</view>
|
|
|
-
|
|
|
- <view class="btn_box rx-bc" @click="handCancelPacking">
|
|
|
- 重置打包
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="material ">
|
|
|
-
|
|
|
- <view class="content_table">
|
|
|
- <view class="item">
|
|
|
- <view class="lable rx-cc">包装总数 </view>
|
|
|
- <view class="content content_num">
|
|
|
- <input class="uni-input" v-model="formedNumLast" type='digit'></input>
|
|
|
- <view class="unit">{{ objData.unit }}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="item rx-sc">
|
|
|
- <view class="rx ww55 ">
|
|
|
- <view class="lable lable150 rx-cc ">内包装单元</view>
|
|
|
+ <view class="content_table">
|
|
|
+ <view class="item">
|
|
|
+ <view class="lable rx-cc">包装总数 </view>
|
|
|
<view class="content content_num">
|
|
|
- <input class="uni-input" v-model="quantity"></input>
|
|
|
-
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <input class="uni-input" v-model="item.formedNumLast" type="number" :disabled="i != 0"
|
|
|
+ @input="changeinput"></input>
|
|
|
|
|
|
- <view class="rx ww45">
|
|
|
- <view class="rx-cc ww80">
|
|
|
- <view style="max-width: 100rpx; font-size: 24rpx;">{{ objData.unit }}</view>/
|
|
|
- </view>
|
|
|
- <view class="content rx-sc">
|
|
|
- <zxz-uni-data-select :localdata="unitList" v-model="unit" dataValue='Key' format='{Value}'
|
|
|
- dataKey="Key" filterable :clear='false'></zxz-uni-data-select>
|
|
|
+ <view class="unit">{{ item.packageUnit }}</view>
|
|
|
|
|
|
- <view class="penalize" @click="handleSplit">确认</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <view class="content_table2" v-if='splitList.length'>
|
|
|
- <view class="head row rx-sc">
|
|
|
- <view class="item ww10">序号</view>
|
|
|
- <view class="item ww30">数量</view>
|
|
|
- <view class="item ww50">条码</view>
|
|
|
- <view class="item ww10 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
|
|
|
- <view class="item ww10" v-if="clientEnvironmentId == 3"></view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="table">
|
|
|
- <u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
|
|
|
- <view class="tr row rx-sc" v-for="(it, idx) in splitList" :key='idx'>
|
|
|
- <view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
|
|
|
- <view class="item ww30 content_num rx-sc">
|
|
|
- <input class="uni-input" v-model="it.quantity" type="digit"></input>
|
|
|
- <view style="width: 260rpx; font-size: 22rpx;"> {{ objData.unit }}/ {{ it.unit }}</view>
|
|
|
- </view>
|
|
|
- <view class="item ww50">
|
|
|
- {{ it.code }}
|
|
|
- </view>
|
|
|
- <view class="item ww10 rx-cc" v-if="!it.parentId" @click="handleCheck(idx, it)">
|
|
|
- <image class="check" v-if='it.check == 1' src='@/static/check.png'>
|
|
|
- </image>
|
|
|
- <image class="check" v-if='it.check == 0 || it.check == null'
|
|
|
- src='@/static/check_no.png'>
|
|
|
- </image>
|
|
|
+ <view class="item rx-sc">
|
|
|
+ <view class="rx ww55 ">
|
|
|
+ <view class="lable lable150 rx-cc ">{{ item.titel }}单元</view>
|
|
|
+ <view class="content content_num">
|
|
|
+ <input class="uni-input" v-model="item.packageCell" disabled></input>
|
|
|
+ <view style="max-width: 100rpx; font-size: 24rpx;">{{ item.packageUnit }}</view>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
|
|
|
- </u-list>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="material ">
|
|
|
-
|
|
|
- <view class="title_box rx-bc">
|
|
|
- <view class="name">外包装</view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
- <view class="content_table2" v-if='temporaryList.length'>
|
|
|
- <view class="head row rx-sc">
|
|
|
- <view class="item ww10">序号</view>
|
|
|
- <view class="item ww30">数量</view>
|
|
|
- <view class="item ww50">条码</view>
|
|
|
- <view class="item ww10"></view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="table">
|
|
|
-
|
|
|
- <view class="tr row rx-sc" v-for="(it, idx) in temporaryList" :key='idx'>
|
|
|
- <view class="item ww10 rx-cc ">{{ idx + 1 }}</view>
|
|
|
- <view class="item ww30 content_num rx-sc">
|
|
|
- <input class="uni-input" v-model="it.quantity" disabled type="digit"></input>
|
|
|
- <view style="width: 260rpx; font-size: 22rpx;"> {{ objData.unit }}/ {{ it.unit }}</view>
|
|
|
- </view>
|
|
|
- <view class="item ww50">
|
|
|
- {{ it.code }}
|
|
|
- </view>
|
|
|
- <view class="item ww10 rx-cc">
|
|
|
- <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"
|
|
|
- @click="handclose(it)"></uni-icons>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="tr row rx-sc">
|
|
|
- <view class="item ww10 rx-cc ">合并</view>
|
|
|
- <view class="item ww90 rx-sc">
|
|
|
- 总共{{ temporaryCount }} {{ objData.unit }} / {{ this.temporaryNum }} {{ unit }}
|
|
|
- --打包成 1
|
|
|
- <zxz-uni-data-select :localdata="unitList" v-model="packUnit" dataValue='Key'
|
|
|
- format='{Value}' dataKey="Key" :clear='false'></zxz-uni-data-select>
|
|
|
+ <view class="rx ww45">
|
|
|
+ <view class="rx-cc ww80">
|
|
|
+ /<view style="max-width: 100rpx; font-size: 24rpx;">{{ item.conversionUnit }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="content rx-sc">
|
|
|
|
|
|
- <view class="penalize" @click="handlePack">打包</view>
|
|
|
+ <!-- <zxz-uni-data-select :localdata="unitList" v-model="unit" dataValue='Key'
|
|
|
+ format='{Value}' dataKey="Key" filterable :clear='false'></zxz-uni-data-select> -->
|
|
|
|
|
|
+ <!-- <view class="penalize" @click="handleSplit">确认</view> -->
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <!-- 外包装 列表-->
|
|
|
- <view class="content_table2" v-if='packTwoList.length > 0'>
|
|
|
- <view class="head row rx-sc">
|
|
|
- <view class="item ww10">序号</view>
|
|
|
- <view class="item ww30">数量</view>
|
|
|
-
|
|
|
- <view class="item ww50">条码</view>
|
|
|
- <view class="item ww10"></view>
|
|
|
- </view>
|
|
|
|
|
|
- <view class="table">
|
|
|
- <view class="tr row rx-sc " v-for="(it, idx) in packTwoList" :key='idx'>
|
|
|
- <view class="item ww10 rx-cc ">{{ idx + 1 }}</view>
|
|
|
- <view class="item ww30 content_num rx-sc">
|
|
|
- {{ it.quantity }} {{ objData.unit }} / {{ it.unit }}
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item ww50">
|
|
|
- {{ it.code }}
|
|
|
- </view>
|
|
|
- <view class="item ww10 rx-cc">
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
+ <view class="content_table2" v-if='item.splitList.length'>
|
|
|
+ <view class="head row rx-sc">
|
|
|
+ <view class="item ww10">序号</view>
|
|
|
+ <view class="item ww30">数量</view>
|
|
|
+ <view class="item ww50">条码</view>
|
|
|
+ <!-- <view class="item ww10 jsColor" @click="calculation()" v-if="clientEnvironmentId != 3">计算</view>
|
|
|
+ <view class="item ww10" v-if="clientEnvironmentId == 3"></view> -->
|
|
|
</view>
|
|
|
+ <view class="table">
|
|
|
+ <u-list @scrolltolower="scrolltolower" class="z_list" style="height: 100% !important;">
|
|
|
+ <view class="tr row rx-sc" v-for="(it, idx) in item.splitList" :key='idx'>
|
|
|
+ <view class="item ww10 rx-cc ">{{ it.computeSize }}</view>
|
|
|
+ <view class="item ww30 content_num rx-sc">
|
|
|
+ <input class="uni-input" v-model="it.quantity" type="digit"></input>
|
|
|
+ <view style="width: 260rpx; font-size: 22rpx;"> {{ it.unit }}/{{
|
|
|
+ item.conversionUnit }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="item ww50">
|
|
|
+ {{ it.code }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
-
|
|
|
+ </u-list>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<SearchPopup mode="center" v-if='show'>
|
|
|
<template v-slot:list>
|
|
|
<view class="search_list">
|
|
|
@@ -349,11 +176,11 @@ export default {
|
|
|
|
|
|
quantity: '',
|
|
|
unit: '',
|
|
|
-
|
|
|
+ Usertype: "",// 规格
|
|
|
unitList: [],
|
|
|
|
|
|
splitList: [],
|
|
|
-
|
|
|
+ localdataList: [],
|
|
|
|
|
|
|
|
|
packUnit: null,
|
|
|
@@ -361,7 +188,8 @@ export default {
|
|
|
temporaryCount: 0,
|
|
|
temporaryList: [],
|
|
|
packTwoList: [],
|
|
|
- newCategoryId:'',
|
|
|
+ DispositionList: [],
|
|
|
+ newCategoryId: '',
|
|
|
|
|
|
show: false,
|
|
|
formData: {
|
|
|
@@ -371,33 +199,137 @@ export default {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
- watch:{
|
|
|
- categoryId:{
|
|
|
- handler(newVal){
|
|
|
- console.log(newVal,'newVal');
|
|
|
+ watch: {
|
|
|
+ categoryId: {
|
|
|
+ handler(newVal) {
|
|
|
+ console.log(newVal, 'newVal');
|
|
|
this.newCategoryId = newVal;
|
|
|
},
|
|
|
- deep:true,
|
|
|
- immediate:true
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
},
|
|
|
-
|
|
|
+ objData: {
|
|
|
+ handler(newVal) {
|
|
|
+ this.formedNumLast = newVal.formedNumLast;
|
|
|
+ console.log(this.formedNumLast );
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.formedNumLast = this.objData.formedNumLast
|
|
|
+ // this.formedNumLast = this.objData.formedNumLast;
|
|
|
|
|
|
- this.byCode(),
|
|
|
- this.packageDispositionFn();
|
|
|
- this.getPackingDetails()
|
|
|
- this.getPackingDetailsTwo()
|
|
|
+ this.byCode();
|
|
|
+
|
|
|
+ this.packageDispositionFn();
|
|
|
+ // this.getPackingDetails()
|
|
|
+ // this.getPackingDetailsTwo()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ // 输入数量变化
|
|
|
+ changeinput(e){
|
|
|
+ console.log(e);
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ changeUserType(e) {
|
|
|
+
|
|
|
+ this.listFn(e.arr);
|
|
|
+ },
|
|
|
+ groupBy(arr, key) {
|
|
|
+ return arr.reduce((acc, obj) => {
|
|
|
+ const groupKey = obj[key];
|
|
|
+ if (!acc[groupKey]) {
|
|
|
+ acc[groupKey] = [];
|
|
|
+ }
|
|
|
+ console.log();
|
|
|
+ acc[groupKey].push(obj);
|
|
|
+ return acc;
|
|
|
+ }, {});
|
|
|
+ },
|
|
|
+
|
|
|
async packageDispositionFn() {
|
|
|
- const res = await packageDisposition(this.newCategoryId)
|
|
|
- console.log(res, '1111111');
|
|
|
+ let that = this;
|
|
|
+ const res = await packageDisposition(this.newCategoryId);
|
|
|
+
|
|
|
+ if (res.length) {
|
|
|
+ res.shift();
|
|
|
+ let data = JSON.parse(JSON.stringify(res));
|
|
|
+ let list = this.groupBy(data, 'code');
|
|
|
+ Object.entries(list).forEach(([key, value]) => {
|
|
|
+ let obj = {
|
|
|
+ text: value[0].name,
|
|
|
+ arr: value,
|
|
|
+ value: key
|
|
|
+ }
|
|
|
+ this.localdataList.push(obj);
|
|
|
+ });
|
|
|
+
|
|
|
+ this.Usertype = this.localdataList[0].value;
|
|
|
+ this.listFn(this.localdataList[0].arr);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
|
|
|
|
|
|
+ listFn(arr) {
|
|
|
+ let obj = {
|
|
|
+ withinQuantity: "",
|
|
|
+ withinUnit: '',
|
|
|
+ outsideQuantity: '',
|
|
|
+ outsideUnit: ''
|
|
|
+ }
|
|
|
+ let textList = ['最小包装', '内包装', '外包装'];
|
|
|
+ arr.map(async (v, i) => {
|
|
|
+ v.splitList = [];
|
|
|
+ v.titel = textList[i];
|
|
|
+ if (i === 0) {
|
|
|
+ v.formedNumLast = this.formedNumLast;
|
|
|
+ v.splitList = await this.handleSplit(v)||[];
|
|
|
+ // this.$nextTick(c () => {
|
|
|
+
|
|
|
+ // })
|
|
|
+ }
|
|
|
+
|
|
|
+ if (i === 1) {
|
|
|
+ obj.withinQuantity = v.packageCell;
|
|
|
+ obj.withinUnit = v.conversionUnit
|
|
|
+ }
|
|
|
+ if (i === 2) {
|
|
|
+ obj.outsideQuantity = v.packageCell;
|
|
|
+ obj.outsideUnit = v.conversionUnit;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$set(this,'DispositionList',arr)
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ sunNum(v, i) {
|
|
|
+ let _this = this;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ switch (i) {
|
|
|
+ case 0:
|
|
|
+ console.log(_this.formedNumLast);
|
|
|
+ return _this.formedNumLast;
|
|
|
+ case 1:
|
|
|
+ return v.splitList.length || 0
|
|
|
+ case 2:
|
|
|
+
|
|
|
+ return v.splitList.length || 0
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
byCode() {
|
|
|
getByCode('packing_unit').then(res => {
|
|
|
|
|
|
@@ -459,9 +391,8 @@ export default {
|
|
|
|
|
|
},
|
|
|
|
|
|
-
|
|
|
- handleSplit() {
|
|
|
-
|
|
|
+ // 第一次调用
|
|
|
+ handleSplit(v) {
|
|
|
if (this.splitList.length) {
|
|
|
uni.showToast({
|
|
|
title: '产品已分包',
|
|
|
@@ -470,9 +401,7 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- if (!this.formedNumLast) {
|
|
|
+ if (!v.formedNumLast) {
|
|
|
uni.showToast({
|
|
|
title: '包装总数数量不能为空',
|
|
|
icon: 'none'
|
|
|
@@ -480,7 +409,7 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- if (!this.quantity) {
|
|
|
+ if (!v.packageCell) {
|
|
|
uni.showToast({
|
|
|
title: '内包装单元数量不能为空',
|
|
|
icon: 'none'
|
|
|
@@ -488,7 +417,7 @@ export default {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- if (!this.unit) {
|
|
|
+ if (!v.packageUnit) {
|
|
|
uni.showToast({
|
|
|
title: '请选择包装单位',
|
|
|
icon: 'none'
|
|
|
@@ -497,26 +426,31 @@ export default {
|
|
|
}
|
|
|
|
|
|
let param = {
|
|
|
- totalQuantity: this.formedNumLast,
|
|
|
- quantity: this.quantity,
|
|
|
- unit: this.unit,
|
|
|
+ totalQuantity: v.formedNumLast,
|
|
|
+ quantity: v.packageCell,
|
|
|
+ unit: v.packageUnit,
|
|
|
+ packageUnit: v.conversionUnit,
|
|
|
workOrderId: this.workOrderId,
|
|
|
taskId: this.taskId,
|
|
|
tier: 1
|
|
|
}
|
|
|
- packingReport(param).then(res => {
|
|
|
- this.splitList = res.map(m => {
|
|
|
|
|
|
- return {
|
|
|
- check: false,
|
|
|
- ...m
|
|
|
- }
|
|
|
- })
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ packingReport(param).then(res => {
|
|
|
+ this.splitList = res.map(m => {
|
|
|
|
|
|
- this.getPackingDetails()
|
|
|
+ return {
|
|
|
+ check: false,
|
|
|
+ ...m
|
|
|
+ }
|
|
|
+ })
|
|
|
+ resolve(this.splitList)
|
|
|
+ // this.getPackingDetails()
|
|
|
+ })
|
|
|
})
|
|
|
|
|
|
|
|
|
+
|
|
|
},
|
|
|
|
|
|
handleCheck(idx, it) {
|
|
|
@@ -568,44 +502,50 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- getPackingDetailsTwo() {
|
|
|
+ getPackingDetailsTwo(v) {
|
|
|
+ console.log(v);
|
|
|
let param = {
|
|
|
- totalQuantity: this.formedNumLast,
|
|
|
- quantity: this.quantity,
|
|
|
- unit: this.unit,
|
|
|
+ totalQuantity: v.formedNumLast,
|
|
|
+ quantity: v.packageCell,
|
|
|
+ unit: v.conversionUnit,
|
|
|
workOrderId: this.workOrderId,
|
|
|
taskId: this.taskId,
|
|
|
tier: 2,
|
|
|
|
|
|
}
|
|
|
+
|
|
|
getPackingReportRepeat(param).then(res => {
|
|
|
- this.packTwoList = res.detailList
|
|
|
+ resolve(res.detailList)
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
|
|
|
- handlePack() {
|
|
|
+ handlePack(v, s) {
|
|
|
let _arr = []
|
|
|
- _arr = this.temporaryList.map(m => {
|
|
|
+ _arr = s.map(m => {
|
|
|
return {
|
|
|
...m,
|
|
|
isChecked: 1
|
|
|
}
|
|
|
})
|
|
|
+ console.log(_arr, '123');
|
|
|
|
|
|
let param = {
|
|
|
detailList: _arr,
|
|
|
- quantity: this.temporaryCount,
|
|
|
- totalQuantity: this.formedNumLast,
|
|
|
- unit: this.packUnit,
|
|
|
+ quantity: v.temporaryCount,
|
|
|
+ totalQuantity: v.formedNumLast,
|
|
|
+ unit: v.packageUnit,
|
|
|
taskId: this.taskId,
|
|
|
workOrderId: this.workOrderId,
|
|
|
tier: 2
|
|
|
}
|
|
|
-
|
|
|
- packingReportRepeat(param).then(res => {
|
|
|
- this.temporaryList = []
|
|
|
- this.getPackingDetails()
|
|
|
- this.getPackingDetailsTwo()
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ packingReportRepeat(param).then(res => {
|
|
|
+ console.log(res);
|
|
|
+ // this.temporaryList = []
|
|
|
+ this.getPackingDetails()
|
|
|
+ // this.getPackingDetailsTwo()
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
|
|
|
@@ -888,7 +828,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+.label {
|
|
|
+ display: flex;
|
|
|
+ height: 70rpx;
|
|
|
+ width: 86px !important;
|
|
|
+ font-size: 13px;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ background-color: #F7F9FA;
|
|
|
+}
|
|
|
|
|
|
|
|
|
.content_num {
|