小小儁爺
2024-06-04 c735107881df314cc60235f099447da82147bbae
src/views/workOrder/workOrderList.vue
@@ -206,7 +206,7 @@
          </el-table-column>
          <el-table-column
            prop="saleOrderCode"
            label="销售订单"
            label="销售订单/预测单"
            sortable="custom"
            show-tooltip-when-overflow
            min-width="160"
@@ -252,6 +252,30 @@
          >
            <template slot-scope="{row}">
              <div v-if="row.partspec">{{ row.partspec }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="TopInventoryCode"
            label="顶级物料编码"
            sortable="custom"
            show-tooltip-when-overflow
            min-width="130"
          >
            <template slot-scope="{row}">
              <div v-if="row.TopInventoryCode">{{ row.TopInventoryCode }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="TopInventoryName"
            label="顶级物料名称"
            sortable="custom"
            show-tooltip-when-overflow
            min-width="130"
          >
            <template slot-scope="{row}">
              <div v-if="row.TopInventoryName">{{ row.TopInventoryName }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
@@ -336,7 +360,7 @@
                    :style="{color:$store.state.settings.theme}"
                    class="el-icon-printer"
                    style="cursor: pointer;margin-right: 15px"
                    @click.stop="handlePrint(row.wo_code,row.saleOrderCode)"
                    @click.stop="handlePrint(row.wo_code,row.saleOrderCode,row.TopInventoryName)"
                  />
                </el-tooltip>
@@ -613,6 +637,15 @@
        <el-form-item label="产品规格" prop="partspec">
          <el-input v-model="dialogForm.partspec" disabled style="width: 200px" />
        </el-form-item>
        <el-form-item v-if="operation!=='add'" label="顶级物料编码" prop="TopInventoryCode">
          <el-input v-model="dialogForm.TopInventoryCode" disabled style="width: 200px" />
        </el-form-item>
        <el-form-item v-if="operation!=='add'" label="顶级物料名称" prop="TopInventoryName">
          <el-input v-model="dialogForm.TopInventoryName" disabled style="width: 200px" />
        </el-form-item>
        <!--        :disabled="dialogForm.partcode===''"-->
        <el-form-item label="所属车间" prop="wkshopcode">
          <el-select
@@ -1099,6 +1132,7 @@
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="plan_qty"
            label="任务数量"
@@ -1270,6 +1304,9 @@
                <el-form-item label="产品规格:" class="formContent">
                  {{ formApprove.partspec }}
                </el-form-item>
                <el-form-item label="顶级物料:" class="formContent">
                  {{ formApprove.TopInventoryName }}
                </el-form-item>
                <el-form-item label="工单数量:" class="formContent">
                  {{ formApprove.plan_qty }}
                </el-form-item>
@@ -1347,22 +1384,29 @@
          <el-table-column
            id="column4"
            prop="good_qty"
            width="100"
            width="60"
            align="center"
            label="合格数量"
            label="合格"
          />
          <el-table-column
            id="column5"
            width="100"
            width="60"
            prop="ng_qty"
            align="center"
            label="不良数量"
            label="不良"
          />
          <el-table-column
            id="column6"
            prop="desc"
            align="center"
            width="120"
            width="100"
            label="检验员"
          />
          <el-table-column
            id="column6"
            prop="desc"
            align="center"
            width="100"
            label="备注"
          />
        </el-table>
@@ -2056,6 +2100,10 @@
        deliverydate: '', // 交付时间
        data_sources: '', // 数据来源
        idTopInventory: '', // 顶级物料id
        TopInventoryCode: '', // 顶级物料编码
        TopInventoryName: '', // 顶级物料名称
        mesmaxqty: 0// 工单的最大值
      },
      ordertypeArr: [// 工单类型
@@ -2143,6 +2191,7 @@
        partname: '',
        partspec: '',
        plan_qty: '',
        TopInventoryName: '',
        routename: '',
        lm_date: ''
      },
@@ -2517,6 +2566,10 @@
      this.dialogForm.deliverydate = row.saleOrderDeliveryDate.substring(0, 11)
      this.dialogForm.mesqty = row.plan_qty
      this.dialogForm.TopInventoryCode = row.TopInventoryCode
      this.dialogForm.TopInventoryName = row.TopInventoryName
      this.dialogForm.idTopInventory = row.idTopInventory
      const data = {
        sourceid: this.dialogForm.sourceorderid,
        sourcewo: this.dialogForm.sourceorder,
@@ -2612,6 +2665,10 @@
        mesqty: '', // 工单数量
        wkshopcode: '', // 生产车间编码
        wkshopname: '', // 生产车间名称
        idTopInventory: '', // 顶级物料id
        TopInventoryCode: '', // 顶级物料编码
        TopInventoryName: '', // 顶级物料名称
        deliverydate: '', // 交付时间
        data_sources: '' // 数据来源
@@ -2731,12 +2788,14 @@
      this.dialogVisibleSearch = false
    },
    // 处理打印
    handlePrint(wo_code, saleOrderCode) {
    handlePrint(wo_code, saleOrderCode, TopInventoryName) {
      // const number = Math.random() * Math.random()
      // this.number = number === 0 ? (10 + Math.random()) : number
      // console.log(number)
      this.formApprove.saleOrderCode = this.formApprove.saleOrderCode !== '' ? this.formApprove.saleOrderCode : saleOrderCode
      this.formApprove.TopInventoryName = TopInventoryName || '/'
      const data2 = {
        mesordercode: wo_code || this.dialogForm.mesordercode
@@ -2834,6 +2893,7 @@
      this.formApprove.plan_qty = ''
      this.formApprove.routename = ''
      this.formApprove.lm_date = ''
      this.formApprove.TopInventoryName = ''
      // this.$refs.qrCodeDiv0.title = ''