采购、装配
This commit is contained in:
@@ -259,6 +259,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sleep } from '../../../utils/tool'
|
||||
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG } from '../../../api/TechnologyCenter/ImportParts'
|
||||
export default {
|
||||
name: 'SpecificationData',
|
||||
@@ -479,13 +480,15 @@ export default {
|
||||
},
|
||||
async transferData() {
|
||||
try {
|
||||
this.err = 0
|
||||
if (this.groupValue) {
|
||||
this.listLoading = true
|
||||
if (this.groupValue.indexOf('MX') > -1) {
|
||||
for (let i = 0; i < this.tableDataAll.length; i++) {
|
||||
const data = this.tableDataAll[i]
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.数据类型, data.是否传递, data.序号, data.id)
|
||||
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, 1, data.是否传递, data.序号, data.id)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
this.err++
|
||||
}
|
||||
@@ -496,11 +499,12 @@ export default {
|
||||
const data = this.tableDataAll[i]
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
if (this.groupValue.indexOf('WG') > -1) {
|
||||
dataType = 1
|
||||
} else {
|
||||
dataType = 2
|
||||
} else {
|
||||
dataType = 1
|
||||
}
|
||||
const resp = await transferWG(data.组件流水号, data.物料流水号, total, data.备注, data.标记, data.设计者编号, data.是否传递, dataType, data.序号, data.id)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
this.err++
|
||||
this.$notify.error(`传递零件失败`)
|
||||
|
||||
Reference in New Issue
Block a user