|
@@ -116,7 +116,7 @@
|
|
|
<span slot="ffinalApproveDate" slot-scope="text, record">
|
|
|
<a-date-picker style="width: 100%" v-model="record.ffinalApproveDate" :format="dateFormat" v-if="record.enter=='1'"> </a-date-picker>
|
|
|
<!-- <a-input placeholder="请输入" v-model="record.ffinalApproveDate" v-if="record.enter=='1'"></a-input> -->
|
|
|
- <span v-if="record.enter=='0'">{{ text!==''&&text?moment(text).format('YYYY-MM-DD'):'' }}</span>
|
|
|
+ <span v-if="record.enter=='0'">{{text}}</span>
|
|
|
</span>
|
|
|
<span slot="option" slot-scope="text, record">
|
|
|
<a :disabled="record.enter=='0'" @click="sava(record)"> 保存</a>
|
|
@@ -140,7 +140,7 @@ import moment from 'moment'
|
|
|
|
|
|
import costDetailDrawer from '@views/cost-allocation-total/costDetailDrawer.vue'
|
|
|
|
|
|
-import { checkList,savaList } from '@api/document/inancialReconciliation.js'
|
|
|
+import { checkList,savaList,savaList1 } from '@api/document/inancialReconciliation.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'inancialReconciliation', // 成本分配汇总 单证
|
|
@@ -211,16 +211,17 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '核纱结束日期',
|
|
|
- width: 120,
|
|
|
+ width: 150,
|
|
|
dataIndex: 'ffinalApproveDate',
|
|
|
- customRender: text => {
|
|
|
- if(text!==''&&text){
|
|
|
- return moment(text).format('YYYY-MM-DD')
|
|
|
- }else{
|
|
|
- return ''
|
|
|
- }
|
|
|
+ scopedSlots: { customRender: 'ffinalApproveDate' },
|
|
|
+ // customRender: text => {
|
|
|
+ // if(text!==''&&text){
|
|
|
+ // return moment(text).format('YYYY-MM-DD')
|
|
|
+ // }else{
|
|
|
+ // return ''
|
|
|
+ // }
|
|
|
|
|
|
- },
|
|
|
+ // },
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{ title: '面损表单据状态', width: 90, dataIndex: 'fstatus', className: 'replacecolor' },
|
|
@@ -314,6 +315,7 @@ export default {
|
|
|
this.costAllocationData = res.result.records
|
|
|
this.costAllocationData.map(item=>{
|
|
|
item.enter = '0'
|
|
|
+ item.ffinalApproveDate = item.ffinalApproveDate!==''&&item.ffinalApproveDate ? moment(item.ffinalApproveDate).format('YYYY-MM-DD'):''
|
|
|
})
|
|
|
this.pagination = {
|
|
|
total: res.result.total,
|
|
@@ -369,6 +371,10 @@ export default {
|
|
|
remarks:record.remarks,
|
|
|
id:record.id
|
|
|
}
|
|
|
+ var newObj ={
|
|
|
+ ccode:record.planNo,
|
|
|
+ final_date: record.ffinalApproveDate!==''&&record.ffinalApproveDate ? moment(record.ffinalApproveDate).format('YYYY-MM-DD HH:mm:ss'):''
|
|
|
+ }
|
|
|
savaList(obj).then(res => {
|
|
|
this.loading = false
|
|
|
if (res.success) {
|
|
@@ -378,6 +384,15 @@ export default {
|
|
|
this.$message.error(res.message);
|
|
|
}
|
|
|
})
|
|
|
+ savaList1(newObj).then(res => {
|
|
|
+ this.loading = false
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('保存成功')
|
|
|
+ this.getCostList()
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
handleTableChange(pagination, filters, sorter) {
|