|
|
@@ -4,7 +4,17 @@
|
|
|
<view class="col userInp" style="display: flex; align-items: center">
|
|
|
<text class="label lable150 rx-cc">是否拆包</text>
|
|
|
<text
|
|
|
- v-if="objData.isUnpack == '1' || isNewUnpack == 1"
|
|
|
+ v-if="objData.isUnpack == '1' && objData.singleReport == '1'"
|
|
|
+ style="
|
|
|
+ color: green;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 700;
|
|
|
+ margin-left: 15px;
|
|
|
+ "
|
|
|
+ >是</text
|
|
|
+ >
|
|
|
+ <text
|
|
|
+ v-else-if="isNewUnpack == '1' && objData.singleReport == '0'"
|
|
|
style="
|
|
|
color: green;
|
|
|
font-size: 14px;
|
|
|
@@ -30,13 +40,19 @@
|
|
|
type="primary"
|
|
|
style="margin-left: 40px; width: 80px"
|
|
|
@click="checkUnpack"
|
|
|
- v-if="objData.isUnpack != '1'"
|
|
|
+ v-if="objData.singleReport == '0'"
|
|
|
>手动拆包</u-button
|
|
|
>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <view v-if="objData.isUnpack == '1' && (isNewUnpack == 0 || !isNewUnpack)">
|
|
|
+ <view
|
|
|
+ v-if="
|
|
|
+ objData.isUnpack == '1' &&
|
|
|
+ (isNewUnpack == 0 || !isNewUnpack) &&
|
|
|
+ objData.singleReport == '1'
|
|
|
+ "
|
|
|
+ >
|
|
|
<view class="col userInp" style="display: flex; align-items: center">
|
|
|
<text class="label lable150 rx-cc">规格选择:</text>
|
|
|
<!-- multiple -->
|
|
|
@@ -446,18 +462,22 @@ export default {
|
|
|
{
|
|
|
text: "按计量",
|
|
|
value: 1,
|
|
|
+ textValue: "按计量",
|
|
|
},
|
|
|
{
|
|
|
text: "最小包装",
|
|
|
value: 2,
|
|
|
+ textValue: "",
|
|
|
},
|
|
|
{
|
|
|
text: "内包装",
|
|
|
value: 3,
|
|
|
+ textValue: "",
|
|
|
},
|
|
|
{
|
|
|
text: "外包装",
|
|
|
value: 4,
|
|
|
+ textValue: "",
|
|
|
},
|
|
|
],
|
|
|
isNewUnpack: 0,
|
|
|
@@ -525,7 +545,7 @@ export default {
|
|
|
this.formedNumLast = 0;
|
|
|
}
|
|
|
|
|
|
- if (newVal.isUnpack == "1") {
|
|
|
+ if (newVal.isUnpack == "1" && this.objData.singleReport == "1") {
|
|
|
this.packageDispositionFn();
|
|
|
}
|
|
|
|
|
|
@@ -620,11 +640,37 @@ export default {
|
|
|
}
|
|
|
this.selectList = res;
|
|
|
|
|
|
+ this.warehouseSpecTypeList.forEach((item) => {
|
|
|
+ if (item.value == 2) {
|
|
|
+ item.textValue = item.text + `(${this.selectPackInfo(res[0])})`;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.value == 3) {
|
|
|
+ item.textValue = item.text + `(${this.selectPackInfo(res[1])})`;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.value == 4) {
|
|
|
+ item.textValue = item.text + `(${this.selectPackInfo(res[2])})`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
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; //内包装数量
|
|
|
@@ -959,40 +1005,70 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
if (this.warehouseId == 2) {
|
|
|
- packInfo = {
|
|
|
- // this.DispositionList[0]
|
|
|
-
|
|
|
- specText: this.text,
|
|
|
- specValue: this.value,
|
|
|
- minimumPackage: this.minimumPackage, // 最小包装
|
|
|
- tier: this.warehouseId,
|
|
|
- minimumPackageCell: this.DispositionList[0].packageCell, // 最小包装
|
|
|
- minimumPackageUnit: this.DispositionList[0].packageUnit, // 最小包装单位
|
|
|
- minimumConversionUnit: this.DispositionList[0].conversionUnit, // 最小包装单位
|
|
|
- minimumFormedNumLast: this.DispositionList[0].formedNumLast, // 总包装数量
|
|
|
- };
|
|
|
+ if (this.DispositionList && this.DispositionList.length != 0) {
|
|
|
+ packInfo = {
|
|
|
+ // this.DispositionList[0]
|
|
|
+
|
|
|
+ specText: this.text,
|
|
|
+ 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, // 总包装数量
|
|
|
+ isNewUnpack: this.isNewUnpack,
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ packInfo = {
|
|
|
+ tier: 1,
|
|
|
+ isUnpack: this.objData.isUnpack,
|
|
|
+ };
|
|
|
+ }
|
|
|
} else if (this.warehouseId == 3) {
|
|
|
- packInfo = {
|
|
|
- specText: this.text,
|
|
|
- specValue: this.value,
|
|
|
- withinPackage: this.withinPackage, // 内包装
|
|
|
- tier: this.warehouseId,
|
|
|
- withinPackageCell: this.DispositionList[1].packageCell, // 最小包装名称
|
|
|
- withinPackageUnit: this.DispositionList[1].packageUnit, // 最小包装单位
|
|
|
- withinConversionUnit: this.DispositionList[1].conversionUnit, // 最小包装单位
|
|
|
- withinFormedNumLast: this.DispositionList[1].formedNumLast,
|
|
|
- }; // 总包装数量
|
|
|
+ if (this.DispositionList && this.DispositionList.length != 0) {
|
|
|
+ packInfo = {
|
|
|
+ specText: this.text,
|
|
|
+ specValue: this.value,
|
|
|
+ withinPackage: this.withinPackage, // 内包装
|
|
|
+ tier: this.warehouseId,
|
|
|
+ isUnpack: this.objData.isUnpack,
|
|
|
+ packUnitInfo: this.warehouseSpecTypeList[2].textValue,
|
|
|
+ withinPackageCell: this.DispositionList[1].packageCell, // 最小包装名称
|
|
|
+ withinPackageUnit: this.DispositionList[1].packageUnit, // 最小包装单位
|
|
|
+ withinConversionUnit: this.DispositionList[1].conversionUnit, // 最小包装单位
|
|
|
+ withinFormedNumLast: this.DispositionList[1].formedNumLast,
|
|
|
+ isNewUnpack: this.isNewUnpack,
|
|
|
+ }; // 总包装数量
|
|
|
+ } else {
|
|
|
+ packInfo = {
|
|
|
+ tier: 3,
|
|
|
+ isUnpack: this.objData.isUnpack,
|
|
|
+ };
|
|
|
+ }
|
|
|
} else if (this.warehouseId == 4) {
|
|
|
- packInfo = {
|
|
|
- specText: this.text,
|
|
|
- specValue: this.value,
|
|
|
- outsidePackage: this.outsidePackage, //外包装
|
|
|
- tier: this.warehouseId,
|
|
|
- outsidePackageCell: this.DispositionList[2].packageCell, // 最小包装名称
|
|
|
- outsidePackageUnit: this.DispositionList[2].packageUnit, // 最小包装单位
|
|
|
- outsideConversionUnit: this.DispositionList[2].conversionUnit, // 最小包装单位
|
|
|
- outsideFormedNumLast: this.DispositionList[2].formedNumLast,
|
|
|
- }; // 总包装数量
|
|
|
+ if (this.DispositionList && this.DispositionList.length != 0) {
|
|
|
+ packInfo = {
|
|
|
+ specText: this.text,
|
|
|
+ specValue: this.value,
|
|
|
+ outsidePackage: this.outsidePackage, //外包装
|
|
|
+ tier: this.warehouseId,
|
|
|
+ isUnpack: this.objData.isUnpack,
|
|
|
+ packUnitInfo: this.warehouseSpecTypeList[3].textValue,
|
|
|
+ outsidePackageCell: this.DispositionList[2].packageCell, // 最小包装名称
|
|
|
+ outsidePackageUnit: this.DispositionList[2].packageUnit, // 最小包装单位
|
|
|
+ outsideConversionUnit: this.DispositionList[2].conversionUnit, // 最小包装单位
|
|
|
+ outsideFormedNumLast: this.DispositionList[2].formedNumLast,
|
|
|
+ isNewUnpack: this.isNewUnpack,
|
|
|
+ }; // 总包装数量
|
|
|
+ } else {
|
|
|
+ packInfo = {
|
|
|
+ tier: 4,
|
|
|
+ isUnpack: this.objData.isUnpack,
|
|
|
+ };
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|