gaoluyang
2025-02-19 0f18c4e3a4943dd27e2eeb381e3c00e46218077b
铜材料下单-联调
已修改6个文件
89 ■■■■■ 文件已修改
src/api/business/rawMaterialOrder.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/copperOrder.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/customsInspection.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrder/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/rawMaterialOrder.js
@@ -44,7 +44,7 @@
// 获取当前登录的客户信息
export function getUserNow(query) {
  return request({
    url: '/user/getUserNow',
    url: '/system/newUser/getUserNow',
    method: 'get',
  })
}
@@ -138,7 +138,7 @@
// 铜单丝下单
export function addRawCopperOrder(query) {
  return request({
    url: '/insOrder/addRawCopperOrder',
    url: '/rawMaterialOrder/addRawCopperOrder',
    method: 'post',
    data: query
  })
src/router/index.js
@@ -100,12 +100,18 @@
    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' }
      },
    ],
  },
src/views/business/materialOrder/copperOrder.vue
@@ -515,8 +515,6 @@
      bsm2: false,
      bsm2Val: null,
      bsm2Dia: false,
      bsm2Val2: [],
      bsm2Val3: [],
      bsmRow3: null,
      bsm3Val: null,
      bsm3Dia: false,
@@ -649,7 +647,6 @@
        item.quantity = 1
      })
      this.count++
      this.computationalPairing(this.sampleList.length)
    },
    noNeedCheck () {
      this.$refs['addObj'].validate((valid) => {
@@ -902,10 +899,6 @@
            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
@@ -1148,9 +1141,13 @@
    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) {
@@ -1165,8 +1162,6 @@
            }
            a.insProduct = a.insProduct.filter(b=>b.state === 1)
            return a
          })),
          pairing: JSON.stringify(this.bsm2Val2)
        })
      }).then(res => {
        this.saveLoad = false
@@ -1333,8 +1328,6 @@
        this.sampleList.push(this.HaveJson(this.sample))
        // this.count++
      }
      this.computationalPairing(this.sampleList.length)
      this.bsm2Val2 = this.HaveJson(this.bsm2Val3)
    },
    selectSample(val) {
      this.sampleIds = []
@@ -1463,13 +1456,6 @@
      }
      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) {
src/views/business/materialOrder/customsInspection.vue
@@ -432,6 +432,7 @@
<script>
import {
  addExemptionOrder,
  addInsOrder,
  addRawMaterOrderTemplate, delRawMaterOrderTemplate,
  getInsOrder,
@@ -995,9 +996,8 @@
      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
@@ -1014,9 +1014,8 @@
            }
            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
@@ -1046,9 +1045,8 @@
      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
@@ -1065,9 +1063,8 @@
            }
            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
src/views/business/materialOrder/index.vue
@@ -237,14 +237,14 @@
            if (params == 1) {
              return '过期物料'
            } else {
              return ''
              return null
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'info'
            } else {
              return ''
              return null
            }
          }
        },
@@ -306,14 +306,14 @@
            if (params == 1) {
              return '过期物料'
            } else {
              return ''
              return null
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'info'
            } else {
              return ''
              return null
            }
          }
        },
@@ -381,14 +381,14 @@
            if (params == 1) {
              return '过期物料'
            } else {
              return ''
              return null
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'info'
            } else {
              return ''
              return null
            }
          }
        },
@@ -494,14 +494,14 @@
            if (params == 1) {
              return '过期物料'
            } else {
              return ''
              return null
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'info'
            } else {
              return ''
              return null
            }
          }
        },
@@ -560,14 +560,14 @@
            if (params == 1) {
              return '过期物料'
            } else {
              return ''
              return null
            }
          },
          formatType: (params) => {
            if (params == 1) {
              return 'info'
            } else {
              return ''
              return null
            }
          }
        },
src/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue
@@ -63,7 +63,7 @@
            } else if (params == 3) {
              return '不判定'
            } else {
              return ''
              return null
            }
          },
          formatType: (params) => {
@@ -74,7 +74,7 @@
            } else if (params == 3) {
              return ''
            }  else {
              return ''
              return null
            }
          }
        },