|
@@ -127,10 +127,10 @@
|
|
</template>
|
|
</template>
|
|
<!-- 米数 -->
|
|
<!-- 米数 -->
|
|
<template v-if="item.prop == 'meterNumber'">
|
|
<template v-if="item.prop == 'meterNumber'">
|
|
- <el-input
|
|
|
|
|
|
+ <el-input v-if="scope.row.haveMeter==1"
|
|
class="textinput111"
|
|
class="textinput111"
|
|
v-model.number="scope.row.meterNumber"
|
|
v-model.number="scope.row.meterNumber"
|
|
- placeholder="(非必填)"
|
|
|
|
|
|
+ placeholder="(必填)"
|
|
></el-input>
|
|
></el-input>
|
|
</template>
|
|
</template>
|
|
<!-- 分装车数 -->
|
|
<!-- 分装车数 -->
|
|
@@ -228,7 +228,7 @@
|
|
</template>
|
|
</template>
|
|
<!-- 米数 -->
|
|
<!-- 米数 -->
|
|
<template v-if="item.prop == 'meterNumber'">
|
|
<template v-if="item.prop == 'meterNumber'">
|
|
- <el-input
|
|
|
|
|
|
+ <el-input v-if="scope.row.haveMeter==1"
|
|
class="textinput"
|
|
class="textinput"
|
|
v-model.number="scope.row.meterNumber"
|
|
v-model.number="scope.row.meterNumber"
|
|
></el-input>
|
|
></el-input>
|
|
@@ -460,7 +460,7 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import PageTitle from "@/components/Page/Title";
|
|
import PageTitle from "@/components/Page/Title";
|
|
-import { sjTime } from "@/utils/sharedJsFile";
|
|
|
|
|
|
+import { sjTime,isIntegerNumber } from "@/utils/sharedJsFile";
|
|
export default {
|
|
export default {
|
|
components: { PageTitle },
|
|
components: { PageTitle },
|
|
data() {
|
|
data() {
|
|
@@ -819,7 +819,9 @@ export default {
|
|
}else{
|
|
}else{
|
|
getisPound = 1;
|
|
getisPound = 1;
|
|
}
|
|
}
|
|
- var addmap = {
|
|
|
|
|
|
+ //若物资为带有盘螺、盘圆、盘元,默认无米数
|
|
|
|
+ if(e.materialName.includes("盘螺")||e.materialName.includes("盘圆")||e.materialName.includes("盘元")){
|
|
|
|
+ var addmap = {
|
|
materialName: e.materialName,
|
|
materialName: e.materialName,
|
|
Specification: e.materialSpecification+e.materialModel,
|
|
Specification: e.materialSpecification+e.materialModel,
|
|
materialCode: e.materialCode,
|
|
materialCode: e.materialCode,
|
|
@@ -828,7 +830,23 @@ export default {
|
|
isPound: getisPound,
|
|
isPound: getisPound,
|
|
//物资Id
|
|
//物资Id
|
|
materialId: e.materialId,
|
|
materialId: e.materialId,
|
|
- };
|
|
|
|
|
|
+ //无米数
|
|
|
|
+ haveMeter: 0
|
|
|
|
+ };
|
|
|
|
+ }else{
|
|
|
|
+ var addmap = {
|
|
|
|
+ materialName: e.materialName,
|
|
|
|
+ Specification: e.materialSpecification+e.materialModel,
|
|
|
|
+ materialCode: e.materialCode,
|
|
|
|
+ orderPlanWeight: null,
|
|
|
|
+ meterNumber: null,
|
|
|
|
+ isPound: getisPound,
|
|
|
|
+ //物资Id
|
|
|
|
+ materialId: e.materialId,
|
|
|
|
+ //有米数
|
|
|
|
+ haveMeter: 1
|
|
|
|
+ };
|
|
|
|
+ }
|
|
this.materialList.push(addmap);
|
|
this.materialList.push(addmap);
|
|
});
|
|
});
|
|
this.materialList1 = [];
|
|
this.materialList1 = [];
|
|
@@ -878,11 +896,13 @@ export default {
|
|
addMaterialToSaleOrder(){
|
|
addMaterialToSaleOrder(){
|
|
if(this.materialList.length==0){
|
|
if(this.materialList.length==0){
|
|
this.$message.warning("请至少为这一车添加一个物资!");
|
|
this.$message.warning("请至少为这一车添加一个物资!");
|
|
- }else if(!this.saleShipperAddressName){
|
|
|
|
|
|
+ }else if(!this.saleShipperAddressName&&this.values=='no'){
|
|
this.$message.warning("收货地址未填写!");
|
|
this.$message.warning("收货地址未填写!");
|
|
}else if(this.materialList.length==1&&this.materialList[0].carNumber!=null){
|
|
}else if(this.materialList.length==1&&this.materialList[0].carNumber!=null){
|
|
|
|
+ if(this.materialList[0].orderPlanWeight/this.materialList[0].carNumber)
|
|
var eachOrderPlanWeight = this.materialList[0].orderPlanWeight/this.materialList[0].carNumber;
|
|
var eachOrderPlanWeight = this.materialList[0].orderPlanWeight/this.materialList[0].carNumber;
|
|
- var e = this.materialList[0];
|
|
|
|
|
|
+ if(isIntegerNumber(eachOrderPlanWeight)){
|
|
|
|
+ var e = this.materialList[0];
|
|
for(var i=0;i<this.materialList[0].carNumber;i++){
|
|
for(var i=0;i<this.materialList[0].carNumber;i++){
|
|
var addmap = {
|
|
var addmap = {
|
|
cxh: this.maxCxh,
|
|
cxh: this.maxCxh,
|
|
@@ -898,6 +918,7 @@ export default {
|
|
saleDateOfReceipt: this.saleDateOfReceipt,
|
|
saleDateOfReceipt: this.saleDateOfReceipt,
|
|
saleOrderConsigneeTel: this.saleOrderConsigneeTel,
|
|
saleOrderConsigneeTel: this.saleOrderConsigneeTel,
|
|
materialId: e.materialId,
|
|
materialId: e.materialId,
|
|
|
|
+ haveMeter: e.haveMeter
|
|
};
|
|
};
|
|
this.selectionList.push(addmap);
|
|
this.selectionList.push(addmap);
|
|
//最大车序号加1
|
|
//最大车序号加1
|
|
@@ -907,6 +928,10 @@ export default {
|
|
this.materialList = [];
|
|
this.materialList = [];
|
|
//调用记录每一行的合并数的方法
|
|
//调用记录每一行的合并数的方法
|
|
this.getSpanArr(this.selectionList);
|
|
this.getSpanArr(this.selectionList);
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.warning("分配件数不是整数!");
|
|
|
|
+ }
|
|
|
|
+
|
|
}else{
|
|
}else{
|
|
this.materialList.forEach((e) => {
|
|
this.materialList.forEach((e) => {
|
|
var addmap = {
|
|
var addmap = {
|
|
@@ -923,6 +948,7 @@ export default {
|
|
saleDateOfReceipt: this.saleDateOfReceipt,
|
|
saleDateOfReceipt: this.saleDateOfReceipt,
|
|
saleOrderConsigneeTel: this.saleOrderConsigneeTel,
|
|
saleOrderConsigneeTel: this.saleOrderConsigneeTel,
|
|
materialId: e.materialId,
|
|
materialId: e.materialId,
|
|
|
|
+ haveMeter: e.haveMeter
|
|
};
|
|
};
|
|
this.selectionList.push(addmap);
|
|
this.selectionList.push(addmap);
|
|
});
|
|
});
|
|
@@ -979,6 +1005,13 @@ export default {
|
|
this.selectionList[this.indexChangeMaterial].Specification=this.selectedMaterialSpecification+this.selectedMaterialModel;
|
|
this.selectionList[this.indexChangeMaterial].Specification=this.selectedMaterialSpecification+this.selectedMaterialModel;
|
|
this.selectionList[this.indexChangeMaterial].materialCode=this.selectedMaterialModel;
|
|
this.selectionList[this.indexChangeMaterial].materialCode=this.selectedMaterialModel;
|
|
this.selectionList[this.indexChangeMaterial].isPound=getisPound;
|
|
this.selectionList[this.indexChangeMaterial].isPound=getisPound;
|
|
|
|
+ //确定更改的物资有无米数
|
|
|
|
+ if(this.selectedMaterialName.includes("盘螺")||this.selectedMaterialName.includes("盘圆")||this.selectedMaterialName.includes("盘元")){
|
|
|
|
+ this.selectionList[this.indexChangeMaterial].haveMeter = 0;
|
|
|
|
+ this.selectionList[this.indexChangeMaterial].meterNumber = null;
|
|
|
|
+ }else{
|
|
|
|
+ this.selectionList[this.indexChangeMaterial].haveMeter = 1;
|
|
|
|
+ }
|
|
//重新初始化
|
|
//重新初始化
|
|
this.indexChangeMaterial = null;
|
|
this.indexChangeMaterial = null;
|
|
this.selectedMaterialId = null;
|
|
this.selectedMaterialId = null;
|