| | |
| | | // 获取当前登录的客户信息 |
| | | export function getUserNow(query) { |
| | | return request({ |
| | | url: '/user/getUserNow', |
| | | url: '/system/newUser/getUserNow', |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | // 铜单丝下单 |
| | | export function addRawCopperOrder(query) { |
| | | return request({ |
| | | url: '/insOrder/addRawCopperOrder', |
| | | url: '/rawMaterialOrder/addRawCopperOrder', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | |
| | | permissions: ["business:order"], |
| | | children: [ |
| | | { |
| | | // 原材料下单 |
| | | path: 'customsInspection', |
| | | component: () => import('@/views/business/materialOrder/customsInspection'), |
| | | name: 'customsInspection', |
| | | meta: { title: '原材料下单详情', activeMenu: '/business/materialOrder' } |
| | | }, |
| | | { |
| | | // 铜材料下单 |
| | | path: "customsInspection", |
| | | component: () => |
| | | import("@/views/business/materialOrder/customsInspection"), |
| | | name: "customsInspection", |
| | | meta: { title: "铜材料下单", activeMenu: "/business/materialOrder" }, |
| | | path: 'copperOrder', |
| | | component: () => import('@/views/business/materialOrder/copperOrder'), |
| | | name: 'copperOrder', |
| | | meta: { title: '铜材料下单', activeMenu: '/business/materialOrder' } |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | bsm2: false, |
| | | bsm2Val: null, |
| | | bsm2Dia: false, |
| | | bsm2Val2: [], |
| | | bsm2Val3: [], |
| | | bsmRow3: null, |
| | | bsm3Val: null, |
| | | bsm3Dia: false, |
| | |
| | | item.quantity = 1 |
| | | }) |
| | | this.count++ |
| | | this.computationalPairing(this.sampleList.length) |
| | | }, |
| | | noNeedCheck () { |
| | | this.$refs['addObj'].validate((valid) => { |
| | |
| | | this.$message.error('请选择检验标准') |
| | | return |
| | | } |
| | | // if (!this.sampleList.every(m => m.quantity)) { |
| | | // this.$message.error('请选择待检项数量') |
| | | // return |
| | | // } |
| | | const sampleList = this.HaveJson(this.sampleList) |
| | | sampleList.forEach(item => { |
| | | item.quantity = 1 |
| | |
| | | saveMethod(sampleList){ |
| | | this.saveLoad = true |
| | | addRawCopperOrder({ |
| | | str: JSON.stringify({ |
| | | insOrder: this.addObj, |
| | | list: JSON.stringify(sampleList.map(a => { |
| | | copperInsOrder: this.addObj, |
| | | sampleList: sampleList.map(a => { |
| | | if (a.insProduct.length > 0) { |
| | | a.insProduct.forEach(c => { |
| | | delete c.id |
| | | }) |
| | | } |
| | | if (a.modelNum) { |
| | | const index = a.modelNum.indexOf('×') |
| | | if (index === 0) { |
| | |
| | | } |
| | | a.insProduct = a.insProduct.filter(b=>b.state === 1) |
| | | return a |
| | | })), |
| | | pairing: JSON.stringify(this.bsm2Val2) |
| | | }) |
| | | }).then(res => { |
| | | this.saveLoad = false |
| | |
| | | this.sampleList.push(this.HaveJson(this.sample)) |
| | | // this.count++ |
| | | } |
| | | this.computationalPairing(this.sampleList.length) |
| | | this.bsm2Val2 = this.HaveJson(this.bsm2Val3) |
| | | }, |
| | | selectSample(val) { |
| | | this.sampleIds = [] |
| | |
| | | } |
| | | backtrack([], nums); |
| | | return result; |
| | | }, |
| | | computationalPairing(n) { |
| | | const nums = []; |
| | | for (let i = 1; i <= n; i++) { |
| | | nums.push(i); |
| | | } |
| | | this.bsm2Val3 = this.HaveJson(this.permute(nums)) |
| | | }, |
| | | tableRowClassName({row, rowIndex}) { |
| | | if (row.state === 0) { |
| | |
| | | |
| | | <script> |
| | | import { |
| | | addExemptionOrder, |
| | | addInsOrder, |
| | | addRawMaterOrderTemplate, delRawMaterOrderTemplate, |
| | | getInsOrder, |
| | |
| | | this.addObj.ifsInventoryId = this.customsInspection.id |
| | | this.noNeedCheckLoad = true |
| | | addExemptionOrder({ |
| | | str: JSON.stringify({ |
| | | insOrder: this.addObj, |
| | | list: JSON.stringify(sampleList.map(a => { |
| | | list: sampleList.map(a => { |
| | | if (a.modelNum) { |
| | | // 根据x号判断型号参数与样品型号的拼接位置 |
| | | // 例如×4,就为500ML×4;4×,就为4×500ML |
| | |
| | | } |
| | | a.insProduct = a.insProduct.filter(b=>b.state === 1) |
| | | return a |
| | | })), |
| | | pairing: JSON.stringify(pairing) |
| | | }) |
| | | }), |
| | | pairing: pairing |
| | | }).then(res => { |
| | | this.noNeedCheckLoad = false |
| | | if (res.code == 201) return |
| | |
| | | this.addObj.ifsInventoryId = this.customsInspection.id |
| | | this.saveLoad = true |
| | | addInsOrder({ |
| | | str: JSON.stringify({ |
| | | insOrder: this.addObj, |
| | | list: JSON.stringify(sampleList.map(a => { |
| | | list: sampleList.map(a => { |
| | | if (a.modelNum) { |
| | | // 根据x号判断型号参数与样品型号的拼接位置 |
| | | // 例如×4,就为500ML×4;4×,就为4×500ML |
| | |
| | | } |
| | | a.insProduct = a.insProduct.filter(b=>b.state === 1) |
| | | return a |
| | | })), |
| | | pairing: JSON.stringify(pairing) |
| | | }) |
| | | }), |
| | | pairing: pairing |
| | | }).then(res => { |
| | | this.saveLoad = false |
| | | if (res.code == 201) return |
| | |
| | | if (params == 1) { |
| | | return '过期物料' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (params == 1) { |
| | | return '过期物料' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (params == 1) { |
| | | return '过期物料' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (params == 1) { |
| | | return '过期物料' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | |
| | | if (params == 1) { |
| | | return '过期物料' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | |
| | | } else if (params == 3) { |
| | | return '不判定' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | |
| | | } else if (params == 3) { |
| | | return '' |
| | | } else { |
| | | return '' |
| | | return null |
| | | } |
| | | } |
| | | }, |