zouyu
2023-10-13 16c4c1498daae97306c5b4cea9631ffc10b943ac
	modified:   src/const/crud/customerOrder/customerOrderForm.js
modified: src/views/common/ztt-table.vue
modified: src/views/plan/customerorder/customerorder-form.vue
modified: src/views/plan/customerorder/index.vue
modified: src/views/plan/customerorder/sample-customerorder-form.vue
已修改5个文件
645 ■■■■ 文件已修改
src/const/crud/customerOrder/customerOrderForm.js 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/common/ztt-table.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/customerorder-form.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/index.vue 557 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/sample-customerorder-form.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/const/crud/customerOrder/customerOrderForm.js
@@ -26,36 +26,53 @@
  align: 'center',
  addBtn: false,
  addRowBtn: true,
  refreshBtn: false, // 是否显示刷新按钮
  columnBtn: false, // 是否显示显影按钮H
  column: [{
    label: '零件号',
    slot: true,
    formSlot: true,
    cell: true,
    prop: 'partNo',
    minWidth: 200,
    span: 24
  }, {
    label: '零件规格',
    prop: 'customerPartSpec',
    type: 'input',
    cell: true,
    minWidth: 200,
    span: 24
  }, {
    label: '制造属性',
    prop: 'manufactureAttr',
    cell: true,
    type: 'input',
    type: 'select',
    minWidth: 200,
    span: 24,
    dicData:[{
        label: '普通',
        value: 'N'
    },{
        label: '样品',
        value: 'S'
    },{
        label: '研发',
        value: 'D'
    }]
  }, {
    label: '产品名称',
    prop: 'productName',
    cell: true,
    type: 'input',
    minWidth: 200,
    span: 24
  }, {
    label: '产品类型',
    prop: 'productType',
    cell: true,
    type: 'input',
    minWidth: 200,
    span: 24
  }, {
    label: '单位',
@@ -64,6 +81,7 @@
    formSlot: true,
    cell: true,
    type: 'input',
    minWidth: 200,
    span: 24
  }, {
    label: '数量',
@@ -71,6 +89,7 @@
    cell: true,
    type: 'input',
    dataType: 'number',
    minWidth: 200,
    span: 24,
    rules:[{message:'类型必须是数字',trigger:'blur'}]
  }, {
@@ -78,12 +97,16 @@
    prop: 'shippingAddress',
    cell: true,
    type: 'input',
    minWidth: 200,
    span: 24
  }, {
    label: '备注',
    prop: 'remark',
    cell: true,
    type: 'input',
    span: 24
    type: 'textarea',
    minWidth: 200,
    span: 24,
    minRows: 1,
    maxRows: 3
  }, ]
}
src/views/common/ztt-table.vue
@@ -327,7 +327,12 @@
              <template v-else>
                <template v-if="!item.render">
                  <template v-if="item.formatter">
                    <span
                    <span v-if="item.isTag" style="text-align: center;">
                      <el-tag style="width:50px;margin: 3px;" :type="scope.row[item.prop] == 0 ? 'success' : 'info'">
                        <span v-html="item.formatter(scope.row, item, scope.row[item.prop])"></span>
                      </el-tag>
                    </span>
                    <span v-else
                      v-html="
                        item.formatter(scope.row, item, scope.row[item.prop])
                      "
src/views/plan/customerorder/customerorder-form.vue
@@ -32,17 +32,17 @@
            <el-col :span="6">
              <el-form-item label="同步数据来源" prop="sourceId">
                <el-input
                  v-model="dataForm.sourceId"
                  v-model="dataForm.sourceId == 0 ? '同步' : '手动'"
                  placeholder=""
                  :disabled="!ediSource"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="订单号" prop="customerOrderNo">
              <el-form-item label="订单号" prop="contractNo">
                <el-input
                  v-model="dataForm.customerOrderNo"
                  @blur="dataForm.customerOrderNo = $event.target.value.trim()"
                  v-model="dataForm.contractNo"
                  @blur="dataForm.contractNo = $event.target.value.trim()"
                  placeholder=""
                  :disabled="!ediSource"
                ></el-input>
@@ -71,9 +71,9 @@
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="客户订单状态" prop="coState">
              <el-form-item label="客户订单状态" prop="returnStatus">
                <el-select
                  v-model="dataForm.coState"
                  v-model="dataForm.returnStatus"
                  placeholder=""
                  filterable
                  style="width: 100%"
@@ -90,9 +90,9 @@
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="期望交货时间" prop="wantedDeliveryDate">
              <el-form-item label="期望交货时间" prop="deliveryDate">
                <el-date-picker
                  v-model="dataForm.wantedDeliveryDate"
                  v-model="dataForm.deliveryDate"
                  style="width: 100%"
                  type="datetime"
                  value-format="yyyy-MM-dd HH:mm:ss"
@@ -144,9 +144,9 @@
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="销售数量" prop="otcQuantity">
              <el-form-item label="销售数量" prop="buyQtyDue">
                <el-input
                  v-model="dataForm.otcQuantity"
                  v-model="dataForm.buyQtyDue"
                  placeholder=""
                  :disabled="!ediSource"
                ></el-input>
@@ -163,9 +163,9 @@
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="销售件号" prop="salesPartNo">
              <el-form-item label="销售件号" prop="partNo">
                <el-input
                  v-model="dataForm.salesPartNo"
                  v-model="dataForm.partNo"
                  placeholder=""
                  disabled
                >
@@ -224,9 +224,9 @@
              </el-form-item>
            </el-col>
            <el-col :span="6">
              <el-form-item label="业务员" prop="salesmanName">
              <el-form-item label="业务员" prop="salesMan">
                <el-input
                  v-model="dataForm.salesmanName"
                  v-model="dataForm.salesMan"
                  placeholder=""
                  disabled
                ></el-input>
@@ -275,7 +275,7 @@
          </el-row>
          <el-row>
            <el-col :span="6">
              <el-form-item label="产品类型" prop="remark">
              <el-form-item label="产品类型" prop="productType">
                <el-input
                  v-model="dataForm.productType"
                  placeholder=""
@@ -779,7 +779,10 @@
      dataForm: {
        id: 0,
        sourceId: '',
        contractNo: '',
        customerOrderNo: '',
        returnStatus: '',
        deliveryDate: '',
        customerNo: '',
        customerName: '',
        coState: '',
@@ -787,6 +790,7 @@
        partNo: '',
        customerPartName: '',
        otcQuantity: '',
        buyQtyDue: '',
        wantedDeliveryDate: '',
        plannedDeliveryDate: '',
        customerPoNo: '',
@@ -816,7 +820,7 @@
        otherProductRequire: null,
        divisionSystem: null,
        shippingAddress: null,
        salesmanName: null,
        salesMan: null,
        lengthRequirement: null,
        remark: null,
        otcPartSync: null,
src/views/plan/customerorder/index.vue
@@ -424,9 +424,8 @@
          {
            minWidth: '100',
            width: '100px',
            prop: 'customerOrderNo',
            prop: 'contractNo',
            label: '合同编号',
            // label: '订单号',
            sort: true,
            isTrue: true,
            isSearch: true,
@@ -436,8 +435,7 @@
          {
            minWidth: '120',
            prop: 'entityName',
            label: '合同主题',
            sort: false,
            label: '工程名称',
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
@@ -450,6 +448,19 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
            prop: 'sourceId',
            label: '添加来源',
            isTag: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'select',
            formatter: this.getSourceId,
            optList: () => {
              return this.sourceIdList
            }
          },
          {
            minWidth: '200',
@@ -465,42 +476,13 @@
          {
            minWidth: '120',
            prop: 'placeOrderDate',
            label: '签订日期',
            label: '下单日期',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            formatter: this.formatDutyDate
          },
          {
            minWidth: '120',
            prop: 'factoryPlaceOrderDate',
            label: '开始日期',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            formatter: this.formatDutyDate
          },
          {
            minWidth: '120',
            prop: 'endTime',
            label: '终止日期',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
            formatter: this.formatDutyDate
          },
          // {
          //   minWidth: '120',
          //   prop: 'customerNo',
          //   label: '客户编号',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          {
            minWidth: '120',
            prop: 'customerName',
@@ -510,16 +492,6 @@
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '120',
          //   prop: 'customerContractNo',
          //   label: '客户订单号',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          {
            minWidth: '120',
            prop: 'coState',
@@ -546,108 +518,20 @@
              return this.isAuditList
            }
          },
          {
            minWidth: '80',
            prop: 'ifsDeliveryNo',
            label: '合同分类',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '80',
            prop: 'ifsLineItemNo',
            label: '合同来源',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '80',
            prop: 'returnStatus',
            label: '合同状态',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '80',
            prop: 'originalContractStatus',
            label: '出库状态',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
            prop: 'ifsSalesUnit',
            label: '启用状态',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '120',
          //   prop: 'coLineNo',
          //   label: 'GSM行号',
          //   minWidth: '80',
          //   prop: 'sourceId',
          //   label: '订单来源',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // {
          //   minWidth: '120',
          //   prop: 'otcLineNo',
          //   label: 'OTC行号',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // // 状态
          // {
          //   minWidth: '120',
          //   prop: 'otcPartSync',
          //   label: 'OTC推送状态',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'select',
          //   optList: () => {
          //     return this.getOtcPartSyncOptionList()
          //   },
          //   formatter: (row, column, cellValue) => {
          //     var formatVal
          //     if (cellValue == null) {
          //       formatVal = ''
          //     } else if (cellValue) {
          //       formatVal = '已同步'
          //     } else {
          //       formatVal = '未同步'
          //     }
          //     return formatVal
          //   }
          // },
          // {
          //   minWidth: '120',
          //   prop: 'verifyDate',
          //   label: 'OTC审核时间',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'datetimerange'
          // },
          {
            minWidth: '120',
            width: '100px',
            prop: 'partNo',
            label: '零件号',
            label: '产品编号',
            sort: true,
            isTrue: true,
            isSearch: true,
@@ -656,8 +540,8 @@
          {
            minWidth: '120',
            width: '100px',
            prop: 'customerPartName',
            label: '零件名称',
            prop: 'productName',
            label: '产品名称',
            sort: true,
            isTrue: true,
            isSearch: true,
@@ -667,7 +551,7 @@
            minWidth: '120',
            width: '100px',
            prop: 'productType',
            label: '型号',
            label: '产品类型',
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
@@ -676,7 +560,7 @@
            minWidth: '120',
            width: '100px',
            prop: 'otcUnit',
            label: '零件属性',
            label: '单位',
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
@@ -693,45 +577,8 @@
          },
          {
            minWidth: '120',
            width: '100px',
            prop: 'outerColor',
            label: '外护颜色',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
            prop: 'otcQuantity',
            label: '销售数量',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '80',
            prop: 'otcUnit',
            label: '销售单位',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
            prop: 'buyQtyDue',
            label: '库存数量',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '80',
            prop: 'unit',
            label: '零件单位',
            label: '数量',
            sort: true,
            isTrue: true,
            isSearch: true,
@@ -739,253 +586,6 @@
          },
          {
            minWidth: '140',
            prop: 'requireNumber',
            label: '已下发数量',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'customerPartSpec',
            label: '客户零件规格',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'finalCustomerName',
            label: '最终客户名称',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'productGroup',
            label: '产品分组',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'productType',
            label: '产品类型',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'centralizedMiningProperty',
            label: '采集性质',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'orderDescription',
            label: '订单说明',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'division',
            label: '事业部',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'printType',
            label: '印字方式',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'printingRequirements',
            label: '印字要求',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'printContent',
            label: '印字内容',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'packageRequire',
            label: '包装要求',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'qualityRequire',
            label: '质量要求',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'otherProductRequire',
            label: '生产需求说明',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'divisionSystem',
            label: '系统',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'shippingAddress',
            label: '收货地址',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'salesmanName',
            label: '业务员',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'lengthRequirement',
            label: '盘长要求',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'remark',
            label: '订单行备注',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'comment',
            label: '订单头备注',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '80',
          //   prop: 'ifsLineNo',
          //   label: 'IFS行号',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // {
          //   minWidth: '80',
          //   prop: 'ifsDeliveryNo',
          //   label: 'IFS交货号',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // {
          //   minWidth: '80',
          //   prop: 'ifsLineItemNo',
          //   label: 'IFS行项号',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          {
            minWidth: '80',
            prop: 'salesPartNo',
            label: '销售件号',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '80',
            prop: 'salesPartName',
            label: '销售件描述',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            width: '120',
            prop: 'wantedDeliveryDate',
            label: '期望交货时间',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'datetimerange',
            formatter: this.formatDutyDate
          },
          {
            minWidth: '200',
            width: '120',
            prop: 'plannedDeliveryDate',
            label: '计划交货时间',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'datetimerange',
            formatter: this.formatDutyDate
          },
          {
            minWidth: '120',
            prop: 'manufactureAttr',
            label: '制造属性',
            sort: true,
@@ -994,20 +594,56 @@
            searchInfoType: 'select',
            formatter: this.getManufactureAttr,
            optList: () => {
              return this.manufactureAttrs
              return this.manufactureAttrList
            }
          }
          // {
          //   minWidth: '200',
          //   width: '120',
          //   prop: 'createTime',
          //   label: '创建时间',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'datetimerange',
          //   formatter: this.formatDutyDate
          // }
          },
          {
            minWidth: '140',
            prop: 'customerPartSpec',
            label: '规格型号',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'returnStatus',
            label: '合同正本状态',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'originalContractStatus',
            label: '正本状态',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            prop: 'salesMan',
            label: '业务员',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '140',
            width: '120',
            prop: 'deliveryDate',
            label: '交货时间',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'datetimerange',
            formatter: this.formatDutyDate
          },
        ],
        toolbar: [],
        operator: [
@@ -1048,7 +684,7 @@
        operatorConfig: {
          fixed: 'right',
          label: '操作',
          width: 260,
          width: 100,
          minWidth: 100
        }
      },
@@ -1079,6 +715,16 @@
          label: '订单编辑'
        }
      ],
      manufactureAttrList: [{
        label: '普通',
        value: 'N'
      },{
        label: '样品',
        value: 'S'
      },{
        label: '研发',
        value: 'D'
      }],
      isAuditList: [
        {
          value: '01draft',
@@ -1097,6 +743,13 @@
          label: '退回'
        }
      ],
      sourceIdList: [{
        label: '同步',
        value: '0'
      },{
        label: '手动',
        value: '1'
      }],
      stockVisible: false,
      partName: null,
      showPullCustomerOrderVisible: false,
@@ -1171,7 +824,7 @@
    this.initQueryParams()
  },
  created() {
    this.getManufactureAttrs()
    // this.getManufactureAttrs()
    this.getTitles()
    /**
     * {
@@ -1593,23 +1246,31 @@
      })
      return cellValue
    },
    getManufactureAttr(row, column, cellValue) {
      this.manufactureAttrs.forEach((obj) => {
    getSourceId(row, column, cellValue) {
      this.sourceIdList.forEach((obj) => {
        if (obj.value === cellValue) {
          cellValue = obj.label
        }
      })
      return cellValue
    },
    getManufactureAttrs() {
      remote('manufacture_attr_type').then((response) => {
        if (response.data.code === 0) {
          this.manufactureAttrs = response.data.data
        } else {
          this.manufactureAttrs = []
    getManufactureAttr(row, column, cellValue) {
      this.manufactureAttrList.forEach((obj) => {
        if (obj.value === cellValue) {
          cellValue = obj.label
        }
      })
      return cellValue
    },
    // getManufactureAttrs() {
    //   remote('manufacture_attr_type').then((response) => {
    //     if (response.data.code === 0) {
    //       this.manufactureAttrs = response.data.data
    //     } else {
    //       this.manufactureAttrs = []
    //     }
    //   })
    // },
    getTitles() {
      remote('order_export_title_type').then((response) => {
        if (response.data.code === 0) {
src/views/plan/customerorder/sample-customerorder-form.vue
@@ -143,6 +143,7 @@
    </el-divider>
    <div>
      <avue-crud ref="crud"
        show-hide="false"
        :option="option"
        :data="tableData">
          <template slot="partNo" slot-scope="scope">
@@ -482,6 +483,20 @@
      this.dataForm.placeOrderDate = null
      this.dataForm.factoryPlaceOrderDate = null
      this.dataForm.deliveryDate = null
      this.dataForm.customerOrderVOList = [{
          "$cellEdit": true,
          "$index": 0,
          "partNo": "",
          "customerPartSpec": "",
          "manufactureAttr": "",
          "productName": "",
          "productType": "",
          "otcUnit": "",
          "buyQtyDue": "",
          "shippingAddress": "",
          "remark": "",
          "isTrusted": true
      }]
    },
    // 表单提交
    dataFormSubmit() {
@@ -492,6 +507,7 @@
          addObj(this.dataForm)
            .then((data) => {
              this.$message.success('添加成功')
              this.initDataForm();
              this.visible = false
              this.buttonDisable = false
              this.$emit('refreshDataList', 1)