|
@@ -44,6 +44,18 @@
|
|
|
<a-input placeholder="请输入" v-model="record.unQuantity" @blur="changeUQuantity(record)" @change="getQuan(record)"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
+ <template slot="unQuantityExecute" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="unQuantityExecute" class='sonItem'>
|
|
|
+ <a-input placeholder="请输入" v-model="record.unQuantityExecute" v-if="record.allowEditNum=='yes'" @blur="changeQuantityExecuteIn(index,record)"></a-input>
|
|
|
+ <span v-else>{{ record.unQuantityExecute }}</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+ <template slot="quantityExecute" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="quantityExecute" class='sonItem'>
|
|
|
+ <a-input placeholder="请输入" v-model="record.quantityExecute" v-if="record.allowEditNum=='yes'" @blur="changeQuantityExecuteIn(index,record)"></a-input>
|
|
|
+ <span v-else>{{ record.quantityExecute }}</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
<template slot="model" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="model" class='sonItem'>
|
|
|
<a-input placeholder="请输入" v-model="record.model" ></a-input>
|
|
@@ -175,6 +187,7 @@
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import inventoryPopup from '../../Popup/inventoryPopup.vue'
|
|
|
+ import { httpAction ,getAction,postAction,putAction} from '@/api/manage'
|
|
|
import moment from 'moment'
|
|
|
export default {
|
|
|
name: 'material', // Tabs 详情
|
|
@@ -279,18 +292,18 @@
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
- title: '已执行辅数量',
|
|
|
+ title: '已执行主数量',
|
|
|
align:"center",
|
|
|
- dataIndex: 'unQuantityExecute',
|
|
|
+ dataIndex: 'quantityExecute',
|
|
|
ellipsis: true,
|
|
|
- // scopedSlots: { customRender: 'unQuantityExecute' }
|
|
|
+ scopedSlots: { customRender: 'quantityExecute' }
|
|
|
},
|
|
|
{
|
|
|
- title: '已执行主数量',
|
|
|
+ title: '已执行辅数量',
|
|
|
align:"center",
|
|
|
- dataIndex: 'quantityExecute',
|
|
|
+ dataIndex: 'unQuantityExecute',
|
|
|
ellipsis: true,
|
|
|
- // scopedSlots: { customRender: 'quantityExecute' }
|
|
|
+ scopedSlots: { customRender: 'unQuantityExecute' }
|
|
|
},
|
|
|
{
|
|
|
title: '规格',
|
|
@@ -541,6 +554,29 @@
|
|
|
this.$message.warning('辅数量不可小于已执行辅数量!')
|
|
|
}
|
|
|
},
|
|
|
+ // 修改已执行数量
|
|
|
+ editNum(index){
|
|
|
+ this.form.dataSource[index-1].allowEditNum = 'yes'
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ changeQuantityExecuteIn(index,record){
|
|
|
+ this.$confirm({
|
|
|
+ content: `是否确认修改`,
|
|
|
+ onOk: () => {
|
|
|
+ postAction('/productionOrder/madeProductionOrders/updateProductionNum',record).then(res=>{
|
|
|
+ if(res.success){
|
|
|
+ this.$message.success('修改成功')
|
|
|
+ this.form.dataSource[index].allowEditNum = ''
|
|
|
+ this.$forceUpdate();
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ this.selectedRows = []
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
onSearchInven(record){
|
|
|
if(!this.planOrg||this.planOrg==''){
|
|
|
this.$message.warning('请选择生产组织!')
|