|
|
|
@ -7,6 +7,7 @@ |
|
|
|
@close="closeDialog" |
|
|
|
@close="closeDialog" |
|
|
|
@open="open" |
|
|
|
@open="open" |
|
|
|
fullscreen |
|
|
|
fullscreen |
|
|
|
|
|
|
|
class="content-box" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-form :inline="true" v-model="submitForm"> |
|
|
|
<el-form :inline="true" v-model="submitForm"> |
|
|
|
<el-form-item label="银钾系数" prop="coefficient" v-if="searchForm.materalType == 2"> |
|
|
|
<el-form-item label="银钾系数" prop="coefficient" v-if="searchForm.materalType == 2"> |
|
|
|
@ -30,14 +31,19 @@ |
|
|
|
<el-form :inline="true" v-model="searchForm" label-width="90px"> |
|
|
|
<el-form :inline="true" v-model="searchForm" label-width="90px"> |
|
|
|
<el-form-item label="作业中心" prop="wcId"> |
|
|
|
<el-form-item label="作业中心" prop="wcId"> |
|
|
|
<el-select style="width: 182px" v-model="searchForm.wcId" placeholder="请选择作业中心"> |
|
|
|
<el-select style="width: 182px" v-model="searchForm.wcId" placeholder="请选择作业中心"> |
|
|
|
<el-option v-for="item in workList" :key="item.id" :label="item.wcName" :value="item.id"></el-option> |
|
|
|
<el-option |
|
|
|
|
|
|
|
v-for="item in workList" |
|
|
|
|
|
|
|
:key="item.id" |
|
|
|
|
|
|
|
:label="item.wcName" |
|
|
|
|
|
|
|
:value="item.id" |
|
|
|
|
|
|
|
></el-option> |
|
|
|
<!-- <el-option label="作业中心二" value="2"></el-option> --> |
|
|
|
<!-- <el-option label="作业中心二" value="2"></el-option> --> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料类型" prop="materalType"> |
|
|
|
<el-form-item label="物料类型" prop="materalType"> |
|
|
|
<el-radio-group v-model="searchForm.materalType" @input="changeType"> |
|
|
|
<el-radio-group v-model="searchForm.materalType" @input="changeType"> |
|
|
|
<el-radio :label="1">金钾</el-radio> |
|
|
|
<el-radio :label="1">金钾(04-05-023)</el-radio> |
|
|
|
<el-radio :label="2">银钾</el-radio> |
|
|
|
<el-radio :label="2">银钾(04-05-024)</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
@ -48,7 +54,13 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
|
|
|
|
<el-table :data="tableData" @selection-change="handleSelectionChange" ref="multipleTable" :loading="loading"> |
|
|
|
<el-table |
|
|
|
|
|
|
|
:data="tableData" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
|
|
|
ref="multipleTable" |
|
|
|
|
|
|
|
:loading="loading" |
|
|
|
|
|
|
|
:height="tableHeight" |
|
|
|
|
|
|
|
> |
|
|
|
<el-table-column type="selection"></el-table-column> |
|
|
|
<el-table-column type="selection"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
label="计划单号" |
|
|
|
label="计划单号" |
|
|
|
@ -56,7 +68,12 @@ |
|
|
|
width="150" |
|
|
|
width="150" |
|
|
|
align="center" |
|
|
|
align="center" |
|
|
|
></el-table-column> |
|
|
|
></el-table-column> |
|
|
|
<el-table-column label="生产订单号" prop="yoCode" width="150" align="center"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
|
|
|
|
label="生产订单号" |
|
|
|
|
|
|
|
prop="yoCode" |
|
|
|
|
|
|
|
width="150" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
label="零件号" |
|
|
|
label="零件号" |
|
|
|
width="150" |
|
|
|
width="150" |
|
|
|
@ -69,7 +86,13 @@ |
|
|
|
prop="partName" |
|
|
|
prop="partName" |
|
|
|
align="center" |
|
|
|
align="center" |
|
|
|
></el-table-column> |
|
|
|
></el-table-column> |
|
|
|
<el-table-column label="物料编码" width="150" prop="plateGoodsCode" align="center"></el-table-column> |
|
|
|
<!-- <el-table-column label="物料编码" width="150" prop="plateGoodsCode" align="center"></el-table-column> --> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
|
|
label="流程卡号" |
|
|
|
|
|
|
|
prop="cardNo" |
|
|
|
|
|
|
|
width="80" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
<el-table-column |
|
|
|
label="生产标识" |
|
|
|
label="生产标识" |
|
|
|
prop="productIdent" |
|
|
|
prop="productIdent" |
|
|
|
@ -112,7 +135,12 @@ |
|
|
|
prop="quota2" |
|
|
|
prop="quota2" |
|
|
|
align="center" |
|
|
|
align="center" |
|
|
|
></el-table-column> |
|
|
|
></el-table-column> |
|
|
|
<el-table-column label="计划下达时间" prop="releaseDate" width="150" align="center"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
|
|
|
|
label="计划下达时间" |
|
|
|
|
|
|
|
prop="releaseDate" |
|
|
|
|
|
|
|
width="150" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
></el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="计划生产时间" prop="createTime" align="center"></el-table-column> --> |
|
|
|
<!-- <el-table-column label="计划生产时间" prop="createTime" align="center"></el-table-column> --> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
@ -140,7 +168,12 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { getListlistNoFinished,getAddRequireList,getWorkCenter,add } from '@/api/productionManagement/coatingMaterial'; |
|
|
|
import { |
|
|
|
|
|
|
|
getListlistNoFinished, |
|
|
|
|
|
|
|
getAddRequireList, |
|
|
|
|
|
|
|
getWorkCenter, |
|
|
|
|
|
|
|
add, |
|
|
|
|
|
|
|
} from '@/api/productionManagement/coatingMaterial'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
showDialog: { |
|
|
|
showDialog: { |
|
|
|
@ -159,23 +192,41 @@ export default { |
|
|
|
tableData: [], |
|
|
|
tableData: [], |
|
|
|
totalNum: null, |
|
|
|
totalNum: null, |
|
|
|
selectionList: [], |
|
|
|
selectionList: [], |
|
|
|
workList:[] |
|
|
|
workList: [], |
|
|
|
|
|
|
|
tableHeight: 0, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
console.log('11111111111') |
|
|
|
console.log('11111111111'); |
|
|
|
this.submitForm = {} |
|
|
|
this.submitForm = {}; |
|
|
|
this.searchForm = { |
|
|
|
this.searchForm = { |
|
|
|
materalType: 1, |
|
|
|
materalType: 1, |
|
|
|
} |
|
|
|
}; |
|
|
|
this.tableData = [] |
|
|
|
this.tableData = []; |
|
|
|
this.getWorkCenterList() |
|
|
|
this.getWorkCenterList(); |
|
|
|
|
|
|
|
window.addEventListener('resize', this.calculateTableHeight); |
|
|
|
|
|
|
|
// 初始计算 |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
|
|
this.calculateTableHeight(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
beforeDestroy() { |
|
|
|
|
|
|
|
window.removeEventListener('resize', this.calculateTableHeight); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
calculateTableHeight() { |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
|
|
const rightContainer = document.querySelector('.content-box'); |
|
|
|
|
|
|
|
if (!rightContainer) return; |
|
|
|
|
|
|
|
const containerHeight = rightContainer.offsetHeight; |
|
|
|
|
|
|
|
this.tableHeight = |
|
|
|
|
|
|
|
containerHeight - 51 - 80 - 42 - 20 - 84 -20; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
getWorkCenterList() { |
|
|
|
getWorkCenterList() { |
|
|
|
getWorkCenter().then((res) => { |
|
|
|
getWorkCenter().then(res => { |
|
|
|
this.workList = res.data.data |
|
|
|
this.workList = res.data.data; |
|
|
|
}) |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 切换金钾/银钾类型 |
|
|
|
// 切换金钾/银钾类型 |
|
|
|
changeType(val) { |
|
|
|
changeType(val) { |
|
|
|
@ -188,6 +239,10 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 点击查询按钮 |
|
|
|
// 点击查询按钮 |
|
|
|
async onSearch() { |
|
|
|
async onSearch() { |
|
|
|
|
|
|
|
if (!this.searchForm.wcId) { |
|
|
|
|
|
|
|
this.$message.warning('请选择作业中心'); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
try { |
|
|
|
try { |
|
|
|
// const params = { ...this.submitForm, ...this.query }; |
|
|
|
// const params = { ...this.submitForm, ...this.query }; |
|
|
|
@ -196,8 +251,8 @@ export default { |
|
|
|
...this.searchForm, |
|
|
|
...this.searchForm, |
|
|
|
overHalfMon: this.searchForm.overHalfMon ? 1 : 0, |
|
|
|
overHalfMon: this.searchForm.overHalfMon ? 1 : 0, |
|
|
|
current: 1, |
|
|
|
current: 1, |
|
|
|
size:99999 |
|
|
|
size: 99999, |
|
|
|
} |
|
|
|
}; |
|
|
|
const res = await getAddRequireList(params); |
|
|
|
const res = await getAddRequireList(params); |
|
|
|
this.tableData = res.data.data.records; |
|
|
|
this.tableData = res.data.data.records; |
|
|
|
// if (res && res.code === 200) { |
|
|
|
// if (res && res.code === 200) { |
|
|
|
@ -220,7 +275,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
var total = eval(strarr.join('+')); |
|
|
|
var total = eval(strarr.join('+')); |
|
|
|
this.totalNum = total ? total.toFixed(2) : 0; |
|
|
|
this.totalNum = total ? total.toFixed(2) : 0; |
|
|
|
console.log('total-----------',total) |
|
|
|
console.log('total-----------', total); |
|
|
|
this.submitForm.goodsQuantity = total ? total.toFixed(2) : 0; |
|
|
|
this.submitForm.goodsQuantity = total ? total.toFixed(2) : 0; |
|
|
|
}, |
|
|
|
}, |
|
|
|
closeDialog(val) { |
|
|
|
closeDialog(val) { |
|
|
|
@ -234,8 +289,8 @@ export default { |
|
|
|
// list: this.selectionList, |
|
|
|
// list: this.selectionList, |
|
|
|
// }; |
|
|
|
// }; |
|
|
|
// console.log(form); |
|
|
|
// console.log(form); |
|
|
|
let plateCodeArr = this.selectionList.map(item => item.plateGoodsCode) |
|
|
|
let plateCodeArr = this.selectionList.map(item => item.plateGoodsCode); |
|
|
|
let plateCode = [...new Set(plateCodeArr)].join(',') |
|
|
|
let plateCode = [...new Set(plateCodeArr)].join(','); |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
assayContent: { |
|
|
|
assayContent: { |
|
|
|
wcId: this.searchForm.wcId, |
|
|
|
wcId: this.searchForm.wcId, |
|
|
|
@ -244,29 +299,30 @@ export default { |
|
|
|
// coefficient: this.searchForm.materalType == 2 && this.searchForm.coefficient ? this.searchForm.coefficient : 0 |
|
|
|
// coefficient: this.searchForm.materalType == 2 && this.searchForm.coefficient ? this.searchForm.coefficient : 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
detailList: this.selectionList.map(item => { |
|
|
|
detailList: this.selectionList.map(item => { |
|
|
|
return {yoId :item.id} |
|
|
|
return { yoId: item.id }; |
|
|
|
}) |
|
|
|
}), |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if (this.searchForm.materalType != 2) { |
|
|
|
if (this.searchForm.materalType != 2) { |
|
|
|
// const { coefficient, ...validData } = params; |
|
|
|
// const { coefficient, ...validData } = params; |
|
|
|
console.log('params------------',params) |
|
|
|
console.log('params------------', params); |
|
|
|
add(params).then(res => { |
|
|
|
add(params).then(res => { |
|
|
|
if (res.data.code == 200) { |
|
|
|
if (res.data.code == 200) { |
|
|
|
this.$message.success('新增成功') |
|
|
|
this.$message.success('新增成功'); |
|
|
|
this.closeDialog(true) |
|
|
|
this.closeDialog(true); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
params.assayContent.coefficient = this.searchForm.coefficient ? this.searchForm.coefficient : 0 |
|
|
|
params.assayContent.coefficient = this.searchForm.coefficient |
|
|
|
|
|
|
|
? this.searchForm.coefficient |
|
|
|
|
|
|
|
: 0; |
|
|
|
add(params).then(res => { |
|
|
|
add(params).then(res => { |
|
|
|
if (res.data.code == 200) { |
|
|
|
if (res.data.code == 200) { |
|
|
|
this.$message.success('新增成功') |
|
|
|
this.$message.success('新增成功'); |
|
|
|
this.closeDialog(true) |
|
|
|
this.closeDialog(true); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|