更新
This commit is contained in:
@@ -189,6 +189,7 @@ export default {
|
||||
return
|
||||
} else {
|
||||
if (this.worksheet[j].M2.v === '00-MX') {
|
||||
this.group = this.worksheet[j].M2.v
|
||||
if (this.worksheet[j].M2.v.substring(0, 1) !== '9') {
|
||||
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
|
||||
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
|
||||
@@ -278,7 +279,7 @@ export default {
|
||||
if (classificationCode) {
|
||||
drawingNum += '-' + classificationCode
|
||||
}
|
||||
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, this.group, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
} else {
|
||||
this.loading = false
|
||||
this.disabled = false
|
||||
@@ -310,8 +311,9 @@ export default {
|
||||
},
|
||||
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
|
||||
try {
|
||||
console.log(useNum, 232)
|
||||
if (groupNum.indexOf('MX') > -1) {
|
||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
@@ -320,7 +322,7 @@ export default {
|
||||
this.$notify.error(`${drawingNum}导入重复`)
|
||||
}
|
||||
} else {
|
||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
console.log(res)
|
||||
if (res[0].result === '0') {
|
||||
|
||||
@@ -554,7 +554,7 @@ export default {
|
||||
const index = data.图号或者型号.lastIndexOf('-')
|
||||
data.图号或者型号 = data.图号或者型号.substring(index + 1)
|
||||
if (data.图号或者型号.indexOf('组') > -1) {
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
const total = parseInt(data.备件数量) + parseFloat(data.装机数量) * parseInt(data.部件数量)
|
||||
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.id, data.备件数量, data.部件数量)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
@@ -563,7 +563,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
console.log(222222222)
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
const total = parseInt(data.备件数量) + parseFloat(data.装机数量) * parseInt(data.部件数量)
|
||||
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.id, data.备件数量)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
@@ -575,7 +575,7 @@ export default {
|
||||
for (let i = 0; i < this.tableDataAll.length; i++) {
|
||||
let dataType
|
||||
const data = this.tableDataAll[i]
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
const total = parseInt(data.备件数量) + parseFloat(data.装机数量) * parseInt(data.部件数量)
|
||||
if (this.groupName.indexOf('WG') > -1) {
|
||||
dataType = 2
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user