|
|
|
|
@ -29,7 +29,7 @@ |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import settlementDailog from './SettlementDailog.vue' |
|
|
|
|
import {getStatement,oemSettleAccountsItem,matchStandard,updateData} from "@/api/outsourcingManagement/oemOrderSettlement" |
|
|
|
|
import {getStatement,calculate,matchStandard,updateData} from "@/api/outsourcingManagement/oemOrderSettlement" |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
@ -381,7 +381,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '结算状态', |
|
|
|
|
prop: 'rosStatus', |
|
|
|
|
prop: 'rosStatusName', |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
span: 24, |
|
|
|
|
@ -508,6 +508,11 @@ export default { |
|
|
|
|
// return; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
if(this.data.length == 0){ |
|
|
|
|
this.$message.error('请先查询数据!'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.$confirm('确定要进行结算吗?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
@ -515,22 +520,20 @@ export default { |
|
|
|
|
}).then(() => { |
|
|
|
|
// 调用结算接口 |
|
|
|
|
const params = { |
|
|
|
|
statementList: this.selectionList, |
|
|
|
|
price: this.form.price |
|
|
|
|
...this.query, |
|
|
|
|
price: this.form && this.form.price, |
|
|
|
|
postPlatingStorageTimeStart:this.query && this.query.putStoreTime && this.query.putStoreTime.length != 0 && this.query.putStoreTime[0], |
|
|
|
|
postPlatingStorageTimeEnd:this.query && this.query.putStoreTime && this.query.putStoreTime.length != 0 && this.query.putStoreTime[1], |
|
|
|
|
memo:this.query && this.query.memo && this.query.memo.length != 0 && this.query.memo.join(';'), |
|
|
|
|
}; |
|
|
|
|
if(params.putStoreTime) delete params.putStoreTime; |
|
|
|
|
|
|
|
|
|
oemSettleAccountsItem(params).then(res => { |
|
|
|
|
calculate(params).then(res => { |
|
|
|
|
// 获取返回的数据 |
|
|
|
|
if (res.data && res.data.data) { |
|
|
|
|
this.settleResult = res.data.data; |
|
|
|
|
// 打开settlementDailog并显示结果 |
|
|
|
|
this.isOpen = true; |
|
|
|
|
} else { |
|
|
|
|
this.$message.success('结算成功'); |
|
|
|
|
this.onLoad(); |
|
|
|
|
} |
|
|
|
|
this.$message.success('结算成功'); |
|
|
|
|
this.onLoad(); |
|
|
|
|
}).catch(() => { |
|
|
|
|
this.$message.error('结算失败'); |
|
|
|
|
// this.$message.error('结算失败'); |
|
|
|
|
}); |
|
|
|
|
}).catch(() => { |
|
|
|
|
// 用户点击取消 |
|
|
|
|
|