Browse Source

工具 2022年7月25日 sxm

master
[li_she] 4 years ago
parent
commit
0f5a519a6c
  1. 9
      src/api/knifemold/tool-info.js
  2. 303
      src/views/modules/knifemold/receive.vue
  3. 799
      src/views/modules/knifemold/tool-info.vue
  4. 8
      src/views/modules/purchaseorder/approvalRecord.vue
  5. 5
      src/views/modules/shopOrder/shopOrder/common/routingAddAndEdit.vue
  6. 4
      src/views/modules/sys/user.vue

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

@ -15,9 +15,18 @@ export const getSfdcToolingHistList = data => createAPI(`toolInfo/getSfdcTooling
// 获取工具使用记录
export const getToolHeaderList = data => createAPI(`toolInfo/getToolHeaderList`,'POST',data)
// 编辑 工具主表信息
export const editToolHeader = data => createAPI(`toolInfo/editToolHeader`,'POST',data)
// 保存 工具主表信息
export const saveToolHeader = data => createAPI(`toolInfo/saveToolHeader`,'POST',data)
// 获取工具使用记录
export const updateToolDetail = data => createAPI(`toolInfo/updateToolDetail`,'POST',data)
// 添加工具实例
export const saveToolInfoDetail = data => createAPI(`toolInfo/saveToolInfoDetail`,'POST',data)
// 获取工具打印
export const printTool = data => createAPI(`toolMan/printTool`,'POST',data)

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

@ -130,6 +130,9 @@
<el-button type="primary" :disabled="generateFlag" @click="initMailFlag()">{{buttons.generate}}</el-button>
<el-button type="primary" @click="printMethod('Y')">{{buttons.toolLabel}}</el-button>
<el-button type="primary" @click="printMethod('N')">{{buttons.screenLabel}}</el-button>
<el-button type="primary" :disabled="receiveQuantity>1" @click="setToolInstanceId()">
{{buttons.manualGenerate}}
</el-button>
</el-col>
</el-row>
<el-row>
@ -186,6 +189,33 @@
</el-row>
</el-dialog>
<el-dialog v-drag :close-on-click-modal="false" :visible.sync="toolCodeFlag" width="335px">
<span style="font-size: 13px" slot="title">手工设置工具实例编码</span>
<el-row>
<el-col :span="24">
<el-form :inline="true" label-position="top">
<el-form-item :label="'工具实例编码'">
<el-input v-model="toolInstanceId"></el-input>
</el-form-item>
<el-form-item :label="inputSearch3">
<el-input type="number" @change="initQtyAlert()" oninput="value=value.replace(/^\.+|[^\d.]/g,'')"
v-model="receiveQuantity"></el-input>
</el-form-item>
<el-form-item :label="inputSearch4">
<el-input type="number" oninput="value=value.replace(/^\.+|[^\d.]/g,'')" v-model="serviceLife"></el-input>
</el-form-item>
<el-form-item :label="inputSearch11">
<el-input type="number" oninput="value=value.replace(/^\.+|[^\d.]/g,'')"
v-model="invoicePrice"></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="manualInitMailFlag()">{{'确定'}}</el-button>
<el-button type="primary" @click="toolCodeFlag=false">{{'关闭'}}</el-button>
</span>
</el-dialog>
<el-dialog title="附件信息" :visible.sync="setUp.fileFlag" width="672px" :close-on-click-modal="false"
:close-on-press-escape="false" v-drag>
<el-form :inline="true" label-position="top">
@ -320,6 +350,7 @@
},
data() {
return {
toolCodeFlag: false,
pdfUrl: '',
fileList: [],
//
@ -356,18 +387,21 @@
pdfVisible: false,
torNumacc: '',
torNumdown: '',
//
//
generateFlag: false,
//
//
receiveQuantity: '',
//使寿
// 使寿
serviceLife: '',
//
//
radio: '',
//
//
locationNo: '',
//
//
invoicePrice: 0,
//
toolInstanceId: '',
manual: 'N',
site: this.$store.state.user.site,
addLanguage: false,
functionId: this.$route.meta.menuId,
@ -751,6 +785,7 @@
settingTable: '设置列表',
defaultTable: '设置默认配置',
generate: "生成",
manualGenerate: "手动生成",
print: '打印',
appendixInfo: '附件信息',
fileDownload: '下载',
@ -859,7 +894,7 @@
}
},
activated() {
// this.getDataList()
// this.getDataList()
this.initViewIfsTable();
this.getLanguageList()
},
@ -875,6 +910,9 @@
locationNo() {
this.locationNo = this.locationNo.toUpperCase()
},
toolInstanceId() {
this.toolInstanceId = this.toolInstanceId.toUpperCase()
},
poToolFlag() {
if (this.poToolFlag == false) {
this.initViewIfsTable()
@ -918,21 +956,21 @@
if (data.code == 0) {
let printDataList = []
for (const item of this.currSelectList) {
let printData = {
SupplierName: data.data.SupplierName,
createDate: data.data.createDate,
createdBy: data.data.createdBy,
estUseQty: data.data.estUseQty,
locationId: data.data.locationId,
phaseInDate: data.data.phaseInDate,
site:data.data.site,
spec: data.data.spec,
status:data.data.status,
supplierId: data.data.supplierId,
toolDescription: data.data.toolDescription,
toolId:data.data.toolId,
toolInstanceId: item.toolInstanceId
}
let printData = {
SupplierName: data.data.SupplierName,
createDate: data.data.createDate,
createdBy: data.data.createdBy,
estUseQty: data.data.estUseQty,
locationId: data.data.locationId,
phaseInDate: data.data.phaseInDate,
site: data.data.site,
spec: data.data.spec,
status: data.data.status,
supplierId: data.data.supplierId,
toolDescription: data.data.toolDescription,
toolId: data.data.toolId,
toolInstanceId: item.toolInstanceId
}
printDataList.push(printData)
}
if (val == 'Y') {
@ -950,27 +988,27 @@
//LODOP.SET_LICENSES("", "13F0BE83846277CB60918577C6281375", "", "");
LODOP.SET_LICENSES("", "7B5624CC84E599D6B17F27DF40F4310C", "", "");
//
for(let i = 0; i < printDataList.length; i++){
for (let i = 0; i < printDataList.length; i++) {
let printData = printDataList[i]
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,700,180,"");
LODOP.SET_PRINT_MODE("PRINT_NOCOLLATE",1);
LODOP.ADD_PRINT_RECT(2,5,250,67,0,1);
LODOP.ADD_PRINT_LINE(19,5,18,255,0,1);
LODOP.ADD_PRINT_LINE(36,5,35,205,0,1);
LODOP.ADD_PRINT_LINE(54,5,53,205,0,1);
LODOP.ADD_PRINT_LINE(2,65,69,66,0,1);
LODOP.ADD_PRINT_LINE(68,205,18,206,0,1);
LODOP.ADD_PRINT_BARCODE(21,208,90,60,"QRCode",printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(5,9,60,14,"工具名称");
LODOP.ADD_PRINT_TEXT(21,9,60,15,"工具编号");
LODOP.ADD_PRINT_TEXT(38,9,60,15,"实例编号");
LODOP.ADD_PRINT_TEXT(55,9,60,15,"经办人");
LODOP.ADD_PRINT_TEXT(4,70,180,14,printData.toolDescription);
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.ADD_PRINT_TEXT(21,71,133,14,printData.toolId);
LODOP.ADD_PRINT_TEXT(39,71,133,14,printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(55,71,133,14,printData.createdBy);
LODOP.SET_PRINT_PAGESIZE(0, 700, 180, "");
LODOP.SET_PRINT_MODE("PRINT_NOCOLLATE", 1);
LODOP.ADD_PRINT_RECT(2, 5, 250, 67, 0, 1);
LODOP.ADD_PRINT_LINE(19, 5, 18, 255, 0, 1);
LODOP.ADD_PRINT_LINE(36, 5, 35, 205, 0, 1);
LODOP.ADD_PRINT_LINE(54, 5, 53, 205, 0, 1);
LODOP.ADD_PRINT_LINE(2, 65, 69, 66, 0, 1);
LODOP.ADD_PRINT_LINE(68, 205, 18, 206, 0, 1);
LODOP.ADD_PRINT_BARCODE(21, 208, 90, 60, "QRCode", printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(5, 9, 60, 14, "工具名称");
LODOP.ADD_PRINT_TEXT(21, 9, 60, 15, "工具编号");
LODOP.ADD_PRINT_TEXT(38, 9, 60, 15, "实例编号");
LODOP.ADD_PRINT_TEXT(55, 9, 60, 15, "经办人");
LODOP.ADD_PRINT_TEXT(4, 70, 180, 14, printData.toolDescription);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.ADD_PRINT_TEXT(21, 71, 133, 14, printData.toolId);
LODOP.ADD_PRINT_TEXT(39, 71, 133, 14, printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(55, 71, 133, 14, printData.createdBy);
}
//LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
@ -984,45 +1022,44 @@
//LODOP.SET_LICENSES("", "13F0BE83846277CB60918577C6281375", "", "");
LODOP.SET_LICENSES("", "7B5624CC84E599D6B17F27DF40F4310C", "", "");
//
for(let i = 0; i < printDataList.length; i++){
for (let i = 0; i < printDataList.length; i++) {
let printData = printDataList[i]
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,700,540,"");
LODOP.ADD_PRINT_RECT(6,5,250,190,0,1);
LODOP.ADD_PRINT_LINE(24,5,23,255,0,1);
LODOP.ADD_PRINT_LINE(41,5,40,255,0,1);
LODOP.ADD_PRINT_LINE(58,5,57,255,0,1);
LODOP.ADD_PRINT_LINE(75,5,74,255,0,1);
LODOP.ADD_PRINT_LINE(92,5,91,255,0,1);
LODOP.ADD_PRINT_LINE(109,5,108,255,0,1);
LODOP.ADD_PRINT_LINE(126,5,125,178,0,1);
LODOP.ADD_PRINT_LINE(144,5,143,178,0,1);
LODOP.ADD_PRINT_LINE(162,5,161,178,0,1);
LODOP.ADD_PRINT_LINE(179,5,178,255,0,1);
LODOP.ADD_PRINT_LINE(23,65,195,66,0,1);
LODOP.ADD_PRINT_LINE(178,177,108,178,0,1);
LODOP.ADD_PRINT_BARCODE(110,183,110,85,"QRCode",printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(9,94,100,14,"工具标签");
LODOP.SET_PRINT_STYLEA(0,"Bold",1);
LODOP.ADD_PRINT_TEXT(26,9,60,14,"工具名称");
LODOP.ADD_PRINT_TEXT(43,9,60,15,"规格型号");
LODOP.ADD_PRINT_TEXT(60,9,60,15,"工具编号");
LODOP.ADD_PRINT_TEXT(77,9,60,15,"实例编号");
LODOP.ADD_PRINT_TEXT(94,9,60,15,"厂商");
LODOP.ADD_PRINT_TEXT(111,9,60,15,"入库日期");
LODOP.ADD_PRINT_TEXT(129,9,60,15,"库位");
LODOP.ADD_PRINT_TEXT(147,9,60,15,"经办人");
LODOP.ADD_PRINT_TEXT(181,9,60,15,"检验签章");
LODOP.ADD_PRINT_TEXT(25,72,180,14,printData.toolDescription);
LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
LODOP.ADD_PRINT_TEXT(42,72,180,14,""); //
LODOP.ADD_PRINT_TEXT(60,72,180,14,printData.toolId);
LODOP.ADD_PRINT_TEXT(78,71,180,14,printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(94,71,180,14,printData.SupplierName);
LODOP.ADD_PRINT_TEXT(111,71,95,14,this.dayjs(printData.createDate).format("YYYY-MM-DD"));
LODOP.ADD_PRINT_TEXT(130,71,95,14,printData.locationId);
LODOP.ADD_PRINT_TEXT(148,71,95,14,printData.createdBy);
LODOP.SET_PRINT_PAGESIZE(0, 700, 540, "");
LODOP.ADD_PRINT_RECT(6, 5, 250, 190, 0, 1);
LODOP.ADD_PRINT_LINE(24, 5, 23, 255, 0, 1);
LODOP.ADD_PRINT_LINE(41, 5, 40, 255, 0, 1);
LODOP.ADD_PRINT_LINE(58, 5, 57, 255, 0, 1);
LODOP.ADD_PRINT_LINE(75, 5, 74, 255, 0, 1);
LODOP.ADD_PRINT_LINE(92, 5, 91, 255, 0, 1);
LODOP.ADD_PRINT_LINE(109, 5, 108, 255, 0, 1);
LODOP.ADD_PRINT_LINE(126, 5, 125, 178, 0, 1);
LODOP.ADD_PRINT_LINE(144, 5, 143, 178, 0, 1);
LODOP.ADD_PRINT_LINE(162, 5, 161, 178, 0, 1);
LODOP.ADD_PRINT_LINE(179, 5, 178, 255, 0, 1);
LODOP.ADD_PRINT_LINE(23, 65, 195, 66, 0, 1);
LODOP.ADD_PRINT_LINE(178, 177, 108, 178, 0, 1);
LODOP.ADD_PRINT_BARCODE(110, 183, 110, 85, "QRCode", printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(9, 94, 100, 14, "工具标签");
LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.ADD_PRINT_TEXT(26, 9, 60, 14, "工具名称");
LODOP.ADD_PRINT_TEXT(43, 9, 60, 15, "规格型号");
LODOP.ADD_PRINT_TEXT(60, 9, 60, 15, "工具编号");
LODOP.ADD_PRINT_TEXT(77, 9, 60, 15, "实例编号");
LODOP.ADD_PRINT_TEXT(94, 9, 60, 15, "厂商");
LODOP.ADD_PRINT_TEXT(111, 9, 60, 15, "入库日期");
LODOP.ADD_PRINT_TEXT(129, 9, 60, 15, "库位");
LODOP.ADD_PRINT_TEXT(147, 9, 60, 15, "经办人");
LODOP.ADD_PRINT_TEXT(181, 9, 60, 15, "检验签章");
LODOP.ADD_PRINT_TEXT(25, 72, 180, 14, printData.toolDescription);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.ADD_PRINT_TEXT(42, 72, 180, 14, ""); //
LODOP.ADD_PRINT_TEXT(60, 72, 180, 14, printData.toolId);
LODOP.ADD_PRINT_TEXT(78, 71, 180, 14, printData.toolInstanceId);
LODOP.ADD_PRINT_TEXT(94, 71, 180, 14, printData.SupplierName);
LODOP.ADD_PRINT_TEXT(111, 71, 95, 14, this.dayjs(printData.createDate).format("YYYY-MM-DD"));
LODOP.ADD_PRINT_TEXT(130, 71, 95, 14, printData.locationId);
LODOP.ADD_PRINT_TEXT(148, 71, 95, 14, printData.createdBy);
}
@ -1163,26 +1200,120 @@
}
})
},
//
initMailFlag() {
//
setToolInstanceId() {
this.toolCodeFlag = true
this.toolInstanceId = ''
},
manualInitMailFlag(){
this.generateFlag = true
/*if(this.radio != 'Y' && this.radio != 'N'){
this.$alert('请选择检验方式!', '检验方式', {
if (this.toolInstanceId == null || this.toolInstanceId == '') {
this.$alert('请输入工具实例编码!', '接收数量', {
confirmButtonText: '确定',
callback: action => {
this.receiveQuantity = this.ifsToolData.quantity - this.ifsToolData.generateQuantity
this.generateFlag = false
}
});
return
} else if (this.receiveQuantity == null || this.receiveQuantity == '') {
this.$alert('请输入接收数量!', '接收数量', {
confirmButtonText: '确定',
callback: action => {
this.receiveQuantity = this.ifsToolData.quantity - this.ifsToolData.generateQuantity
this.generateFlag = false
}
});
return
} else if (this.receiveQuantity <= 0) {
this.$alert('请输入正确的接收数量!', '接收数量', {
confirmButtonText: '确定',
callback: action => {
this.receiveQuantity = this.ifsToolData.quantity - this.ifsToolData.generateQuantity
this.generateFlag = false
}
});
return
} else if (this.serviceLife == null || this.serviceLife == '') {
this.$alert('请输入使用寿命!', '使用寿命', {
confirmButtonText: '确定',
callback: action => {
this.serviceLife = 0
this.generateFlag = false
}
});
return
} else if (this.serviceLife <= 0) {
this.$alert('请输入正确的使用寿命!', '使用寿命', {
confirmButtonText: '确定',
callback: action => {
this.serviceLife = 0
this.generateFlag = false
}
});
return
}else if(this.radio == 'Y' && (this.locationNo == null || this.locationNo == '')){
this.$alert('请输入录入库位!', '录入库位', {
} else if (this.invoicePrice <= 0) {
this.$alert('请输入入库价格!', '使用寿命', {
confirmButtonText: '确定',
callback: action => {
this.serviceLife = 0
this.generateFlag = false
}
});
return
}else*/
}
if (this.radio == 'N') {
this.manualSaveToolInstanceId()
} else {
this.manualSaveToolInstanceId()
}
},
manualSaveToolInstanceId(){
let status;
if (this.radio == "Y") {
status = "出库"
} else {
status = "未投用"
}
let saveData = {
site: this.site,
toolId: this.ifsToolData.toolId,
description: this.ifsToolData.description,
userName: this.$store.state.user.name,
locationId: this.locationNo,
vendorNo: this.ifsToolData.vendorNo,
status: status,
estUseQty: this.serviceLife,
torNumacc: this.ifsToolData.torNumacc,
torNumdown: this.ifsToolData.torNumdown,
transactionId: this.ifsToolData.transactionId,
receiveQuantity: this.receiveQuantity,
type: this.radio,
orderNo: this.ifsToolData.orderNo,
releaseNo: this.ifsToolData.releaseNo,
sequenceNo: this.ifsToolData.sequenceNo,
lineItemNo: this.ifsToolData.lineItemNo,
vendorName: this.ifsToolData.vendorName,
invoicePrice: this.invoicePrice,
manual: 'Y',
toolInstanceId: this.toolInstanceId
}
let currQty = this.receiveQuantity
saveToolDetail(saveData).then(({data}) => {
this.generateFlag = false
if (data.code == 0) {
this.ifsToolData.generateQuantity += parseInt(currQty)
this.initPoToolTable()
this.toolCodeFlag = false
this.$message.success(data.msg)
} else {
this.$message.error(data.msg)
}
})
},
//
initMailFlag() {
this.generateFlag = true
if (this.receiveQuantity == null || this.receiveQuantity == '') {
this.$alert('请输入接收数量!', '接收数量', {
confirmButtonText: '确定',
@ -1270,6 +1401,8 @@
lineItemNo: this.ifsToolData.lineItemNo,
vendorName: this.ifsToolData.vendorName,
invoicePrice: this.invoicePrice,
manual: 'N',
toolInstanceId: this.toolInstanceId
}
let currQty = this.receiveQuantity
saveToolDetail(saveData).then(({data}) => {

799
src/views/modules/knifemold/tool-info.vue

@ -1,11 +1,19 @@
<template>
<div>
<fieldset class="customer-field" style="width: 100%; padding: 0.35em 0.75em 0.425em;">
<el-row>
<el-col :span="24">
<el-button @click="initToolHeaderModel('Y')" type="primary">{{ buttons.add }}</el-button>
<el-button @click="initToolHeaderModel('N')" type="primary">{{ buttons.edit }}</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form :inline="true" label-position="top" label-width="100px">
<el-form-item :label="inputLabel.headerInput.label1">
<el-input style="width: 100px;" @focus="initToolHeaderModel()" readonly
<el-form-item>
<el-link slot="label" @click="getBaseList(70)"> {{inputLabel.headerInput.label1}}</el-link>
<el-input style="width: 100px;"
@keyup.enter.native="getHeaderData"
v-model="headerData.toolId"></el-input> <!---->
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label2">
@ -60,236 +68,262 @@
</el-col>
</el-row>
</fieldset>
<el-row>
<fieldset class="customer-field" style="width: 100%; margin-top: 5px">
<legend>工具实例</legend>
<el-col :span="7">
<fieldset class="customer-field" style="width: 98%;">
<el-form :inline="true" label-position="top" label-width="95px" style="padding: 5px;">
<el-form-item>
<el-button @click="initToolModel()" type="primary" v-show="showDefault">{{ buttons.edit }}</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="95px" >
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label1">
<el-select @change="toolInstanceIdChange(currentDetailData.toolInstanceId)"
v-model="currentDetailData.toolInstanceId" placeholder="请选择" style="width: 150px;">
<el-option
v-for="item in selectList.select4"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label2">
<el-input style="width: 150px;" readonly v-model="currentDetailData.status"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label3">
<el-input style="width: 150px;" readonly v-model="currentDetailData.supplierId"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label4">
<el-input style="width: 150px;" readonly v-model="currentDetailData.supplierName"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label5">
<el-input style="width: 150px;" readonly v-model="currentDetailData.strPurchaseDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label6">
<el-input style="width: 150px;" readonly v-model="currentDetailData.steelSeal"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label7">
<el-input style="width: 150px;" readonly v-model="currentDetailData.strPhaseInDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label8">
<el-input style="width: 150px;" readonly v-model="currentDetailData.strPhaseOutDate"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label9">
<el-input style="width: 150px;" readonly v-model="currentDetailData.estUseQty"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label10">
<el-input style="width: 150px;" readonly v-model="currentDetailData.actualUseQty"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label11">
<el-input style="width: 150px;" readonly v-model="currentDetailData.strCreateDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label12">
<el-input style="width: 150px;" readonly v-model="currentDetailData.createdBy"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label13">
<el-input style="width: 150px;" readonly v-model="currentDetailData.orderNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="12"></el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="inputLabel.leftInput.label14">
<el-input style="width: 300px;" readonly v-model="currentDetailData.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</fieldset>
</el-col>
<el-col :span="17">
<fieldset class="customer-field" style="width: 100%; ">
<span> {{inputLabel.rightInput.label1}}</span>
<el-table
width="100%"
:height="height/2"
:data="sfdcToolingHistList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<span> {{inputLabel.rightInput.label2}}</span>
<el-table
width="100%"
:height="height/2"
:data="toolInstanceIdUseHist"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList1" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</fieldset>
</el-col>
</fieldset>
</el-row>
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
<el-tabs style="font-size: 12px" class="customer-tab" v-model="activeName" type="border-card">
<el-tab-pane :label="'工具实例'" name="toolInfo">
<el-row>
<el-col :span="7">
<fieldset class="customer-field" style="width: 98%;">
<legend>数据明细/编辑</legend>
<el-form :inline="true" label-position="top" label-width="95px" style="padding: 5px;">
<el-form-item>
<el-button @click="initToolModel('Y')" type="primary">{{ buttons.add }}</el-button>
<el-button @click="initToolModel('N')" type="primary">{{ buttons.edit }}</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="95px">
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label1">
<el-select @change="toolInstanceIdChange(currentDetailData.toolInstanceId)"
v-model="currentDetailData.toolInstanceId" placeholder="请选择" style="width: 150px;">
<el-option
v-for="item in selectList.select4"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label2">
<el-input style="width: 150px;" readonly v-model="currentDetailData.status"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label3">
<el-input style="width: 150px;" readonly v-model="currentDetailData.supplierId"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label4">
<el-input style="width: 150px;" readonly v-model="currentDetailData.supplierName"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label5">
<el-input style="width: 150px;" readonly v-model="currentDetailData.strPurchaseDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label6">
<el-input style="width: 150px;" readonly v-model="currentDetailData.steelSeal"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label7">
<el-input style="width: 150px;" readonly v-model="currentDetailData.strPhaseInDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label8">
<el-input style="width: 150px;" readonly v-model="currentDetailData.strPhaseOutDate"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label9">
<el-input style="width: 150px;" readonly v-model="currentDetailData.estUseQty"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label10">
<el-input style="width: 150px;" readonly v-model="currentDetailData.actualUseQty"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label11">
<el-input style="width: 150px;" readonly v-model="currentDetailData.strCreateDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label12">
<el-input style="width: 150px;" readonly v-model="currentDetailData.createdBy"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="inputLabel.leftInput.label13">
<el-input style="width: 150px;" readonly v-model="currentDetailData.orderNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="'库位编码'">
<el-input style="width: 150px;" readonly v-model="currentDetailData.locationId"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item :label="inputLabel.leftInput.label14">
<el-input style="width: 300px;" readonly v-model="currentDetailData.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</fieldset>
</el-col>
<el-col :span="17">
<fieldset class="customer-field" style="width: 100%; ">
<legend>{{inputLabel.rightInput.label1}}</legend>
<el-table
width="100%"
:height="height/2"
:data="sfdcToolingHistList"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</fieldset>
<fieldset class="customer-field" style="width: 100%; ">
<legend>{{inputLabel.rightInput.label2}}</legend>
<el-table
width="100%"
:height="height/2"
:data="toolInstanceIdUseHist"
border
v-loading="dataListLoading"
@selection-change="selectionChangeHandle"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList1" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</fieldset>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane :label="'使用该工具的产品清单'" name="tool">
</el-tab-pane>
</el-tabs>
<column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
<!--新增或编辑 工具信息-->
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag
:title="inputLabel.leftInput.label15" :visible.sync="setUp.toolHeaderFlag" width="485px">
<el-form :inline="true" label-position="left">
:title="'工具信息'" :visible.sync="toolHeaderShow" width="473px">
<el-form :inline="true" label-position="top" label-width="100px">
<el-form-item :label="inputLabel.headerInput.label1">
<el-input style="width: 110px;" v-model="queryHeaderData.toolId"></el-input>
<el-input style="width: 100px;" :readonly="!this.toolDetailAddOrEdit" v-model="editHeaderData.toolId"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label2">
<el-input style="width: 110px;" v-model="queryHeaderData.toolDescription"></el-input>
<el-input style="width: 100px;" v-model="editHeaderData.toolDescription"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label3">
<el-input style="width: 100px;" v-model="editHeaderData.spec"></el-input>
</el-form-item>
<el-form-item>
<el-link slot="label" @click="getBaseList(23)"> {{inputLabel.headerInput.label5}}</el-link>
<el-input style="width: 100px;" v-model="editHeaderData.familyId"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label6">
<el-input style="width: 100px;" class="customer-input-color-red" readonly
v-model="editHeaderData.familyName"></el-input>
</el-form-item>
<el-form-item>
<!-- <el-button type="primary">{{ inputLabel.leftInput.label1 }}</el-button> &lt;!&ndash;@click="initViewIfsTable('Y')"&ndash;&gt;-->
<el-button @click="getToolHeaderList()" type="primary" v-show="showDefault">{{ buttons.search }}</el-button>
<el-link slot="label" @click="getBaseList(7)"> {{inputLabel.headerInput.label7}}</el-link>
<el-input style="width: 100px;" readonly v-model="editHeaderData.umid"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label9">
<el-input style="width: 100px;" v-model="editHeaderData.codeNo"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label8">
<el-checkbox style="width: 100px;" v-model="editHeaderData.active"></el-checkbox>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label10">
<el-input style="width: 100px;" v-model="editHeaderData.defaultLocationId"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label13">
<el-input style="width: 215px;" v-model="editHeaderData.remark"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.headerInput.label11">
<el-checkbox style="width: 100px;" v-model="editHeaderData.strPartCreated"></el-checkbox>
</el-form-item>
<el-table
id="commmon3"
height="300px"
:data="toolHeaderList"
border
v-loading="dataListLoading"
style="width: 100%;"
@row-dblclick="rowDblclick">
<el-table-column
v-for="(item,index) in columnList2" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
</el-table-column>
</el-table>
</el-form>
<span slot="footer" class="dialog-footer">
</span>
<el-button type="primary" @click="saveAndUpdateToolHeader()">确定</el-button>
<el-button type="primary" @click="toolHeaderShow = false">取消</el-button>
</span>
</el-dialog>
<!--新增或编辑实例-->
<el-dialog :close-on-click-modal="false" :close-on-press-escape="false" v-drag
:title="inputLabel.leftInput.label15" :visible.sync="setUp.toolEditFlag" width="620px">
:title="inputLabel.leftInput.label15" :visible.sync="setUp.toolEditFlag" width="736px">
<el-form :inline="true" label-position="top">
<el-form-item :label="inputLabel.leftInput.label1">
<el-input style="width: 130px;" readonly v-model="editData.toolInstanceId"></el-input>
<el-input style="width: 130px;" :readonly="toolDetailAddOrEdit" v-model="editData.toolInstanceId"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.leftInput.label2">
<el-input style="width: 130px;" readonly v-model="editData.status"></el-input>
<el-select style="width: 130px;" v-model="editData.status">
<el-option label="未投用" value="未投用"></el-option>
<el-option label="已投用" value="已投用"></el-option>
<el-option label="停用" value="停用"></el-option>
</el-select>
<!-- <el-input style="width: 130px;" :readonly="toolDetailAddOrEdit" v-model="editData.status"></el-input>-->
</el-form-item>
<el-form-item :label="inputLabel.leftInput.label3">
<el-input style="width: 130px;" readonly v-model="editData.supplierId"></el-input>
<el-form-item>
<span slot="label" @click="getBaseList(3)"><el-link>{{'供应商编码'}}</el-link> </span>
<el-input style="width: 130px;" v-model="editData.supplierId"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.leftInput.label4">
<el-input style="width: 130px;" readonly v-model="editData.supplierName"></el-input>
<el-input style="width: 274px;" class="customer-input-color-red" readonly
v-model="editData.supplierName"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item :label="inputLabel.leftInput.label5" style="height: 28px;">
<!-- <el-input style="width: 100px;" v-model="editData.strPurchaseDate"></el-input>-->
<el-date-picker
v-model="editData.strPurchaseDate"
type="date"
value-format='yyyy-MM-dd'
format='yyyy-MM-dd'
placeholder="选择日期"
style="width: 130px;">
</el-date-picker>
@ -300,7 +334,8 @@
<el-form-item :label="inputLabel.leftInput.label7">
<el-date-picker
v-model="editData.strPhaseInDate"
type="date"
value-format='yyyy-MM-dd '
format='yyyy-MM-dd'
placeholder="选择日期"
style="width: 130px;">
</el-date-picker>
@ -308,42 +343,44 @@
<el-form-item :label="inputLabel.leftInput.label8">
<el-date-picker
v-model="editData.strPhaseOutDate"
type="date"
placeholder="选择日期"
value-format='yyyy-MM-dd'
format='yyyy-MM-dd'
style="width: 130px;">
</el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item :label="inputLabel.leftInput.label9">
<el-input style="width: 130px;" v-model="editData.estUseQty"></el-input>
<el-input oninput="value=value.replace(/[^0-9]/g,'')" style="width: 130px;"
v-model="editData.estUseQty"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.leftInput.label10">
<el-input style="width: 130px;" readonly v-model="editData.actualUseQty"></el-input>
<el-input oninput="value=value.replace(/[^0-9]/g,'')" style="width: 130px;"
v-model="editData.actualUseQty"></el-input>
</el-form-item>
<!--<el-form-item :label="inputLabel.leftInput.label11">
<el-input style="width: 130px;" v-model="editData.strCreateDate"></el-input>
<el-form-item :label="'库位编码'">
<el-input style="width: 130px;" v-model="editData.locationId"></el-input>
</el-form-item>
<el-form-item :label="inputLabel.leftInput.label12">
<el-input style="width: 130px;" v-model="editData.createdBy"></el-input>
</el-form-item>-->
</el-form>
<el-form :inline="true" label-position="top">
<el-form-item :label="inputLabel.leftInput.label14">
<el-input style="width: 440px;" v-model="editData.remark"></el-input>
<el-input style="width: 418px;" v-model="editData.remark"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="setUp.toolEditFlag = false">取消</el-button>
<el-button type="primary" :disabled="setUp.saveToolFlag" @click="saveToolDetail()">确定</el-button>
<el-button type="primary" :disabled="setUp.saveToolFlag" @click="saveAndUpdateToolDetail()">确定</el-button>
<el-button type="primary" @click="setUp.toolEditFlag = false">取消</el-button>
</span>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import Chooselist from '@/views/modules/common/Chooselist'
import column from "../common/column";
import {
searchSysLanguagePackList,
@ -373,21 +410,64 @@
getSfdcToolingHistList,
getToolHeaderList,
updateToolDetail,
saveToolInfoDetail,
editToolHeader,
saveToolHeader
} from '@/api/knifemold/tool-info.js'
export default {
components: {
column
column,
Chooselist
},
data() {
return {
activeName: 'toolInfo',
toolHeaderShow: false,
toolHeaderAddOrEdit: false,
toolDetailAddOrEdit: false,
toolHeaderList: [],
queryHeaderData: {
site: this.$store.state.user.site,
toolId: '',
toolDescription: ''
},
editData: {},
editData: {
actualUseQty: 0,
createDate: "",
createdBy: this.$store.state.user.name,
description: null,
estUseQty: 0,
inspectDuration: null,
lastUpdateBy: null,
latestInspectDate: null,
latestUseDate: null,
locationId: null,
phaseInDate: "",
phaseOutDate: "",
purchaseDate: "",
remark: "",
site: this.$store.state.user.site,
status: "",
statusRef: null,
steelSeal: null,
strCreateDate: "",
strLatestInspectDate: null,
strLatestUseDate: null,
strPhaseInDate: "",
strPhaseOutDate: "",
strPurchaseDate: "",
supplierId: "",
supplierName: "",
toolDescription: null,
toolId: "",
toolIndex: null,
toolInstanceId: "",
torNumacc: null,
torNumdown: null,
workCenterNo: null,
},
setUp: {
toolEditFlag: false,
saveToolFlag: false,
@ -496,7 +576,52 @@
strPurchaseDate: '',
},
detailList: [],
headerData: {},
headerData: {
active: "",
codeNo: null,
createDate: "",
createdBy: "",
defaultLocationId: null,
defaultWarehouseId: null,
familyId: null,
familyName: null,
lastUpdateBy: null,
partCreatedFlag: null,
partNo: null,
remark: null,
site: this.$store.state.user.site,
spec: null,
standardCost: null,
strActive: "",
strCreateDate: "",
strPartCreated: "",
toolDescription: "",
toolId: "",
umid: null
},
editHeaderData: {
active: "",
codeNo: null,
createDate: "",
createdBy: "",
defaultLocationId: null,
defaultWarehouseId: null,
familyId: null,
familyName: null,
lastUpdateBy: null,
partCreatedFlag: null,
partNo: null,
remark: null,
site: this.$store.state.user.site,
spec: null,
standardCost: null,
strActive: "",
strCreateDate: "",
strPartCreated: "",
toolDescription: "",
toolId: "",
umid: null
},
site: this.$store.state.user.site,
// table
height: 450,
@ -830,9 +955,27 @@
addOrUpdateVisible: false
}
},
watch: {
editData: {
deep: true,
handler: function (newV, oldV) {
if (this.editData.locationId) {
this.editData.locationId = this.editData.locationId.toUpperCase()
}
}
},
editHeaderData: {
deep: true,
handler: function (newV, oldV) {
if (this.editHeaderData.toolId) {
this.editHeaderData.toolId = this.editHeaderData.toolId.toUpperCase()
}
}
},
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 275;
this.height = window.innerHeight - 310;
})
},
activated() {
@ -841,55 +984,154 @@
this.getLanguageList()
},
methods: {
rowDblclick(row, column, event) {
console.log(row)
console.log(column)
console.log(event)
this.headerData.toolId = row.toolId
this.headerData.toolDescription = row.toolDescription
this.getHeaderData()
this.setUp.toolHeaderFlag = false
getBaseData(val) {
if (this.tagNo === 70) {
this.headerData.toolId = val.ToolID
// this.headerData.toolDescription = val.ToolDescription
this.getHeaderData()
}
if (this.tagNo === 3) {
this.editData.supplierId = val.SupplierID
this.editData.supplierName = val.SupplierName
}
if (this.tagNo === 23) {
this.editHeaderData.familyId = val.FamilyID
this.editHeaderData.familyName = val.FamilyName
}
if (this.tagNo === 7) {
this.editHeaderData.umid = val.UMID
}
},
//
getBaseList(val, number) {
this.number = number
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 3) {
strVal = this.editData.supplierId
}
if (val === 70) {
strVal = this.headerData.toolId
}
if (val === 23) {
strVal = this.editHeaderData.familyId
}
if (val === 7) {
strVal = this.editHeaderData.umid
}
this.$refs.baseList.init(val, strVal)
})
},
getTime(date) {
var json_date = new Date(date).toJSON();
return new Date(new Date(json_date) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
},
saveToolDetail() {
// toolDetail
initToolModel(val) {
this.setUp.toolEditFlag = true
this.setUp.saveToolFlag = false
if (val != 'Y') {
this.toolDetailAddOrEdit = true
this.editData = JSON.parse(JSON.stringify(this.currentDetailData))
} else {
Object.assign(this.$data.editData, this.$options.data.call(this).editData);
this.toolDetailAddOrEdit = false
this.editData.toolInstanceId = this.headerData.toolId
this.editData.locationId = this.headerData.defaultLocationId
this.editData.toolId = this.headerData.toolId
this.editData.status = '未投用'
}
},
async saveAndUpdateToolDetail() {
this.setUp.saveToolFlag = true
this.editData.purchaseDate = this.editData.strPurchaseDate
this.editData.phaseInDate = this.editData.strPhaseInDate
this.editData.phaseOutDate = this.editData.strPhaseOutDate
updateToolDetail(this.editData).then((data) => {
debugger
if (data.code == 0 || data.data.code == 0) {
this.toolInstanceIdChange()
}
this.$alert(data.data.msg, '操作提示', {
confirmButtonText: '确定',
callback: action => {
if (!this.editData.estUseQty || this.editData.estUseQty == 0) {
this.$message.warning('预计使用寿命必须大于0')
}
if (this.toolDetailAddOrEdit) {
await updateToolDetail(this.editData).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
this.setUp.toolEditFlag = false
} else {
this.$message.error(data.msg)
}
});
this.setUp.saveToolFlag = false
})
this.setUp.saveToolFlag = false
})
} else {
await saveToolInfoDetail(this.editData).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
this.setUp.toolEditFlag = false
} else {
this.$message.error(data.msg)
}
this.setUp.saveToolFlag = false
})
}
await this.getDetailList()
this.currentDetailData.toolInstanceId = this.editData.toolInstanceId
this.toolInstanceIdChange()
},
initToolHeaderModel() {
this.toolHeaderList = []
this.setUp.toolHeaderFlag = true
this.queryHeaderData.toolId = ''
this.queryHeaderData.toolDescription = ''
this.getToolHeaderList()
// toolHeader
initToolHeaderModel(val) {
this.toolHeaderShow = true
if (val == 'Y') {
this.toolDetailAddOrEdit = true
Object.assign(this.$data.editHeaderData, this.$options.data.call(this).editHeaderData);
} else {
this.toolDetailAddOrEdit = false
this.editHeaderData = JSON.parse(JSON.stringify(this.headerData))
this.editHeaderData.active = this.headerData.active == 'Y' ? true : false
}
},
saveAndUpdateToolHeader() {
if (!this.editHeaderData.toolId) {
this.$message.warning('工具编号不能为空,请选择')
}
if (!this.editHeaderData.familyId) {
this.$message.warning('工具分类不能为空,请选择')
}
if (!this.editHeaderData.umid) {
this.$message.warning('计量单位不能为空,请选择')
}
this.editHeaderData.active = this.editHeaderData.active ? 'Y' : 'N'
if (this.toolDetailAddOrEdit) {
this.editHeaderData.createdBy = this.$store.state.user.name
saveToolHeader(this.editHeaderData).then(({data}) => {
if (data.code == 0) {
this.toolHeaderShow = false
this.headerData.toolId = this.editHeaderData.toolId
this.getHeaderData()
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
} else {
editToolHeader(this.editHeaderData).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
this.toolHeaderShow = false
this.headerData.toolId = this.editHeaderData.toolId
this.getHeaderData()
} else {
this.$message.warning(data.msg)
}
})
}
},
getToolHeaderList() {
getToolHeaderList(this.queryHeaderData).then(({data}) => {
this.toolHeaderList = data.rows
})
},
initToolModel() {
this.setUp.toolEditFlag = true
this.setUp.saveToolFlag = false
this.editData = JSON.parse(JSON.stringify(this.currentDetailData))
},
//使
getSfdcToolingHistList() {
let queryData = {
@ -926,7 +1168,7 @@
}
})
},
getDetailList() {
async getDetailList() {
this.currentDetailData = {}
this.selectList.select4 = []
this.sfdcToolingHistList = []
@ -936,7 +1178,7 @@
toolId: this.headerData.toolId,
toolDescription: this.headerData.toolDescription,
}
getToolDetailList(queryData).then(({data}) => {
await getToolDetailList(queryData).then(({data}) => {
let list = data.rows
for (let i = 0; i < list.length; i++) {
let selectData = {
@ -956,11 +1198,14 @@
let queryData = {
site: this.site,
toolId: this.headerData.toolId,
toolDescription: this.headerData.toolDescription,
// toolDescription: this.headerData.toolDescription,
}
getToolHeaderData(queryData).then(({data}) => {
this.headerData = data.row
this.getDetailList()
if (data.code == 0) {
this.headerData = data.row ? data.row : this.headerData
this.getDetailList()
}
})
},
//
@ -1196,7 +1441,6 @@
})
})
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
@ -1223,7 +1467,6 @@
},
finishDownload() {
}
},
created() {
@ -1269,4 +1512,28 @@
.el-container:nth-child(7) .el-aside {
line-height: 320px;
}
/deep/ .customer-tab .el-tabs__content {
padding: 3px !important;
}
/deep/ .customer-tab .el-tabs__item {
padding: 0 20px;
height: 30px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
line-height: 30px;
display: inline-block;
list-style: none;
font-size: 12px;
font-weight: 500;
color: #303133;
position: relative;
}
/*统一的input内容颜色样式*/
.customer-input-color-red /deep/ .el-input__inner {
color: red;
}
</style>

8
src/views/modules/purchaseorder/approvalRecord.vue

@ -186,7 +186,7 @@
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
fixed: '',
},
{
userId: this.$store.state.user.name,
@ -201,7 +201,7 @@
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
fixed: '',
},
{
userId: this.$store.state.user.name,
@ -261,7 +261,7 @@
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
fixed: '',
},
{
userId: this.$store.state.user.name,
@ -276,7 +276,7 @@
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
fixed: '',
},
],
// table

5
src/views/modules/shopOrder/shopOrder/common/routingAddAndEdit.vue

@ -216,10 +216,7 @@
this.$message.warning('加工中心编码不能为空!')
return
}
if (!this.selectRow.machSetupTime) {
this.$message.warning('准备时间不能为空!')
return
}
if (!this.selectRow.factorUnit) {
this.$message.warning('请选择产出单位!')
return

4
src/views/modules/sys/user.vue

@ -195,7 +195,7 @@ export default {
return {
showButton: true,
height: 200,
securityHeight: 200,
securityHeight: 300,
specialVisible: false,
siteVisible: false,
currentData: {},
@ -286,7 +286,7 @@ export default {
},
mounted() {
this.$nextTick(() => {
this.securityHeight = window.innerHeight - 400;
this.securityHeight = window.innerHeight - 300;
this.height = window.innerHeight - 200;
})
},

Loading…
Cancel
Save