| | |
| | | item.indexOf('工序编号')!==-1|| |
| | | |
| | | item.indexOf('仓库编码')!==-1|| |
| | | item.indexOf('库位编码')!==-1 |
| | | item.indexOf('库位编码')!==-1|| |
| | | item.indexOf('工序编码')!==-1|| |
| | | item.indexOf('计件单价')!==-1 |
| | | " |
| | | > |
| | | <el-input v-model="row[item]" placeholder="请输入" /> |
| | |
| | | } |
| | | } |
| | | |
| | | if (this.sheetName.indexOf('节拍工价') !== -1) { |
| | | const res = this.handleMeterPriceSubmitData() |
| | | if (res.code !== '200') { |
| | | return this.$message.info(res.message) |
| | | } |
| | | } |
| | | |
| | | if (this.sheetName.indexOf('库位设置') !== -1) { |
| | | const res = this.handleStorageListSubmitData() |
| | | if (res.code !== '200') { |
| | |
| | | delete (item.uuid) |
| | | }) |
| | | this.tableData[1].map(item => { |
| | | delete (item.uuid) |
| | | }) |
| | | |
| | | return { code: '200', message: '成功!' } |
| | | }, |
| | | // 处理仓库设置提交数据 |
| | | handleMeterPriceSubmitData() { |
| | | let flag = true |
| | | let msg = '' |
| | | |
| | | this.tableData[0].forEach(j => { |
| | | if (!j['*产品编码']) { |
| | | flag = false |
| | | msg = '*产品编码' |
| | | } |
| | | if (!j['*工序编码']) { |
| | | flag = false |
| | | msg = '*工序编码' |
| | | } |
| | | if (!j['*计件单价']) { |
| | | flag = false |
| | | msg = '*计件单价' |
| | | } |
| | | }) |
| | | |
| | | if (!flag) { |
| | | return { code: '301', message: msg + '不能为空!' } |
| | | } |
| | | |
| | | this.tableData[0].map(item => { |
| | | delete (item.uuid) |
| | | }) |
| | | |
| | |
| | | '描述': '' |
| | | }) |
| | | } |
| | | // 节拍工价新增行 |
| | | if (this.sheetName.indexOf('节拍工价') !== -1) { |
| | | this.tableData[0].unshift({ |
| | | uuid: nanoid(), |
| | | '*产品编码': '', |
| | | '*工序编码': '', |
| | | '*计件单价': '' |
| | | }) |
| | | } |
| | | // 往来单位 |
| | | if (this.sheetName.indexOf('往来单位类型') !== -1 && this.activeName === '0') { |
| | | this.tableData[0].unshift({ |