|
@@ -11,9 +11,9 @@
|
|
|
<a-input-search
|
|
|
placeholder="请输入计划单号"
|
|
|
enter-button
|
|
|
- @search="onSearch($event,'1')"
|
|
|
+ @search="onSearch($event,'0')"
|
|
|
/>
|
|
|
- <a-button type="primary" :disabled="edit == '1'" @click="onSearch($event,'0')">更新</a-button>
|
|
|
+ <a-button type="primary" :disabled="edit == '0'" @click="onSearch($event,'1')">更新</a-button>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -104,7 +104,7 @@
|
|
|
:pagination="false"
|
|
|
>
|
|
|
<template slot="omcVenAbbName" slot-scope="text, record, index">
|
|
|
- <div v-for="(item,index) in record.omcVenAbbName" :key="index">
|
|
|
+ <div v-for="(item,index) in record.omcVenAbbNameArray" :key="index">
|
|
|
{{item}}
|
|
|
</div>
|
|
|
</template>
|
|
@@ -380,7 +380,7 @@ import surplusYarnModal from '@views/reportForms/fabric-loss-table/surplusYarnMo
|
|
|
import purchaseLeftModal from '@views/reportForms/fabric-loss-table/purchaseLeftModal.vue'
|
|
|
import otherYarnsInModal from '@views/reportForms/fabric-loss-table/otherYarnsInModal.vue'
|
|
|
import AttachmentDisplay from '@views/reportForms/fabric-loss-table/attachment-display.vue'
|
|
|
-import { getFabricLossDatas } from '@api/reportForms/fabric-loss-table'
|
|
|
+import { getFabricLossDatas,saveFabricLossData } from '@api/reportForms/fabric-loss-table'
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import moment from 'moment'
|
|
@@ -410,7 +410,7 @@ export default {
|
|
|
validatorRules: {
|
|
|
planNum: [{ required: true, message: '请输入计划单号进行搜索', trigger: 'blur' }]
|
|
|
},
|
|
|
- edit:'1',
|
|
|
+ edit:'0',
|
|
|
// 采购订单 表头
|
|
|
purchaseOrderColumns: [
|
|
|
{ title: '货物名称', width: 180, dataIndex: 'cinvName', className: 'replacecolor', align:'left'},
|
|
@@ -742,7 +742,7 @@ export default {
|
|
|
this.fabricLoss.fabricCostClothList.map((item,index) => {item.index = index +1})
|
|
|
this.fabricLoss.fabricCostAssistList.map((item,index) => {item.index = index +1})
|
|
|
this.fabricLoss.fabricPoOrderList.map(item => {
|
|
|
- item.omcVenAbbName = item.omcVenAbbName ? (item.omcVenAbbName.split(",")) : ''
|
|
|
+ item["omcVenAbbNameArray"] = item.omcVenAbbName ? (item.omcVenAbbName.split(",")) : ''
|
|
|
})
|
|
|
}else{
|
|
|
this.fabricLoss = {fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[]};
|
|
@@ -925,18 +925,22 @@ export default {
|
|
|
},
|
|
|
|
|
|
save() {
|
|
|
- console.log('保存,数据保存到哪?')
|
|
|
const that = this
|
|
|
- this.$refs.form.validate(valid => {
|
|
|
- if (valid) {
|
|
|
- // alert('保存!')
|
|
|
- console.log('备注信息:', this.fabricLoss.noteOne, '计划单号:', this.fabricLoss.planNum)
|
|
|
- // that.$message.success(res.message)
|
|
|
- that.$message.success('保存成功,数据添加到成本分配汇总')
|
|
|
- } else {
|
|
|
- this.$message.info('请选择计划单号、输入备注信息')
|
|
|
+ if (this.fabricLoss.makingPeople == null){
|
|
|
+ that.$message.info('没有可保存的数据,请先查询数据');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.confirmLoading = true;
|
|
|
+ console.log(this.fabricLoss);
|
|
|
+ saveFabricLossData(this.fabricLoss).then(res => {
|
|
|
+ that.confirmLoading = false;
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success(res.message);
|
|
|
+ that.fabricLoss = res.result;
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message)
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
// 附件
|
|
|
openEnclosure(){
|