Kaynağa Gözat

Merge branch 'dev' into test

hezhanp 10 ay önce
ebeveyn
işleme
0b09d47849

+ 9 - 0
src/api/saleManage/saleorder.js

@@ -182,3 +182,12 @@ export async function saveOrderBomList(data) {
   return res.data.code
   // return Promise.reject(new Error(res.data.message));
 }
+//预销售编码修改
+export async function updateOrderInfo(data) {
+  const res = await request.post(`/eom/saleorder/updateOrderInfo`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+  
+}

+ 2 - 2
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -110,13 +110,13 @@
               default-expand-all
             />
           </el-form-item>
-          <el-form-item label="预销售订单编码" prop="preOrderNo">
+          <!-- <el-form-item label="预销售订单编码" prop="preOrderNo">
             <el-input
               clearable
               v-model="form.preOrderNo"
               placeholder="请输入"
             />
-          </el-form-item>
+          </el-form-item> -->
 
           <el-form-item label="订单类型" prop="needProduce">
             <el-radio

+ 740 - 714
src/views/saleManage/saleOrder/index.vue

@@ -62,7 +62,7 @@
                 <el-button
                   size="small"
                   type="danger"
-                  el-icon-delete
+                  icon="el-icon-delete"
                   class="ele-btn-icon"
                   @click="allDelBtn"
                   v-if="$hasPermission('eom:saleorder:delete')"
@@ -104,7 +104,7 @@
                   >打印</el-button
                 > -->
               </template>
-                
+
               <!-- 查看详情列 -->
               <template v-slot:relationCode="{ row }">
                 <el-link
@@ -124,6 +124,15 @@
                   {{ row.orderNo }}
                 </el-link>
               </template>
+              <!-- 预销售订单编码 -->
+              <template v-slot:preOrderNo="{ row }">
+                <el-input
+                  v-model="row.preOrderNo"
+                  @keyup.enter.native="handlePreOrderNoBlur(row)"
+                  style="width: 100%; padding: 0 4px"
+                  placeholder="请输入预销售编码"
+                ></el-input>
+              </template>
               <!-- 操作列 -->
               <template v-slot:action="{ row }">
                 <el-link
@@ -342,760 +351,777 @@
       :add-or-edit-dialog-flag.sync="addEntrustedReceiveFlag"
       v-if="addEntrustedReceiveFlag"
     ></addEntrustedReceive>
-    <printTemplateSaleOrder :groupName="groupName" ref="printTemplateSaleOrderRef"></printTemplateSaleOrder>
+    <printTemplateSaleOrder
+      :groupName="groupName"
+      ref="printTemplateSaleOrderRef"
+    ></printTemplateSaleOrder>
   </div>
 </template>
 
 <script>
-  import searchTable from './components/searchTable.vue';
-  import addDialog from './components/addDialog.vue';
-  import invoice from './invoice/index.vue';
-  import invoiceConfirm from './invoiceConfirm/index.vue';
-  import detailDialog from './components/detailDialog.vue';
-  import exceptionList from './exceptionManagement/exceptionList';
-  import bomDialog from './components/bomDialog';
+import searchTable from './components/searchTable.vue';
+import addDialog from './components/addDialog.vue';
+import invoice from './invoice/index.vue';
+import invoiceConfirm from './invoiceConfirm/index.vue';
+import detailDialog from './components/detailDialog.vue';
+import exceptionList from './exceptionManagement/exceptionList';
+import bomDialog from './components/bomDialog';
 
-  import drawer from './components/drawer.vue';
-  import contractrDetail from '@/views/contractManage/contractBook/components/detailDialog.vue';
-  import addInvoiceDialog from '@/views/saleManage/saleOrder/invoice/components/addInvoiceDialog';
-  import addReturnGoodsDialog from '@/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog';
-  import popModal from '@/components/pop-modal';
-  import accountstatement from './accountstatement/index.vue';
-  import customerReturnOrder from './customerReturnOrder/index.vue';
-  import returnGoods from './returnGoods/index.vue';
-  import palletManagement from './palletManagement/index.vue';
-  import addInvoiceManage from '@/views/financialManage/invoiceManage/components/addOrEditDialog.vue';
-  import addEntrustedReceive from '@/views/saleManage/saleOrder/entrustedReceive/components/addOrEditDialog';
+import drawer from './components/drawer.vue';
+import contractrDetail from '@/views/contractManage/contractBook/components/detailDialog.vue';
+import addInvoiceDialog from '@/views/saleManage/saleOrder/invoice/components/addInvoiceDialog';
+import addReturnGoodsDialog from '@/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog';
+import popModal from '@/components/pop-modal';
+import accountstatement from './accountstatement/index.vue';
+import customerReturnOrder from './customerReturnOrder/index.vue';
+import returnGoods from './returnGoods/index.vue';
+import palletManagement from './palletManagement/index.vue';
+import addInvoiceManage from '@/views/financialManage/invoiceManage/components/addOrEditDialog.vue';
+import addEntrustedReceive from '@/views/saleManage/saleOrder/entrustedReceive/components/addOrEditDialog';
 
-  import {
-    deleteInformation,
-    getSaleOrderDetail,
-    getTableList,
-    saleOrderReminder,
-    getByRepeatBomAttribute,
-    saveOrderBomList
-  } from '@/api/saleManage/saleorder';
-  import { getToDoReminder } from '@/api/common/index';
-  import { exportSaleorder } from '@/api/system/file/index.js';
-  import dictMixins from '@/mixins/dictMixins';
-  import { reviewStatus, saleOrderProgressStatusEnum } from '@/enum/dict';
-  import entrustedReceive from '@/views/saleManage/saleOrder/entrustedReceive/index.vue';
-  import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
-  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
-  import tabMixins from '@/mixins/tableColumnsMixin';
-  import importDialog from '@/components/upload/import-dialog.vue';
-  import exportButton from '@/components/upload/exportButton.vue';
-  import { parameterGetByCode } from '@/api/main/index.js';
-  import opportunityDetail from '@/views/saleManage/businessOpportunity/components/opportunityDetailDialog.vue';
-  import quotationDetail from '@/views/saleManage/quotation/components/detailDialog.vue';
-  import printTemplateSaleOrder from './components/printTemplateSaleOrder.vue'
-  import { enterprisePage } from '@/api/contractManage/contractBook';
-  export default {
-    mixins: [dictMixins, tabMixins],
-    components: {
-      processSubmitDialog,
-      autogenerateDialog,
-      searchTable,
-      returnGoods,
-      accountstatement,
-      popModal,
-      contractrDetail,
-      addReturnGoodsDialog,
-      addInvoiceDialog,
-      invoice,
-      addDialog,
-      detailDialog,
-      customerReturnOrder,
-      entrustedReceive,
-      invoiceConfirm,
-      drawer,
-      exceptionList,
-      addInvoiceManage,
-      palletManagement,
-      exportButton,
-      importDialog,
-      bomDialog,
-      opportunityDetail,
-      quotationDetail,
-      addEntrustedReceive,
-      printTemplateSaleOrder
-    },
-    //客户管理数据
-    props: {
-      contactData: {
-        type: Object,
-        default: () => {
-          return {};
-        }
+import {
+  deleteInformation,
+  getSaleOrderDetail,
+  getTableList,
+  saleOrderReminder,
+  getByRepeatBomAttribute,
+  saveOrderBomList,
+  updateOrderInfo
+} from '@/api/saleManage/saleorder';
+import { getToDoReminder } from '@/api/common/index';
+import { exportSaleorder } from '@/api/system/file/index.js';
+import dictMixins from '@/mixins/dictMixins';
+import { reviewStatus, saleOrderProgressStatusEnum } from '@/enum/dict';
+import entrustedReceive from '@/views/saleManage/saleOrder/entrustedReceive/index.vue';
+import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
+import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+import tabMixins from '@/mixins/tableColumnsMixin';
+import importDialog from '@/components/upload/import-dialog.vue';
+import exportButton from '@/components/upload/exportButton.vue';
+import { parameterGetByCode } from '@/api/main/index.js';
+import opportunityDetail from '@/views/saleManage/businessOpportunity/components/opportunityDetailDialog.vue';
+import quotationDetail from '@/views/saleManage/quotation/components/detailDialog.vue';
+import printTemplateSaleOrder from './components/printTemplateSaleOrder.vue';
+import { enterprisePage } from '@/api/contractManage/contractBook';
+export default {
+  mixins: [dictMixins, tabMixins],
+  components: {
+    processSubmitDialog,
+    autogenerateDialog,
+    searchTable,
+    returnGoods,
+    accountstatement,
+    popModal,
+    contractrDetail,
+    addReturnGoodsDialog,
+    addInvoiceDialog,
+    invoice,
+    addDialog,
+    detailDialog,
+    customerReturnOrder,
+    entrustedReceive,
+    invoiceConfirm,
+    drawer,
+    exceptionList,
+    addInvoiceManage,
+    palletManagement,
+    exportButton,
+    importDialog,
+    bomDialog,
+    opportunityDetail,
+    quotationDetail,
+    addEntrustedReceive,
+    printTemplateSaleOrder
+  },
+  //客户管理数据
+  props: {
+    contactData: {
+      type: Object,
+      default: () => {
+        return {};
       }
-    },
-    data() {
-      return {
-        activeName: 'all',
-        activeComp: 'saleorder',
-        tabOptions: [
-          { key: 'saleorder', name: '销售订单', reminder: 'salesOrderNum' },
-          {
-            key: 'entrustedReceive',
-            name: '受托收货单',
-            reminder: 'entrustedReceiptNum'
-          },
-          { key: 'invoice', name: '发货单', reminder: 'deliveryNoteNum' },
-          {
-            key: 'invoiceConfirm',
-            name: '发货确认单',
-            reminder: 'deliveryConfirmationFormNum'
-          },
-          { key: 'trayList', name: '托盘清单' },
-          {
-            key: 'exceptionList',
-            name: '异常列表',
-            reminder: 'exceptionListNum'
-          },
-          { key: 'returnorder', name: '退货单', reminder: 'returnOrderNum' },
-          {
-            key: 'customerReturnOrder',
-            name: '退货处理单',
-            reminder: 'returnProcessingFormNum'
-          },
-          {
-            key: 'accountstatement',
-            name: '对账单',
-            reminder: 'statementAccountNum'
-          }
-        ],
-        selection: [], //单选中集合
-        delVisible: false, //批量删除弹框状态
-        loading: false, // 加载状态
-        processSubmitDialogFlag: false, // 加载状态
-        addOrEditDialogFlag1: false,
-        addEntrustedReceiveFlag: false,
-        params: {},
-        tableList: [],
-        current: null,
-        cacheKeyUrl: 'eos-c2e9664a-saleManage-saleOrder',
-        isRequired: true,
-        isTotalCount: '0',
-        columnsVersion: 1,
-        timeR: null,
-        toDoReminder: {},
-        groupName: ''
-      };
-    },
-
-    created() {
-      enterprisePage({
-        pageNum: 1,
-        size: 200
-      }).then((res) => {
-        if (res.list?.length > 0) {
-          this.groupName = res.list[0].name;
-        }
-      });
-      this.requestDict('客户状态');
-      parameterGetByCode({
-        code: 'order_person_info'
-      }).then((res) => {
-        if (res.value) {
-          this.isRequired = res.value === '1';
+    }
+  },
+  data() {
+    return {
+      activeName: 'all',
+      activeComp: 'saleorder',
+      tabOptions: [
+        { key: 'saleorder', name: '销售订单', reminder: 'salesOrderNum' },
+        {
+          key: 'entrustedReceive',
+          name: '受托收货单',
+          reminder: 'entrustedReceiptNum'
+        },
+        { key: 'invoice', name: '发货单', reminder: 'deliveryNoteNum' },
+        {
+          key: 'invoiceConfirm',
+          name: '发货确认单',
+          reminder: 'deliveryConfirmationFormNum'
+        },
+        { key: 'trayList', name: '托盘清单' },
+        {
+          key: 'exceptionList',
+          name: '异常列表',
+          reminder: 'exceptionListNum'
+        },
+        { key: 'returnorder', name: '退货单', reminder: 'returnOrderNum' },
+        {
+          key: 'customerReturnOrder',
+          name: '退货处理单',
+          reminder: 'returnProcessingFormNum'
+        },
+        {
+          key: 'accountstatement',
+          name: '对账单',
+          reminder: 'statementAccountNum'
         }
-      });
-      //销售发货数量是否限制不能大于采购总数//0否 1是
-      parameterGetByCode({
-        code: 'saleOrder_invoice_productList_totalCount'
-      }).then((res) => {
-        this.isTotalCount = res.value;
-      });
+      ],
+      selection: [], //单选中集合
+      delVisible: false, //批量删除弹框状态
+      loading: false, // 加载状态
+      processSubmitDialogFlag: false, // 加载状态
+      addOrEditDialogFlag1: false,
+      addEntrustedReceiveFlag: false,
+      params: {},
+      tableList: [],
+      current: null,
+      cacheKeyUrl: 'eos-c2e9664a-saleManage-saleOrder',
+      isRequired: true,
+      isTotalCount: '0',
+      columnsVersion: 1,
+      timeR: null,
+      toDoReminder: {},
+      groupName: ''
+    };
+  },
+
+  created() {
+    enterprisePage({
+      pageNum: 1,
+      size: 200
+    }).then((res) => {
+      if (res.list?.length > 0) {
+        this.groupName = res.list[0].name;
+      }
+    });
+    this.requestDict('客户状态');
+    parameterGetByCode({
+      code: 'order_person_info'
+    }).then((res) => {
+      if (res.value) {
+        this.isRequired = res.value === '1';
+      }
+    });
+    //销售发货数量是否限制不能大于采购总数//0否 1是
+    parameterGetByCode({
+      code: 'saleOrder_invoice_productList_totalCount'
+    }).then((res) => {
+      this.isTotalCount = res.value;
+    });
+    this.getToDoReminder();
+    this.timeR = setInterval(() => {
       this.getToDoReminder();
-      this.timeR = setInterval(() => {
-        this.getToDoReminder();
-      }, 60000);
+    }, 60000);
 
-      // if (!('Notification' in window)) {
-      //   console.log('此浏览器不支持桌面通知');
-      // } else if (Notification.permission === 'granted') {
-      //   // 如果用户已经授权,直接创建通知
-      //   var notification = new Notification('标题', {
-      //     body: '这是通知的内容。'
-      //   });
-      // } else if (Notification.permission !== 'denied') {
-      //   // 请求权限
-      //   Notification.requestPermission().then(function (permission) {
-      //     if (permission === 'granted') {
-      //       var notification = new Notification('标题', {
-      //         body: '消息提醒1'
-      //       });
-      //     }
-      //   });
-      // }
+    // if (!('Notification' in window)) {
+    //   console.log('此浏览器不支持桌面通知');
+    // } else if (Notification.permission === 'granted') {
+    //   // 如果用户已经授权,直接创建通知
+    //   var notification = new Notification('标题', {
+    //     body: '这是通知的内容。'
+    //   });
+    // } else if (Notification.permission !== 'denied') {
+    //   // 请求权限
+    //   Notification.requestPermission().then(function (permission) {
+    //     if (permission === 'granted') {
+    //       var notification = new Notification('标题', {
+    //         body: '消息提醒1'
+    //       });
+    //     }
+    //   });
+    // }
+  },
+  beforeDestroy() {
+    clearInterval(this.timeR);
+  },
+  computed: {
+    clientEnvironmentId() {
+      return this.$store.state.user.info.clientEnvironmentId;
     },
-    beforeDestroy() {
-      clearInterval(this.timeR);
-    },
-    computed: {
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
-      },
-      columns() {
-        let columnsVersion = this.columnsVersion;
-        return [
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center'
-          },
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          {
-            prop: 'orderNo',
-            label: '订单编码',
-            align: 'center',
-            slot: 'orderNo',
-            showOverflowTooltip: true,
-            sortable: true,
-            minWidth: 200,
-            fixed: 'left'
-          },
-          {
-            prop: 'needProduce',
-            label: '订单类型',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 150,
-
-            formatter: (_row, _column, cellValue) => {
-              let businessType =
-                cellValue == 1
-                  ? '有客户生产性订单'
-                  : cellValue == 2
-                  ? '无客户生产性订单'
-                  : cellValue == 4
-                  ? '不定向订单'
-                  : '库存式订单';
-
-              return businessType;
-            }
-          },
+    columns() {
+      let columnsVersion = this.columnsVersion;
+      return [
+        {
+          width: 45,
+          type: 'selection',
+          columnKey: 'selection',
+          align: 'center'
+        },
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          prop: 'orderNo',
+          label: '订单编码',
+          align: 'center',
+          slot: 'orderNo',
+          showOverflowTooltip: true,
+          sortable: true,
+          minWidth: 200,
+          fixed: 'left'
+        },
+        {
+          prop: 'needProduce',
+          label: '订单类型',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 150,
 
-          {
-            prop: 'preOrderNo',
-            label: '预销售订单编码',
-            align: 'center',
-            showOverflowTooltip: true,
-            sortable: true,
-            minWidth: 200,
-            fixed: 'left'
-          },
-          {
-            prop: 'relationType',
-            label: '来源类型',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 150,
-            formatter: (_row, _column, cellValue) => {
-              let businessType =
-                cellValue == 1
-                  ? '商机'
-                  : cellValue == 2
-                  ? '报价'
-                  : cellValue == 3
-                  ? '销售合同'
-                  : cellValue == 4
-                  ? '项目'
-                  : '';
+          formatter: (_row, _column, cellValue) => {
+            let businessType =
+              cellValue == 1
+                ? '有客户生产性订单'
+                : cellValue == 2
+                ? '无客户生产性订单'
+                : cellValue == 4
+                ? '不定向订单'
+                : '库存式订单';
 
-              return businessType;
-            }
-          },
-          {
-            prop: 'relationCode',
-            label: '来源单据',
-            align: 'center',
-            slot: 'relationCode',
-            showOverflowTooltip: true,
-            minWidth: 200,
-            formatter: (_row, _column, cellValue) => {
-              return _row.relationCode;
-            }
-          },
-          {
-            prop: 'progress',
-            label: '订单进度',
-            align: 'center',
-            showOverflowTooltip: true,
-            formatter: (_row, _column, cellValue) => {
-              return saleOrderProgressStatusEnum.find(
-                (val) => val.value == _row.progress
-              )?.label;
-            },
-            minWidth: 120
-          },
-
-          // {
-          //   prop: 'deliveryDate',
-          //   label: '交货日期',
-          //   align: 'center',
-          //   showOverflowTooltip: true,
-          //   minWidth: 200
-          // },
-          {
-            prop: 'productNames',
-            label: '产品名称',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 140
-          },
-          {
-            prop: 'productCodes',
-            label: '编码',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 140
-          },
-          {
-            minWidth: 160,
-            prop: 'productionCodes',
-            label: '生产编号',
-            align: 'center'
-          },
-          {
-            prop: 'batchNos',
-            label: '批次号',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 140
-          },
-          {
-            prop: 'productCount',
-            label: '数量',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 140
-          },
-          {
-            prop: 'inventoryQuantity',
-            label: '库存数',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 140
-          },
-          {
-            prop: 'sendTotalCount',
-            label: '发货数量',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 120
-          },
-          {
-            prop: 'returnTotalCount',
-            label: '退货数量',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 120
-          },
-          {
-            prop: 'inventoryQuantity',
-            label: '库存状态',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 140,
-            formatter: (_row, _column, cellValue) => {
-              return _row.inventoryQuantity > 0 ? '有库存' : '无库存';
-            }
-          },
-          {
-            prop: 'saleTypeName',
-            label: '销售类型',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 140
-          },
-          {
-            prop: 'projectName',
-            label: '项目名称',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 180
-          },
-          {
-            prop: 'partaName',
-            label: '客户名称',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 180
-          },
-          {
-            prop: 'partaLinkName',
-            label: '客户联系人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 130
-          },
+            return businessType;
+          }
+        },
 
-          {
-            prop: 'partaTel',
-            label: '客户联系电话',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 130
-          },
-          {
-            prop: 'partbName',
-            label: '售出方名称',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 130
-          },
-          {
-            prop: 'partbLinkName',
-            label: '售出方联系人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 130
-          },
-          {
-            prop: 'partbTel',
-            label: '售出方联系电话',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 130
-          },
-          {
-            prop: 'payAmount',
-            label: '金额(元)',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 170
-          },
-          {
-            prop: 'arrivalWays',
-            label: '到货方式',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 170,
-            formatter: (_row, _column, cellValue) => {
-              return _row.arrivalWays
-                ? _row.arrivalWays
-                    .split(',')
-                    .map((val) => {
-                      return val == 1
-                        ? '一次性到货'
-                        : val == 2
-                        ? '分批到货'
-                        : '';
-                    })
-                    .toString()
+        {
+          label: '预销售订单编码',
+          align: 'center',
+          slot: 'preOrderNo', 
+          showOverflowTooltip: true,
+          sortable: true,
+          minWidth: 200,
+          fixed: 'left'
+        },
+        {
+          prop: 'relationType',
+          label: '来源类型',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 150,
+          formatter: (_row, _column, cellValue) => {
+            let businessType =
+              cellValue == 1
+                ? '商机'
+                : cellValue == 2
+                ? '报价'
+                : cellValue == 3
+                ? '销售合同'
+                : cellValue == 4
+                ? '项目'
                 : '';
-            }
-          },
-          {
-            prop: 'orderStatus',
-            label: '审核状态',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 100,
-            formatter: (_row, _column, cellValue) => {
-              return reviewStatus[_row.orderStatus];
-            }
-          },
 
-          {
-            prop: 'createUserName',
-            label: '创建人',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 80
-          },
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 170
+            return businessType;
+          }
+        },
+        {
+          prop: 'relationCode',
+          label: '来源单据',
+          align: 'center',
+          slot: 'relationCode',
+          showOverflowTooltip: true,
+          minWidth: 200,
+          formatter: (_row, _column, cellValue) => {
+            return _row.relationCode;
+          }
+        },
+        {
+          prop: 'progress',
+          label: '订单进度',
+          align: 'center',
+          showOverflowTooltip: true,
+          formatter: (_row, _column, cellValue) => {
+            return saleOrderProgressStatusEnum.find(
+              (val) => val.value == _row.progress
+            )?.label;
           },
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 280,
-            align: 'center',
-            resizable: false,
-            slot: 'action',
-            showOverflowTooltip: true,
-            fixed: 'right'
+          minWidth: 120
+        },
+
+        // {
+        //   prop: 'deliveryDate',
+        //   label: '交货日期',
+        //   align: 'center',
+        //   showOverflowTooltip: true,
+        //   minWidth: 200
+        // },
+        {
+          prop: 'productNames',
+          label: '产品名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'productCodes',
+          label: '编码',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          minWidth: 160,
+          prop: 'productionCodes',
+          label: '生产编号',
+          align: 'center'
+        },
+        {
+          prop: 'batchNos',
+          label: '批次号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'productCount',
+          label: '数量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'inventoryQuantity',
+          label: '库存数',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'sendTotalCount',
+          label: '发货数量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 120
+        },
+        {
+          prop: 'returnTotalCount',
+          label: '退货数量',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 120
+        },
+        {
+          prop: 'inventoryQuantity',
+          label: '库存状态',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140,
+          formatter: (_row, _column, cellValue) => {
+            return _row.inventoryQuantity > 0 ? '有库存' : '无库存';
           }
-        ];
-      }
-    },
-    methods: {
-      getToDoReminder() {
-        getToDoReminder().then((res) => {
-          this.toDoReminder = res;
-        });
-      },
-      //更多菜单
-      handleCommand(command, row) {
-        if (command === 'invoice') {
-          this.$refs.invoiceDialogRef.open('add', {}, [row.id]);
-        }
-        if (command === 'entrustedReceive') {
-          this.addEntrustedReceiveFlag = true;
-          this.$nextTick(() => {
-            this.$refs.addEntrustedReceiveRef.open('add', {}, row.id);
-          });
-        }
-        if (command === 'returnOrder') {
-          this.$refs.addReturnGoodsRef.open('add', {});
-        }
-        if (command === 'saleOrderReminder') {
-          saleOrderReminder(row.id).then((res) => {
-            this.$message.success('催单成功');
-          });
-        }
-        if (command === 'invoiceManage') {
-          this.addOrEditDialogFlag1 = true;
+        },
+        {
+          prop: 'saleTypeName',
+          label: '销售类型',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
+        {
+          prop: 'projectName',
+          label: '项目名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 180
+        },
+        {
+          prop: 'partaName',
+          label: '客户名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 180
+        },
+        {
+          prop: 'partaLinkName',
+          label: '客户联系人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 130
+        },
 
-          this.$nextTick(() => {
-            this.$refs.addOrEditDialogRef.createInvoice1(row, 1, 3);
-          });
-        }
-      },
+        {
+          prop: 'partaTel',
+          label: '客户联系电话',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 130
+        },
+        {
+          prop: 'partbName',
+          label: '售出方名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 130
+        },
+        {
+          prop: 'partbLinkName',
+          label: '售出方联系人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 130
+        },
+        {
+          prop: 'partbTel',
+          label: '售出方联系电话',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 130
+        },
+        {
+          prop: 'payAmount',
+          label: '金额(元)',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 170
+        },
+        {
+          prop: 'arrivalWays',
+          label: '到货方式',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 170,
+          formatter: (_row, _column, cellValue) => {
+            return _row.arrivalWays
+              ? _row.arrivalWays
+                  .split(',')
+                  .map((val) => {
+                    return val == 1 ? '一次性到货' : val == 2 ? '分批到货' : '';
+                  })
+                  .toString()
+              : '';
+          }
+        },
+        {
+          prop: 'orderStatus',
+          label: '审核状态',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 100,
+          formatter: (_row, _column, cellValue) => {
+            return reviewStatus[_row.orderStatus];
+          }
+        },
 
-      invoiceAll() {
-        let partaIds = this.selection.map((item) => item.partaId);
-        if (new Set(partaIds).size != 1) {
-          return this.$message.warning('请选择相同客户的订单!');
-        }
-        let saleTypeS = this.selection.map((item) => item.saleType);
-        if (new Set(saleTypeS).size != 1) {
-          return this.$message.warning('请选择相同销售类型的订单!');
-        }
-        let processObj = this.selection.filter((item) => item.progress == 800);
-        if (processObj?.length && this.isTotalCount == '1') {
-          return this.$message.warning(
-            '订单' +
-              processObj.map((item) => item.orderNo).toString() +
-              '已全部发货,不能创建发货单'
-          );
-        }
-        if (
-          this.selection.filter((item) => item.needProduce == 4)?.length &&
-          this.selection.filter((item) => item.needProduce == 4)?.length !=
-            this.selection.length
-        ) {
-          return this.$message.warning(
-            '不定向订单不能与其它类型的订单一起创建发货单!'
-          );
+        {
+          prop: 'createUserName',
+          label: '创建人',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 80
+        },
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 170
+        },
+        {
+          columnKey: 'action',
+          label: '操作',
+          width: 280,
+          align: 'center',
+          resizable: false,
+          slot: 'action',
+          showOverflowTooltip: true,
+          fixed: 'right'
         }
-        this.$refs.invoiceDialogRef.open(
-          'add',
-          {},
-          this.selection.map((item) => item.id)
-        );
-      },
-      //点击左边分类
-      handleNodeClick(data, node) {
-        // this.curNodeData = data;
-        this.reload({ categoryId: data.id });
-      },
-      /* 表格数据源 */
-      datasource({ page, limit, where, order }) {
-        if (this.contactData.id) {
-          where['contactId'] = this.contactData.id;
-        }
-        this.params = {
-          pageNum: page,
-          size: limit,
-          ...where,
-          progress: this.activeName == 'all' ? '' : this.activeName
-        };
-        return getTableList(this.params);
-      },
+      ];
+    }
+  },
+  methods: {
+    getToDoReminder() {
+      getToDoReminder().then((res) => {
+        this.toDoReminder = res;
+      });
+    },
+    // 预销售编码输入框失焦回车事件
+    handlePreOrderNoBlur(row) {
+      updateOrderInfo({
+        preOrderNo: row.preOrderNo
+      })
+        .then((res) => {
+          console.log(res);
+          this.$message.success('预销售编码更新成功');
+        })
+        .catch((err) => {});
+    },
+    //更多菜单
+    handleCommand(command, row) {
+      if (command === 'invoice') {
+        this.$refs.invoiceDialogRef.open('add', {}, [row.id]);
+      }
+      if (command === 'entrustedReceive') {
+        this.addEntrustedReceiveFlag = true;
+        this.$nextTick(() => {
+          this.$refs.addEntrustedReceiveRef.open('add', {}, row.id);
+        });
+      }
+      if (command === 'returnOrder') {
+        this.$refs.addReturnGoodsRef.open('add', {});
+      }
+      if (command === 'saleOrderReminder') {
+        saleOrderReminder(row.id).then((res) => {
+          this.$message.success('催单成功');
+        });
+      }
+      if (command === 'invoiceManage') {
+        this.addOrEditDialogFlag1 = true;
 
-      /* 刷新表格 */
-      reload(where) {
-        this.$refs.table.reload({ page: 1, where });
-        this.getToDoReminder();
-      },
-      handleClick() {
-        this.activeName;
-        this.$refs.table.reload({
-          page: 1,
-          where: { progress: this.activeName == 'all' ? '' : this.activeName }
+        this.$nextTick(() => {
+          this.$refs.addOrEditDialogRef.createInvoice1(row, 1, 3);
         });
-      },
-      //新增编辑
-      openEdit(type, row) {
-        this.$refs.addDialogRef.open(type, row, row.id);
-        this.$refs.addDialogRef.$refs.form &&
-          this.$refs.addDialogRef.$refs.form.clearValidate();
-      },
+      }
+    },
 
-      //批量删除
-      allDelBtn() {
-        if (this.selection.length === 0) return;
-        let flag = this.selection.some((item) =>
-          [1, 2].includes(item.orderStatus)
+    invoiceAll() {
+      let partaIds = this.selection.map((item) => item.partaId);
+      if (new Set(partaIds).size != 1) {
+        return this.$message.warning('请选择相同客户的订单!');
+      }
+      let saleTypeS = this.selection.map((item) => item.saleType);
+      if (new Set(saleTypeS).size != 1) {
+        return this.$message.warning('请选择相同销售类型的订单!');
+      }
+      let processObj = this.selection.filter((item) => item.progress == 800);
+      if (processObj?.length && this.isTotalCount == '1') {
+        return this.$message.warning(
+          '订单' +
+            processObj.map((item) => item.orderNo).toString() +
+            '已全部发货,不能创建发货单'
+        );
+      }
+      if (
+        this.selection.filter((item) => item.needProduce == 4)?.length &&
+        this.selection.filter((item) => item.needProduce == 4)?.length !=
+          this.selection.length
+      ) {
+        return this.$message.warning(
+          '不定向订单不能与其它类型的订单一起创建发货单!'
         );
-        if (flag)
-          return this.$message.warning(
-            '抱歉已审核、审核中的数据不能删除,请检查'
-          );
-        this.delVisible = true;
-      },
+      }
+      this.$refs.invoiceDialogRef.open(
+        'add',
+        {},
+        this.selection.map((item) => item.id)
+      );
+    },
+    //点击左边分类
+    handleNodeClick(data, node) {
+      // this.curNodeData = data;
+      this.reload({ categoryId: data.id });
+    },
+    /* 表格数据源 */
+    datasource({ page, limit, where, order }) {
+      if (this.contactData.id) {
+        where['contactId'] = this.contactData.id;
+      }
+      this.params = {
+        pageNum: page,
+        size: limit,
+        ...where,
+        progress: this.activeName == 'all' ? '' : this.activeName
+      };
+      return getTableList(this.params);
+    },
 
-      //删除接口
-      remove(delData) {
-        deleteInformation(delData).then((res) => {
-          this.$message.success('删除成功!');
-          this.reload();
-        });
-      },
+    /* 刷新表格 */
+    reload(where) {
+      this.$refs.table.reload({ page: 1, where });
+      this.getToDoReminder();
+    },
+    handleClick() {
+      this.activeName;
+      this.$refs.table.reload({
+        page: 1,
+        where: { progress: this.activeName == 'all' ? '' : this.activeName }
+      });
+    },
+    //新增编辑
+    openEdit(type, row) {
+      this.$refs.addDialogRef.open(type, row, row.id);
+      this.$refs.addDialogRef.$refs.form &&
+        this.$refs.addDialogRef.$refs.form.clearValidate();
+    },
+
+    //批量删除
+    allDelBtn() {
+      if (this.selection.length === 0) return;
+      let flag = this.selection.some((item) =>
+        [1, 2].includes(item.orderStatus)
+      );
+      if (flag)
+        return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查');
+      this.delVisible = true;
+    },
 
-      //删除弹框确定
-      commitBtn() {
-        const dataId = this.selection.map((v) => v.id);
-        this.remove(dataId);
-      },
+    //删除接口
+    remove(delData) {
+      deleteInformation(delData).then((res) => {
+        this.$message.success('删除成功!');
+        this.reload();
+      });
+    },
 
-      //查看详情
-      openorderDetail(row) {
-        this.$refs.drawerRef.open(row);
-      },
-      async saleOrderSubmit(id) {
-        this.$refs.addDialogRef && this.$refs.addDialogRef.cancel();
-        // const data = await getSaleOrderDetail(id);
+    //删除弹框确定
+    commitBtn() {
+      const dataId = this.selection.map((v) => v.id);
+      this.remove(dataId);
+    },
 
-        this.processSubmitDialogFlag = true;
-        let businessType =
-          this.current.needProduce == 1
-            ? '有客户生产性订单'
-            : this.current.needProduce == 2
-            ? '无客户生产性订单'
-            : this.current.needProduce == 4
-            ? '不定向订单'
-            : '库存式订单';
-        this.$nextTick(() => {
-          let params = {
-            businessId: this.current.id,
-            businessKey: 'sales_order_approve',
-            formCreateUserId: this.current.createUserId,
-            variables: {
-              businessCode: this.current.orderNo,
-              businessName: this.current.partaName,
-              businessType: businessType
-            }
-          };
-          this.$refs.processSubmitDialogRef.init(params);
-        });
-      },
-      async callBack() {
-        if (!this.current.generatePurchase && !this.current.generateProduce) {
-          return 0;
-        }
-        const code = saveOrderBomList({
-          categoryDTOList: this.tableList || [],
-          orderId: this.current.id
-        });
-        return code;
-      },
+    //查看详情
+    openorderDetail(row) {
+      this.$refs.drawerRef.open(row);
+    },
+    async saleOrderSubmit(id) {
+      this.$refs.addDialogRef && this.$refs.addDialogRef.cancel();
+      // const data = await getSaleOrderDetail(id);
 
-      async saleOrderSubmitOrGenerate(res) {
-        this.tableList = [];
-        this.current = await getSaleOrderDetail(res.id);
-        if (!this.current.generatePurchase && !this.current.generateProduce) {
-          this.saleOrderSubmit(res.id);
-        } else {
-          const data = await getByRepeatBomAttribute(res.id);
-          if (data && data.length) {
-            this.$refs.bomDialogRef.open(data);
-            return;
+      this.processSubmitDialogFlag = true;
+      let businessType =
+        this.current.needProduce == 1
+          ? '有客户生产性订单'
+          : this.current.needProduce == 2
+          ? '无客户生产性订单'
+          : this.current.needProduce == 4
+          ? '不定向订单'
+          : '库存式订单';
+      this.$nextTick(() => {
+        let params = {
+          businessId: this.current.id,
+          businessKey: 'sales_order_approve',
+          formCreateUserId: this.current.createUserId,
+          variables: {
+            businessCode: this.current.orderNo,
+            businessName: this.current.partaName,
+            businessType: businessType
           }
-          this.saleOrderSubmit(res.id);
-        }
-      },
-      bomDialogSuccess(tableList) {
-        this.tableList = tableList;
-        // this.callBack()
-        this.saleOrderSubmit(this.current.id);
-      },
-      //生成
-      handleAutoGenerate(id, isAuto = false) {
-        this.$refs.autogenerateDialogRef.init(id, isAuto);
-      },
-      //查看来源详情
-      openRelationCodeDetail(row) {
-        let data = {
-          id: row.relationId
         };
-        if (row.relationType == 1) {
-          this.$refs.opportunityDetailRef.open(data);
-        }
-        if (row.relationType == 2) {
-          this.$refs.quotationDetailRef.open(data);
-        }
-        if (row.relationType == 3) {
-          this.$refs.contractDetailRef.open(data);
+        this.$refs.processSubmitDialogRef.init(params);
+      });
+    },
+    async callBack() {
+      if (!this.current.generatePurchase && !this.current.generateProduce) {
+        return 0;
+      }
+      const code = saveOrderBomList({
+        categoryDTOList: this.tableList || [],
+        orderId: this.current.id
+      });
+      return code;
+    },
+
+    async saleOrderSubmitOrGenerate(res) {
+      this.tableList = [];
+      this.current = await getSaleOrderDetail(res.id);
+      if (!this.current.generatePurchase && !this.current.generateProduce) {
+        this.saleOrderSubmit(res.id);
+      } else {
+        const data = await getByRepeatBomAttribute(res.id);
+        if (data && data.length) {
+          this.$refs.bomDialogRef.open(data);
+          return;
         }
-      },
-      uploadFile() {
-        this.$refs.importDialogRef.open();
-      },
-      exportFn() {
-        console.log(this.params);
-        exportSaleorder(this.params);
-      },
-      handlePrint() {
-        console.log(this.selection[0]);
-        if (this.selection.length > 1)
-          return this.$message.warning('请选择一条');
-        this.$refs.printTemplateSaleOrderRef.open(this.selection[0].id);
+        this.saleOrderSubmit(res.id);
       }
+    },
+    bomDialogSuccess(tableList) {
+      this.tableList = tableList;
+      // this.callBack()
+      this.saleOrderSubmit(this.current.id);
+    },
+    //生成
+    handleAutoGenerate(id, isAuto = false) {
+      this.$refs.autogenerateDialogRef.init(id, isAuto);
+    },
+    //查看来源详情
+    openRelationCodeDetail(row) {
+      let data = {
+        id: row.relationId
+      };
+      if (row.relationType == 1) {
+        this.$refs.opportunityDetailRef.open(data);
+      }
+      if (row.relationType == 2) {
+        this.$refs.quotationDetailRef.open(data);
+      }
+      if (row.relationType == 3) {
+        this.$refs.contractDetailRef.open(data);
+      }
+    },
+    uploadFile() {
+      this.$refs.importDialogRef.open();
+    },
+    exportFn() {
+      console.log(this.params);
+      exportSaleorder(this.params);
+    },
+    handlePrint() {
+      console.log(this.selection[0]);
+      if (this.selection.length > 1) return this.$message.warning('请选择一条');
+      this.$refs.printTemplateSaleOrderRef.open(this.selection[0].id);
     }
-  };
+  }
+};
 </script>
 
 <style lang="scss" scoped>
-  :deep .el-card__body {
-    padding: 0;
-  }
+:deep .el-card__body {
+  padding: 0;
+}
 
-  :deep(.el-link--inner) {
-    margin-left: 0px !important;
-  }
+:deep(.el-link--inner) {
+  margin-left: 0px !important;
+}
 
-  .sys-organization-list {
-    height: calc(100vh - 264px);
-    box-sizing: border-box;
-    border-width: 1px;
-    border-style: solid;
-    overflow: auto;
-  }
+.sys-organization-list {
+  height: calc(100vh - 264px);
+  box-sizing: border-box;
+  border-width: 1px;
+  border-style: solid;
+  overflow: auto;
+}
 
-  .sys-organization-list :deep(.el-tree-node__content) {
-    height: 40px;
+.sys-organization-list :deep(.el-tree-node__content) {
+  height: 40px;
 
-    & > .el-tree-node__expand-icon {
-      margin-left: 10px;
-    }
+  & > .el-tree-node__expand-icon {
+    margin-left: 10px;
   }
+}
 
-  .el-dropdown-link {
-    cursor: pointer;
-    color: var(--color-primary-5);
-  }
+.el-dropdown-link {
+  cursor: pointer;
+  color: var(--color-primary-5);
+}
 
-  .el-icon-arrow-down {
-    font-size: 12px;
-  }
-  :deep(.el-badge__content.is-fixed) {
-    top: 4px;
-  }
-</style>
+.el-icon-arrow-down {
+  font-size: 12px;
+}
+:deep(.el-badge__content.is-fixed) {
+  top: 4px;
+}
+/* 优化输入框在表格中的样式 */
+:deep(.el-table .el-input__inner) {
+  border-radius: 4px;
+  height: 28px;
+  line-height: 28px;
+}
+:deep(.el-table .el-input) {
+  margin: 0;
+}
+</style>