|
|
@@ -1,129 +1,151 @@
|
|
|
<template>
|
|
|
- <div
|
|
|
- v-if="
|
|
|
- (!objData.isUnpack && objData.isUnpack != 0) || objData.isUnpack == '1'
|
|
|
- "
|
|
|
- >
|
|
|
+ <div>
|
|
|
<div class="col userInp" style="display: flex; align-items: center">
|
|
|
<div class="label lable150 rx-cc" style="width: 100px !important"
|
|
|
- >规格选择:</div
|
|
|
+ >是否拆包:</div
|
|
|
>
|
|
|
- <el-select
|
|
|
- v-model="Usertype"
|
|
|
- placeholder="请选择"
|
|
|
- @change="changeUserType"
|
|
|
+ <span
|
|
|
+ v-if="objData.isUnpack == '1'"
|
|
|
+ style="
|
|
|
+ color: green;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-left: 15px;
|
|
|
+ "
|
|
|
+ >是</span
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in localdataList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.text"
|
|
|
- :value="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <div class="label lable150 rx-cc" style="width: 100px !important"
|
|
|
- >包装选择:</div
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="warehouseId"
|
|
|
- placeholder="请选择"
|
|
|
- @change="changeWarehouseType"
|
|
|
- disabled
|
|
|
+ <span
|
|
|
+ v-else
|
|
|
+ style="
|
|
|
+ color: green;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-left: 15px;
|
|
|
+ "
|
|
|
+ >否</span
|
|
|
>
|
|
|
- <el-option
|
|
|
- v-for="item in warehouseSpecTypeList"
|
|
|
- :key="item.value"
|
|
|
- :label="item.text"
|
|
|
- :value="item.value"
|
|
|
+ </div>
|
|
|
+ <div v-if="objData.isUnpack == '1'">
|
|
|
+ <div class="col userInp" style="display: flex; align-items: center">
|
|
|
+ <div class="label lable150 rx-cc" style="width: 100px !important"
|
|
|
+ >规格选择:</div
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="Usertype"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="changeUserType"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in localdataList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.text"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <div class="label lable150 rx-cc" style="width: 100px !important"
|
|
|
+ >包装选择:</div
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <!-- multiple -->
|
|
|
- <!-- <zxz-uni-data-select :localdata="localdataList" v-model="Usertype"
|
|
|
+ <el-select
|
|
|
+ v-model="warehouseId"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="changeWarehouseType"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in warehouseSpecTypeList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.textValue"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- multiple -->
|
|
|
+ <!-- <zxz-uni-data-select :localdata="localdataList" v-model="Usertype"
|
|
|
@change="changeUserType"></zxz-uni-data-select> -->
|
|
|
- </div>
|
|
|
- <div v-if="warehouseId != 1">
|
|
|
- <div v-for="(item, i) in DispositionList" :key="i">
|
|
|
- <div class="title_box rx-bc mt6">
|
|
|
- <div class="name">{{ item.titel }}</div>
|
|
|
-
|
|
|
- <div class="rx-bc"> </div>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="warehouseId != 1">
|
|
|
+ <div v-for="(item, i) in DispositionList" :key="i">
|
|
|
+ <div class="title_box rx-bc mt6">
|
|
|
+ <div class="name">{{ item.titel }}</div>
|
|
|
|
|
|
- <div>
|
|
|
- <div class="material">
|
|
|
- <div class="content_table">
|
|
|
- <div class="item">
|
|
|
- <div class="lable rx-cc">包装总数 </div>
|
|
|
- <div class="content content_num">
|
|
|
- <el-input
|
|
|
- class="uni-el-input"
|
|
|
- v-model="formedNumLast"
|
|
|
- type="number"
|
|
|
- v-if="i == 0"
|
|
|
- @input="changeinput"
|
|
|
- disabled
|
|
|
- style="width: 200px"
|
|
|
- ></el-input>
|
|
|
- <el-input
|
|
|
- class="uni-el-input"
|
|
|
- v-model="item.formedNumLast"
|
|
|
- type="number"
|
|
|
- v-else
|
|
|
- disabled
|
|
|
- style="width: 200px"
|
|
|
- ></el-input>
|
|
|
- <div class="unit">{{ item.packageUnit }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="rx-bc"> </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="item rx-sc">
|
|
|
- <div class="rx ww55">
|
|
|
- <div class="lable lable200 rx-cc">{{ item.titel }}单元</div>
|
|
|
+ <div>
|
|
|
+ <div class="material">
|
|
|
+ <div class="content_table">
|
|
|
+ <div class="item">
|
|
|
+ <div class="lable rx-cc">包装总数 </div>
|
|
|
<div class="content content_num">
|
|
|
<el-input
|
|
|
class="uni-el-input"
|
|
|
- v-model="item.packageCell"
|
|
|
+ v-model="formedNumLast"
|
|
|
+ type="number"
|
|
|
+ v-if="i == 0"
|
|
|
+ @input="changeinput"
|
|
|
+ disabled
|
|
|
+ style="width: 200px"
|
|
|
+ ></el-input>
|
|
|
+ <el-input
|
|
|
+ class="uni-el-input"
|
|
|
+ v-model="item.formedNumLast"
|
|
|
+ type="number"
|
|
|
+ v-else
|
|
|
disabled
|
|
|
style="width: 200px"
|
|
|
></el-input>
|
|
|
- <div class="unit">{{ item.packageUnit }}</div
|
|
|
- >/<div class="unit">{{ item.conversionUnit }}</div>
|
|
|
+ <div class="unit">{{ item.packageUnit }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
|
|
|
- <div v-if="item.splitList.length">
|
|
|
- <ele-pro-table
|
|
|
- ref="table"
|
|
|
- :needPage="false"
|
|
|
- :columns="columnsMin"
|
|
|
- :datasource="item.splitList"
|
|
|
- class="time-form"
|
|
|
- max-height="400"
|
|
|
- row-key="index"
|
|
|
- >
|
|
|
- <template v-slot:newWeight="{ row, $index }">
|
|
|
- <span
|
|
|
- >{{ row.extInfo.newWeight
|
|
|
- }}{{ row.extInfo.weightUnit }}</span
|
|
|
- >
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:reportWeight="{ row, $index }">
|
|
|
- <span
|
|
|
- >{{ row.extInfo.reportWeight
|
|
|
- }}{{ row.extInfo.weightUnit }}</span
|
|
|
- >
|
|
|
- </template>
|
|
|
- </ele-pro-table>
|
|
|
+ <div class="item rx-sc">
|
|
|
+ <div class="rx ww55">
|
|
|
+ <div class="lable lable200 rx-cc">{{ item.titel }}单元</div>
|
|
|
+ <div class="content content_num">
|
|
|
+ <el-input
|
|
|
+ class="uni-el-input"
|
|
|
+ v-model="item.packageCell"
|
|
|
+ disabled
|
|
|
+ style="width: 200px"
|
|
|
+ ></el-input>
|
|
|
+ <div class="unit">{{ item.packageUnit }}</div
|
|
|
+ >/<div class="unit">{{ item.conversionUnit }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <!-- <template v-slot:newWeight="{ row, $index }">
|
|
|
+ <div v-if="item.splitList.length">
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :needPage="false"
|
|
|
+ :columns="columnsMin"
|
|
|
+ :datasource="item.splitList"
|
|
|
+ class="time-form"
|
|
|
+ max-height="400"
|
|
|
+ row-key="index"
|
|
|
+ >
|
|
|
+ <template v-slot:newWeight="{ row, $index }">
|
|
|
+ <span
|
|
|
+ >{{ row.extInfo.newWeight
|
|
|
+ }}{{ row.extInfo.weightUnit }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template v-slot:reportWeight="{ row, $index }">
|
|
|
+ <span
|
|
|
+ >{{ row.extInfo.reportWeight
|
|
|
+ }}{{ row.extInfo.weightUnit }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+
|
|
|
+ <!-- <template v-slot:newWeight="{ row, $index }">
|
|
|
<span>{{ row.extInfo.newWeight }}</span
|
|
|
>{{ row.extInfo.weightUnit }}
|
|
|
</template> -->
|
|
|
- <!-- <el-table :data="item.splitList" style="width: 100%">
|
|
|
+ <!-- <el-table :data="item.splitList" style="width: 100%">
|
|
|
<el-table-column prop="computeSize" label="序号" width="65">
|
|
|
<template v-slot="{ row, $index }">
|
|
|
{{ $index + 1 }}
|
|
|
@@ -134,11 +156,11 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="code" label="条码"> </el-table-column>
|
|
|
</el-table> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <!-- <SearchPopup mode="center" v-if='show'>
|
|
|
+ <!-- <SearchPopup mode="center" v-if='show'>
|
|
|
<template v-slot:list>
|
|
|
<div class="search_list">
|
|
|
|
|
|
@@ -173,6 +195,7 @@
|
|
|
</template>
|
|
|
|
|
|
</SearchPopup> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -257,19 +280,23 @@
|
|
|
warehouseSpecTypeList: [
|
|
|
{
|
|
|
text: '按计量',
|
|
|
- value: 1
|
|
|
+ value: 1,
|
|
|
+ textValue: '按计量'
|
|
|
},
|
|
|
{
|
|
|
text: '最小包装',
|
|
|
- value: 2
|
|
|
+ value: 2,
|
|
|
+ textValue: ''
|
|
|
},
|
|
|
{
|
|
|
text: '内包装',
|
|
|
- value: 3
|
|
|
+ value: 3,
|
|
|
+ textValue: ''
|
|
|
},
|
|
|
{
|
|
|
text: '外包装',
|
|
|
- value: 4
|
|
|
+ value: 4,
|
|
|
+ textValue: ''
|
|
|
}
|
|
|
],
|
|
|
cacheKeyUrlMin: 'cacheKeyUrlMin'
|
|
|
@@ -298,10 +325,7 @@
|
|
|
this.formedNumLast = 0;
|
|
|
}
|
|
|
console.log(newVal);
|
|
|
- if (
|
|
|
- (!newVal.isUnpack && newVal.isUnpack != 0) ||
|
|
|
- newVal.isUnpack == '1'
|
|
|
- ) {
|
|
|
+ if (newVal.isUnpack == '1') {
|
|
|
this.packageDispositionFn();
|
|
|
}
|
|
|
},
|
|
|
@@ -372,7 +396,7 @@
|
|
|
? '半成品'
|
|
|
: row.rootCategoryLevelId == 9
|
|
|
? '产品'
|
|
|
- : item.rootCategoryLevelId == 28
|
|
|
+ : row.rootCategoryLevelId == 28
|
|
|
? '废品'
|
|
|
: '';
|
|
|
}
|
|
|
@@ -612,11 +636,66 @@
|
|
|
}
|
|
|
this.selectList = res;
|
|
|
|
|
|
+ this.warehouseSpecTypeList.forEach((item) => {
|
|
|
+ if (item.value == 2) {
|
|
|
+ // const num = res[0].packageCell ? res[0].packageCell : '';
|
|
|
+ // const packageUnit = res[0].packageUnit ? res[0].packageUnit : '';
|
|
|
+ // const conversionUnit = res[0].conversionUnit
|
|
|
+ // ? res[0].conversionUnit
|
|
|
+ // : '';
|
|
|
+ // let packInfo = '';
|
|
|
+ // if (num) {
|
|
|
+ // packInfo = num + '/' + packageUnit + '/' + conversionUnit;
|
|
|
+ // }
|
|
|
+ item.textValue = item.text + `(${this.selectPackInfo(res[0])})`;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.value == 3) {
|
|
|
+ // const num = res[1].packageCell ? res[1].packageCell : '';
|
|
|
+ // const packageUnit = res[1].packageUnit ? res[1].packageUnit : '';
|
|
|
+ // const conversionUnit = res[1].conversionUnit
|
|
|
+ // ? res[1].conversionUnit
|
|
|
+ // : '';
|
|
|
+ // let packInfo = '';
|
|
|
+ // if (num) {
|
|
|
+ // packInfo = num + '/' + packageUnit + '/' + conversionUnit;
|
|
|
+ // }
|
|
|
+ item.textValue = item.text + `(${this.selectPackInfo(res[1])})`;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.value == 4) {
|
|
|
+ // const num = res[2].packageCell ? res[2].packageCell : '';
|
|
|
+ // const packageUnit = res[2].packageUnit ? res[2].packageUnit : '';
|
|
|
+ // const conversionUnit = res[2].conversionUnit
|
|
|
+ // ? res[2].conversionUnit
|
|
|
+ // : '';
|
|
|
+ // let packInfo = '';
|
|
|
+ // if (num) {
|
|
|
+ // packInfo = num + '/' + packageUnit + '/' + conversionUnit;
|
|
|
+ // }
|
|
|
+ item.textValue = item.text + `(${this.selectPackInfo(res[2])})`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ // console.log(res[0], res[1], res[2], '555555554444444');
|
|
|
+
|
|
|
this.initFn(this.localdataList[0].arr);
|
|
|
// this.listFn(this.localdataList[0].arr);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ selectPackInfo(data) {
|
|
|
+ const num = data.packageCell ? data.packageCell : '';
|
|
|
+ const packageUnit = data.packageUnit ? data.packageUnit : '';
|
|
|
+ const conversionUnit = data.conversionUnit ? data.conversionUnit : '';
|
|
|
+ let packInfo = '';
|
|
|
+ if (num) {
|
|
|
+ packInfo = num + '/' + packageUnit + '/' + conversionUnit;
|
|
|
+ }
|
|
|
+
|
|
|
+ return packInfo;
|
|
|
+ },
|
|
|
+
|
|
|
initFn(v) {
|
|
|
if (v.length) {
|
|
|
this.withinQuantity = v[1].packageCell; //内包装数量
|
|
|
@@ -892,13 +971,17 @@
|
|
|
specValue: this.value,
|
|
|
minimumPackage: this.minimumPackage, // 最小包装
|
|
|
tier: this.warehouseId,
|
|
|
+ isUnpack: this.objData.isUnpack,
|
|
|
+ packUnitInfo: this.warehouseSpecTypeList[1].textValue,
|
|
|
minimumPackageCell: this.DispositionList[0].packageCell, // 最小包装
|
|
|
minimumPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
|
|
|
minimumConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
|
|
|
minimumFormedNumLast: this.DispositionList[0].formedNumLast // 总包装数量
|
|
|
};
|
|
|
} else {
|
|
|
- packInfo = {};
|
|
|
+ packInfo = {
|
|
|
+ isUnpack: this.objData.isUnpack
|
|
|
+ };
|
|
|
}
|
|
|
} else if (this.warehouseId == 3) {
|
|
|
if (this.DispositionList && this.DispositionList.length != 0) {
|
|
|
@@ -907,13 +990,17 @@
|
|
|
specValue: this.value,
|
|
|
withinPackage: this.withinPackage, // 内包装
|
|
|
tier: this.warehouseId,
|
|
|
+ isUnpack: this.objData.isUnpack,
|
|
|
+ packUnitInfo: this.warehouseSpecTypeList[2].textValue,
|
|
|
withinPackageCell: this.DispositionList[0].packageCell, // 最小包装名称
|
|
|
withinPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
|
|
|
withinConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
|
|
|
withinFormedNumLast: this.DispositionList[0].formedNumLast // 总包装数量
|
|
|
};
|
|
|
} else {
|
|
|
- packInfo = {};
|
|
|
+ packInfo = {
|
|
|
+ isUnpack: this.objData.isUnpack
|
|
|
+ };
|
|
|
}
|
|
|
} else if (this.warehouseId == 4) {
|
|
|
if (this.DispositionList && this.DispositionList.length != 0) {
|
|
|
@@ -922,13 +1009,17 @@
|
|
|
specValue: this.value,
|
|
|
outsidePackage: this.outsidePackage, //外包装
|
|
|
tier: this.warehouseId,
|
|
|
+ isUnpack: this.objData.isUnpack,
|
|
|
+ packUnitInfo: this.warehouseSpecTypeList[3].textValue,
|
|
|
outsidePackageCell: this.DispositionList[0].packageCell, // 最小包装名称
|
|
|
outsidePackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
|
|
|
outsideConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
|
|
|
outsideFormedNumLast: this.DispositionList[0].formedNumLast
|
|
|
}; // 总包装数量
|
|
|
} else {
|
|
|
- packInfo = {};
|
|
|
+ packInfo = {
|
|
|
+ isUnpack: this.objData.isUnpack
|
|
|
+ };
|
|
|
}
|
|
|
}
|
|
|
|