Browse Source

工具接收修改编码 2022年11月1日 sxm

master
[li_she] 3 years ago
parent
commit
e3f62d00cc
  1. 4
      src/api/knifemold/tool-info.js
  2. 83
      src/views/modules/knifemold/receive.vue

4
src/api/knifemold/tool-info.js

@ -49,5 +49,9 @@ export const updatePoReceiptList = data => createAPI(`toolInfo/updatePoReceiptLi
export const updatePoReceiptListR = data => createAPI(`toolInfo/updatePoReceiptListR`, 'POST', data)
// 修改工具接收编码
export const updateReceiveToolDetail = data => createAPI(`PRHeader/updateReceiveToolDetail`, 'POST', data)

83
src/views/modules/knifemold/receive.vue

@ -191,7 +191,7 @@
:label="buttons.cz"
align="center">
<template slot-scope="scope">
<el-link @click="deleteTool(scope.row)">{{buttons.delete}}</el-link>
<el-link v-if="scope.row.status == '已接收'" @click="editToolDetail(scope.row)">{{buttons.edit}}</el-link>
</template>
</el-table-column>
</el-table>
@ -270,9 +270,27 @@
</el-dialog>
<el-dialog title="预览" :visible.sync="pdfVisible" center width="60%">
<iframe :src="this.pdfUrl" frameborder="0" width="100%" height="400px"></iframe>
</el-dialog>
<!--新增或编辑实例-->
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag
:title="'修改接收工具信息'" :visible.sync="toolEditFlag" width="197px">
<el-form :inline="true" label-position="top">
<el-form-item label="工具实例编码">
<el-input v-model="editToolData.newToolInstanceId">
</el-input>
</el-form-item>
<el-form-item label="使用寿命">
<el-input v-model="editToolData.estUseQty">
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="updateToolDetail()">修改</el-button>
<el-button type="primary" @click="toolEditFlag = false">取消</el-button>
</span>
</el-dialog>
</div>
</template>
@ -308,6 +326,10 @@
saveFileAssociate,
printToolData
} from "@/api/knifemold/receive.js"
import {
getToolDetailList,
updateReceiveToolDetail,
} from '@/api/knifemold/tool-info.js'
import getLodop from '@/utils/LodopFuncs.js'
import axios from "axios";
@ -321,6 +343,13 @@
},
data() {
return {
toolEditFlag: false,
editToolData: {
toolInstanceId: '',
estUseQty: '',
site: '',
newToolInstanceId: ''
},
toolCodeFlag: false,
pdfUrl: '',
fileList: [],
@ -879,6 +908,14 @@
radio() {
this.locationNo = ''
},
editToolData: {
deep: true,
handler: function (newV, oldV) {
if (this.editToolData.newToolInstanceId) {
this.editToolData.newToolInstanceId = this.editToolData.newToolInstanceId.toUpperCase()
}
}
},
locationNo() {
this.locationNo = this.locationNo.toUpperCase()
},
@ -892,9 +929,39 @@
}
},
methods: {
//
deleteTool(){
//
editToolDetail(row) {
this.getToolDetailList(row)
this.toolEditFlag = true
},
//
getToolDetailList(row) {
let queryData = {
site: this.site,
toolInstanceId: row.toolInstanceId,
}
getToolDetailList(queryData).then(({data}) => {
if (data && data.code == 0 && data.rows) {
this.editToolData = {
newToolInstanceId: data.rows[0].toolInstanceId,
site: data.rows[0].site,
toolInstanceId: data.rows[0].toolInstanceId,
estUseQty: data.rows[0].estUseQty,
}
}
})
},
//
updateToolDetail() {
updateReceiveToolDetail(this.editToolData).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
this.toolEditFlag = false
this.initPoToolTable()
} else {
this.$message.error(data.msg)
}
})
},
childByValue(childValue) {
// childValue
@ -962,7 +1029,7 @@
const LODOP = getLodop()
if (LODOP) {
//LODOP.SET_LICENSES("","7B5624CC84EF99D6B17F27DF4AF4310C","","");
LODOP.SET_LICENSES("","7B5624CC84EF99D6B17F27DF4AF4310C","","");
LODOP.SET_LICENSES("", "7B5624CC84EF99D6B17F27DF4AF4310C", "", "");
//
for (let i = 0; i < printDataList.length; i++) {
let printData = printDataList[i]
@ -1181,7 +1248,7 @@
this.toolCodeFlag = true
this.toolInstanceId = ''
},
manualInitMailFlag(){
manualInitMailFlag() {
this.generateFlag = true
if (this.toolInstanceId == null || this.toolInstanceId == '') {
this.$alert('请输入工具实例编码!', '接收数量', {
@ -1244,7 +1311,7 @@
this.manualSaveToolInstanceId()
}
},
manualSaveToolInstanceId(){
manualSaveToolInstanceId() {
let status;
if (this.radio == "Y") {
status = "出库"

Loading…
Cancel
Save