|
@@ -15,25 +15,36 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="订单号" prop="orderNum">
|
|
|
- <a-input placeholder="请输入订单号" v-model="clothesAdd.orderNum"></a-input>
|
|
|
+ {{clothesAdd.orderNum}}
|
|
|
+ <!-- <a-input placeholder="请输入订单号" v-model="clothesAdd.orderNum" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="款号" prop="styleNum">
|
|
|
- <a-input placeholder="请输入款号" v-model="clothesAdd.styleNum"></a-input>
|
|
|
+ {{clothesAdd.styleNum}}
|
|
|
+ <!-- <a-input placeholder="请输入款号" v-model="clothesAdd.styleNum" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="品名" prop="name">
|
|
|
- <a-input placeholder="请输入品名" v-model="clothesAdd.name"></a-input>
|
|
|
+ <a-form-model-item label="中文品名" prop="name">
|
|
|
+ {{clothesAdd.name}}
|
|
|
+ <!-- <a-input placeholder="请输入中文品名" v-model="clothesAdd.name"></a-input> -->
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="英文品名" prop="englishProductName">
|
|
|
+ {{clothesAdd.englishProductName}}
|
|
|
+ <!-- <a-input placeholder="请输入英文品名" v-model="clothesAdd.englishProductName"></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="尺码范围" prop="sizeRange">
|
|
|
- <a-input placeholder="请输入尺码范围" v-model="clothesAdd.sizeRange"></a-input>
|
|
|
+ {{clothesAdd.sizeRange}}
|
|
|
+ <!-- <a-input placeholder="请输入尺码范围" v-model="clothesAdd.sizeRange" readOnly></a-input> -->
|
|
|
<!-- <a-select placeholder="请选择尺码范围">
|
|
|
<a-select-option value="">请选择</a-select-option>
|
|
|
<a-select-option value="0">客户1</a-select-option>
|
|
@@ -44,20 +55,23 @@
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="客户" prop="customer">
|
|
|
- <a-input placeholder="请输入客户" v-model="clothesAdd.customer"></a-input>
|
|
|
+ <a-form-model-item label="客户" prop="customer" :title="clothesAdd.customer">
|
|
|
+ <!-- {{clothesAdd.customer | ellipsis}} -->
|
|
|
+ <a-input placeholder="请输入客户" v-model="clothesAdd.customer" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="集装箱代号" prop="containerCode">
|
|
|
- <a-input placeholder="请输入集装箱代号" v-model="clothesAdd.containerCode"></a-input>
|
|
|
+ {{clothesAdd.containerCode}}
|
|
|
+ <!-- <a-input placeholder="请输入集装箱代号" v-model="clothesAdd.containerCode" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="集装箱号" prop="containerNo">
|
|
|
- <a-input placeholder="请输入集装箱号" v-model="clothesAdd.containerNo"></a-input>
|
|
|
+ {{clothesAdd.containerNo}}
|
|
|
+ <!-- <a-input placeholder="请输入集装箱号" v-model="clothesAdd.containerNo" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -81,37 +95,43 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="托书号" prop="bookNum">
|
|
|
- <a-input placeholder="请输入托书号" v-model="clothesAdd.bookNum"></a-input>
|
|
|
+ {{clothesAdd.bookNum}}
|
|
|
+ <!-- <a-input placeholder="请输入托书号" v-model="clothesAdd.bookNum" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="总箱数" prop="totalBoxes">
|
|
|
- <a-input placeholder="请输入总箱数" v-model="clothesAdd.totalBoxes"></a-input>
|
|
|
+ {{clothesAdd.totalBoxes}}
|
|
|
+ <!-- <a-input placeholder="请输入总箱数" v-model="clothesAdd.totalBoxes" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="总毛重" prop="totalGrossWeight">
|
|
|
- <a-input placeholder="请输入总毛重" v-model="clothesAdd.totalGrossWeight"></a-input>
|
|
|
+ {{clothesAdd.totalGrossWeight}}
|
|
|
+ <!-- <a-input placeholder="请输入总毛重" v-model="clothesAdd.totalGrossWeight" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="总净重" prop="totalNetWeight">
|
|
|
- <a-input placeholder="请输入总净重" v-model="clothesAdd.totalNetWeight"></a-input>
|
|
|
+ {{clothesAdd.totalNetWeight}}
|
|
|
+ <!-- <a-input placeholder="请输入总净重" v-model="clothesAdd.totalNetWeight" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="总体积" prop="totalVolume">
|
|
|
- <a-input placeholder="请输入总体积" v-model="clothesAdd.totalVolume"></a-input>
|
|
|
+ {{clothesAdd.totalVolume}}
|
|
|
+ <!-- <a-input placeholder="请输入总体积" v-model="clothesAdd.totalVolume" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
+ <!-- <a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="总价" prop="totalPrice">
|
|
|
<a-input placeholder="请输入总价" v-model="clothesAdd.totalPrice"></a-input>
|
|
|
</a-form-model-item>
|
|
|
- </a-col>
|
|
|
+ </a-col> -->
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="总件数" prop="total">
|
|
|
- <a-input placeholder="请输入总件数" v-model="clothesAdd.total"></a-input>
|
|
|
+ {{clothesAdd.total}}
|
|
|
+ <!-- <a-input placeholder="请输入总件数" v-model="clothesAdd.total" readOnly></a-input> -->
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -159,92 +179,6 @@
|
|
|
</template>
|
|
|
</j-vxe-table>
|
|
|
</a-form-model>
|
|
|
- <!-- <a-form-model ref="formRef" :rules="validatorRules">
|
|
|
- <a-table
|
|
|
- bordered
|
|
|
- :row-key="record => record.id"
|
|
|
- :columns="clothesAddColumns"
|
|
|
- :data-source="clothesAddData"
|
|
|
- :loading="loading"
|
|
|
- :pagination="pagination"
|
|
|
- :scroll="{ x: 1500 }"
|
|
|
- @change="handleTableChange"
|
|
|
- > -->
|
|
|
- <!-- 启始箱号 输入框-->
|
|
|
- <!-- <template slot="inceptionBoxNo" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="inceptionBoxNo" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.startingBoxNumber" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!-- 结束箱号 输入框-->
|
|
|
- <!-- <template slot="endBoxNo" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="endBoxNo" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.endCaseNumber" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!-- 件数/箱 输入框-->
|
|
|
-
|
|
|
- <!-- <template slot="packagesBox" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="packagesBox" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.piecesBox" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!--箱数 输入框-->
|
|
|
- <!-- <template slot="boxes" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="boxes" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.boxNumber" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!--净重/箱 输入框-->
|
|
|
- <!-- <template slot="suttle" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="suttle" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.netWeight" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!--毛重/箱 输入框-->
|
|
|
- <!-- <template slot="roughWeight" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="roughWeight" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.grossWeight" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!--外箱长度 输入框-->
|
|
|
- <!-- <template slot="boxLength" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="boxLength" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.outerBoxLength" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!--外箱宽度 输入框-->
|
|
|
- <!-- <template slot="boxWidth" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="boxWidth" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.outerBoxWidth" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!--外箱高度 输入框-->
|
|
|
-
|
|
|
- <!-- <template slot="boxHeight" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="boxHeight" :rules="rules.styleNum" required>
|
|
|
- <a-input style="width:100%" type="text" v-model="record.outerBoxHeight" />
|
|
|
- </a-form-model-item>
|
|
|
- </template> -->
|
|
|
-
|
|
|
- <!-- 操作 -->
|
|
|
- <!-- <span slot="operationSlot" slot-scope="text, record">
|
|
|
- <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
|
|
|
- <a href="javascript:void(0);" style="color:red;">删除</a>
|
|
|
- </a-popconfirm>
|
|
|
- <a-divider type="vertical" />
|
|
|
- <a @click="copy(record)">复制</a>
|
|
|
- </span>
|
|
|
- </a-table>
|
|
|
- </a-form-model> -->
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
|
<!-- 页面底部提交取消 -->
|
|
@@ -299,7 +233,7 @@ export default {
|
|
|
},
|
|
|
// 表头
|
|
|
clothesAddColumns: [
|
|
|
- {
|
|
|
+ {
|
|
|
title: '账套',
|
|
|
key: 'acSetNo',
|
|
|
width: 160,
|
|
@@ -363,7 +297,7 @@ export default {
|
|
|
title: '颜色(中英文)',
|
|
|
key: 'colour',
|
|
|
width: 140,
|
|
|
- type: JVXETypes.input,
|
|
|
+ type: JVXETypes.normal,
|
|
|
},
|
|
|
{
|
|
|
title: '配码',
|
|
@@ -381,9 +315,9 @@ export default {
|
|
|
title: '箱数',
|
|
|
key: 'boxNumber',
|
|
|
width: 120,
|
|
|
- type: JVXETypes.normal
|
|
|
+ type: JVXETypes.inputNumber
|
|
|
},
|
|
|
- {
|
|
|
+ {
|
|
|
title: '计划尺码数量',
|
|
|
key: 'planSize',
|
|
|
width: 240,
|
|
@@ -405,7 +339,7 @@ export default {
|
|
|
title: '净重/箱',
|
|
|
key: 'netWeight',
|
|
|
width: 120,
|
|
|
- type: JVXETypes.input
|
|
|
+ type: JVXETypes.inputNumber
|
|
|
},
|
|
|
{
|
|
|
title: '总净重',
|
|
@@ -455,18 +389,18 @@ export default {
|
|
|
width: 120,
|
|
|
type: JVXETypes.inputNumber,
|
|
|
},
|
|
|
- {
|
|
|
- title: '单价',
|
|
|
- key: 'unitPrice',
|
|
|
- width: 120,
|
|
|
- type: JVXETypes.normal,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '总价',
|
|
|
- key: 'totalPrice',
|
|
|
- width: 120,
|
|
|
- type: JVXETypes.normal,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '单价',
|
|
|
+ // key: 'unitPrice',
|
|
|
+ // width: 120,
|
|
|
+ // type: JVXETypes.normal,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '总价',
|
|
|
+ // key: 'totalPrice',
|
|
|
+ // width: 120,
|
|
|
+ // type: JVXETypes.normal,
|
|
|
+ // },
|
|
|
{
|
|
|
title: '备注',
|
|
|
key: 'remarks',
|
|
@@ -486,6 +420,7 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
clothesAddData: [],
|
|
|
+ judge:0,
|
|
|
loading: false, // 表格加载
|
|
|
clothesAdd: {},
|
|
|
pagination: {
|
|
@@ -498,10 +433,13 @@ export default {
|
|
|
sizeFields:[], // 尺码字段
|
|
|
confirmLoading: false,
|
|
|
validatorRules: {
|
|
|
- orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
|
|
|
- styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
|
|
|
- name: [{ required: true, message: '品名不能为空', trigger: 'blur' }]
|
|
|
- // 待确定还有哪些必填信息
|
|
|
+ // orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
|
|
|
+ // styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
|
|
|
+ // name: [{ required: true, message: '中文品名不能为空', trigger: 'blur' }],
|
|
|
+ // // englishProductName: [{ required: true, message: '英文品名不能为空', trigger: 'blur' }],
|
|
|
+ // // sizeRange: [{ required: true, message: '品名不能为空', trigger: 'blur' }],
|
|
|
+ // // sizeRange
|
|
|
+ // // 待确定还有哪些必填信息
|
|
|
}
|
|
|
// dateFormat: 'YYYY-MM-DD'
|
|
|
}
|
|
@@ -525,10 +463,13 @@ export default {
|
|
|
orderSpltListId({id:preId}).then(res => {
|
|
|
var data = res.result
|
|
|
if (res.success) {
|
|
|
+ debugger
|
|
|
this.clothesAdd = {
|
|
|
+ documentNo:data.documentNo,
|
|
|
orderNum: data.orderNumber,
|
|
|
styleNum: data.itemNumber,
|
|
|
name: data.productName,
|
|
|
+ englishProductName:data.englishProductName,
|
|
|
sizeRange: data.sizeRange,
|
|
|
customer: data.customer,
|
|
|
containerCode: data.containerCode,
|
|
@@ -669,8 +610,8 @@ export default {
|
|
|
outerBoxHeight: '',
|
|
|
totalVolume: '',
|
|
|
netWeightToo: '',
|
|
|
- unitPrice: '',
|
|
|
- totalPrices: '',
|
|
|
+ // unitPrice: '',
|
|
|
+ // totalPrices: '',
|
|
|
remarks: '',
|
|
|
operation: ''
|
|
|
}
|
|
@@ -689,10 +630,10 @@ export default {
|
|
|
handleValueChange(event) {
|
|
|
var dataRow = event.row
|
|
|
console.log(dataRow)
|
|
|
- if (dataRow.startingBoxNumber != undefined && dataRow.startingBoxNumber != "" &&
|
|
|
- dataRow.endCaseNumber != undefined && dataRow.endCaseNumber != ""){
|
|
|
- dataRow.boxNumber = dataRow.endCaseNumber*1-dataRow.startingBoxNumber*1+1;
|
|
|
- }
|
|
|
+ // if (dataRow.startingBoxNumber != undefined && dataRow.startingBoxNumber != "" &&
|
|
|
+ // dataRow.endCaseNumber != undefined && dataRow.endCaseNumber != ""){
|
|
|
+ // dataRow.boxNumber = dataRow.endCaseNumber*1-dataRow.startingBoxNumber*1+1;
|
|
|
+ // }
|
|
|
var allSizeSum = this.getAllSizeSum(dataRow);
|
|
|
dataRow.piecesBox = allSizeSum
|
|
|
dataRow.total = dataRow.piecesBox*dataRow.boxNumber
|
|
@@ -732,7 +673,7 @@ export default {
|
|
|
submitAdd() {
|
|
|
const that = this;
|
|
|
// 触发表单验证
|
|
|
- that.$refs.formModel.validate(valid => {
|
|
|
+ that.$refs.formModel.validate(async valid => {
|
|
|
if (valid) {
|
|
|
if (this.sizeFields.length == 0){
|
|
|
this.$message.error('当前记录没有尺码字段,无法保存');
|
|
@@ -768,9 +709,45 @@ export default {
|
|
|
newObj.purchase=this.clothesAdd.purchase,
|
|
|
newObj.customerAbbreviation=this.clothesAdd.customerAbbreviation,
|
|
|
newObj.depositaryReceiptNo = this.clothesAdd.depositaryReceiptNo
|
|
|
- var sort = 0;
|
|
|
- for (var i=0; i<newObj.syPackingListTailoringItemList.length;i++){
|
|
|
- var tableRow = newObj.syPackingListTailoringItemList[i];
|
|
|
+ await this.JudgeVluabled()
|
|
|
+ if(this.judge == 0){
|
|
|
+ if(this.editDecide === 'edit'){
|
|
|
+ editSpltList(newObj).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('编辑成功')
|
|
|
+ this.close()
|
|
|
+ //清空信息
|
|
|
+ newObj = {};
|
|
|
+ that.fatherList() // 调用父组件 查询方法
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ addSpltList(newObj).then(res => {
|
|
|
+ debugger
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('新增成功')
|
|
|
+ this.close()
|
|
|
+ //清空信息
|
|
|
+ newObj = {};
|
|
|
+ that.fatherList() // 调用父组件 查询方法
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ JudgeVluabled(){
|
|
|
+ var sort = 0
|
|
|
+ this.judge = 0
|
|
|
+ for (var i=0; i<this.clothesAddData.length;i++){
|
|
|
+ var tableRow = this.clothesAddData[i];
|
|
|
var allSizeSum = this.getAllSizeSum(tableRow);
|
|
|
if (allSizeSum == 0){
|
|
|
this.$message.error('第'+(i+1)+'行所有尺码数量为0,无法保存');
|
|
@@ -782,16 +759,18 @@ export default {
|
|
|
{key:'startingBoxNumber',value:'起始箱号'},
|
|
|
{key:'endCaseNumber',value:'结束箱号'},
|
|
|
{key:'netWeight',value:'净重/箱'},
|
|
|
- {key:'piecesBox',value:'件数/箱'},
|
|
|
{key:'grossWeight',value:'毛重/箱'},
|
|
|
{key:'outerBoxLength',value:'外箱长度'},
|
|
|
{key:'outerBoxWidth',value:'外箱宽度'},
|
|
|
{key:'outerBoxHeight',value:'外箱高度'},
|
|
|
{key:'netWeightToo',value:'净净重'},
|
|
|
+ {key:'boxNumber',value:'箱数'},
|
|
|
]
|
|
|
for(var j=0 ; j<Valuable.length;j++){
|
|
|
if(tableRow[Valuable[j].key] == null || tableRow[Valuable[j].key] == "" || tableRow[Valuable[j].key] == undefined){
|
|
|
- this.$message.error('第'+(i+1)+'行'+Valuable[j].value+'未填,无法保存');
|
|
|
+ debugger
|
|
|
+ this.$message.error('第'+(i+1)+'行'+Valuable[j].value+'无值,无法保存');
|
|
|
+ this.judge+=1
|
|
|
return
|
|
|
}
|
|
|
}
|
|
@@ -803,107 +782,39 @@ export default {
|
|
|
]
|
|
|
for(var v=0 ; v<integer.length;v++){
|
|
|
if(!Number.isInteger(Number(tableRow[integer[v].key]))){
|
|
|
+ debugger
|
|
|
this.$message.error('第'+(i+1)+'行'+integer[v].value+'不为整数,无法保存');
|
|
|
+ this.judge+=1
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// //判断小数位数
|
|
|
- var Several = [
|
|
|
+ var Several = [
|
|
|
{key:'netWeight',value:'净重/箱'},
|
|
|
{key:'grossWeight',value:'毛重/箱'},
|
|
|
]
|
|
|
- for(var s=0 ; s<Several.length;s++){
|
|
|
+ for(var s=0 ; s<Several.length;s++){
|
|
|
var position = tableRow[Several[s].key].toString().indexOf('.') + 1; //小数点的位置
|
|
|
var digit = tableRow[Several[s].key].toString().length - position; //小数的位值
|
|
|
if(digit > 2 && position!==0){
|
|
|
+ debugger
|
|
|
this.$message.error('第'+(i+1)+'行'+Several[s].value+'小数超过两位,无法保存');
|
|
|
+ this.judge+=1
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(tableRow.startingBoxNumber > tableRow.endCaseNumber) {
|
|
|
this.$message.error('第'+(i+1)+'行起始箱号大于结束箱号,无法保存');
|
|
|
+ this.judge+=1
|
|
|
return;
|
|
|
}
|
|
|
- // if (tableRow.startingBoxNumber == ""){
|
|
|
- // this.$message.error('第'+(i+1)+'行起始箱号未填,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- //起始箱数判断
|
|
|
- // if(!Number.isInteger(Number(tableRow.startingBoxNumber))){
|
|
|
- // this.$message.error('第'+(i+1)+'行起始箱号不为整数,无法保存');
|
|
|
- // return
|
|
|
- // }
|
|
|
- // if (tableRow.endCaseNumber == ""){
|
|
|
- // this.$message.error('第'+(i+1)+'行结束箱号未填,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- //结束箱数小数判断
|
|
|
- // if(!Number.isInteger(Number(tableRow.endCaseNumber))){
|
|
|
- // this.$message.error('第'+(i+1)+'行结束箱号不为整数,无法保存');
|
|
|
- // return
|
|
|
- // }
|
|
|
if (tableRow.boxNumber == "" || tableRow.boxNumber == 0){
|
|
|
this.$message.error('第'+(i+1)+'行箱数,无法保存');
|
|
|
+ this.judge+=1
|
|
|
return;
|
|
|
}
|
|
|
- // if (tableRow.netWeight == null || tableRow.netWeight == "" || tableRow.netWeight == undefined){
|
|
|
- // this.$message.error('第'+(i+1)+'行净重/箱未填,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- //净重/箱小数判断
|
|
|
- // if(!Number.isInteger(Number(tableRow.netWeight))){
|
|
|
- // var position = tableRow.netWeight.toString().indexOf('.') + 1; //小数点的位置
|
|
|
- // var digit = tableRow.netWeight.toString().length - position; //小数的位数
|
|
|
- // if(digit > 2){
|
|
|
- // this.$message.error('第'+(i+1)+'行净重/箱超过两位小数,无法保存');
|
|
|
- // return
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (tableRow.piecesBox == null || tableRow.piecesBox == "" || tableRow.piecesBox == undefined){
|
|
|
- // this.$message.error('第'+(i+1)+'行件数/箱未填,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- //件数/箱小数判断
|
|
|
- // if(!Number.isInteger(tableRow.piecesBox)){
|
|
|
- // for (var i=0; i<this.sizeFields.length; i++){
|
|
|
- // if (!Number.isInteger(tableRow[this.sizeFields[i]]) ){
|
|
|
- // this.$message.error('第'+(i+1)+'行'+this.sizeFields[i]+'不为整数,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (tableRow.grossWeight == null || tableRow.grossWeight == "" || tableRow.grossWeight == undefined){
|
|
|
- // this.$message.error('第'+(i+1)+'行毛重/箱未填,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- //毛重/箱小数判断
|
|
|
- // if(!Number.isInteger(Number(tableRow.grossWeight))){
|
|
|
- // var position = tableRow.grossWeight.toString().indexOf('.') + 1; //小数点的位置
|
|
|
- // var digit = tableRow.grossWeight.toString().length - position; //小数的位数
|
|
|
- // if(digit > 2){
|
|
|
- // this.$message.error('第'+(i+1)+'行毛重/箱超过两位小数,无法保存');
|
|
|
- // return
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (tableRow.outerBoxLength == null || tableRow.outerBoxLength == "" || tableRow.outerBoxLength == undefined){
|
|
|
- // this.$message.error('第'+(i+1)+'行外箱长度未填,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (tableRow.outerBoxWidth == null || tableRow.outerBoxWidth == "" || tableRow.outerBoxWidth == undefined){
|
|
|
- // this.$message.error('第'+(i+1)+'行外箱宽度未填,无法保存');
|
|
|
- // return;
|
|
|
- // // }
|
|
|
- // if (tableRow.outerBoxHeight == null || tableRow.outerBoxHeight == "" || tableRow.outerBoxHeight == undefined){
|
|
|
- // this.$message.error('第'+(i+1)+'行外箱高度未填,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // if (tableRow.netWeightToo == null || tableRow.netWeightToo == "" || tableRow.netWeightToo == undefined){
|
|
|
- // this.$message.error('第'+(i+1)+'行净净重未填,无法保存');
|
|
|
- // return;
|
|
|
- // }
|
|
|
-
|
|
|
//尺码赋值
|
|
|
for (var j=0; j<tableRow.sizeTables.length; j++){
|
|
|
var sizeTable = tableRow.sizeTables[j];
|
|
@@ -912,33 +823,6 @@ export default {
|
|
|
}
|
|
|
tableRow.sort = ++sort;
|
|
|
}
|
|
|
- if(this.editDecide === 'edit'){
|
|
|
- editSpltList(newObj).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.$message.success('编辑成功')
|
|
|
- this.close()
|
|
|
- //清空信息
|
|
|
- newObj = {};
|
|
|
- that.fatherList() // 调用父组件 查询方法
|
|
|
- }else{
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
- }else {
|
|
|
- addSpltList(newObj).then(res => {
|
|
|
- if (res.success) {
|
|
|
- this.$message.success('新增成功')
|
|
|
- this.close()
|
|
|
- //清空信息
|
|
|
- newObj = {};
|
|
|
- that.fatherList() // 调用父组件 查询方法
|
|
|
- }else{
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
},
|
|
|
|
|
|
// 获取不同尺码数量之和
|
|
@@ -1031,7 +915,7 @@ export default {
|
|
|
title: '颜色(中英文)',
|
|
|
key: 'colour',
|
|
|
width: 140,
|
|
|
- type: JVXETypes.input,
|
|
|
+ type: JVXETypes.normal,
|
|
|
},
|
|
|
{
|
|
|
title: '配码',
|
|
@@ -1049,7 +933,7 @@ export default {
|
|
|
title: '箱数',
|
|
|
key: 'boxNumber',
|
|
|
width: 120,
|
|
|
- type: JVXETypes.normal
|
|
|
+ type: JVXETypes.inputNumber
|
|
|
},
|
|
|
{
|
|
|
title: '计划尺码数量',
|
|
@@ -1123,18 +1007,18 @@ export default {
|
|
|
width: 120,
|
|
|
type: JVXETypes.inputNumber,
|
|
|
},
|
|
|
- {
|
|
|
- title: '单价',
|
|
|
- key: 'unitPrice',
|
|
|
- width: 120,
|
|
|
- type: JVXETypes.normal,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '总价',
|
|
|
- key: 'totalPrice',
|
|
|
- width: 120,
|
|
|
- type: JVXETypes.normal,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '单价',
|
|
|
+ // key: 'unitPrice',
|
|
|
+ // width: 120,
|
|
|
+ // type: JVXETypes.normal,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '总价',
|
|
|
+ // key: 'totalPrice',
|
|
|
+ // width: 120,
|
|
|
+ // type: JVXETypes.normal,
|
|
|
+ // },
|
|
|
{
|
|
|
title: '备注',
|
|
|
key: 'remarks',
|