Ver Fonte

采购订单,采购入库

fubin há 2 anos atrás
pai
commit
eb632070e5

+ 23 - 0
src/api/pages/pur/pur-enter.js

@@ -0,0 +1,23 @@
+/**
+ * @desc   : 采购入库服务
+ * @author : 付斌
+ * @date   : 2024-01-31 14:37
+ */
+export default {
+  purEnterService: {
+    prefix: '/pur-server/pur/purEnter/',
+  }
+}
+
+/**
+ * @desc   : 采购入库路由
+ * @author : 付斌
+ * @date   : 2024-02-01 16:03
+ */
+export const routeUrl = {
+  purEnter: {
+    add: {key: 'add', method: 'add'},
+    entryHandle: {key: 'entryHandle', method: 'entryHandle'},
+    completeRevocation: {key: 'completeRevocation', method: 'completeRevocation'},
+  }
+}

+ 27 - 0
src/api/pages/pur/pur-order.js

@@ -0,0 +1,27 @@
+/**
+ * @desc   : 采购订单服务
+ * @author : 付斌
+ * @date   : 2024-01-31 14:37
+ */
+export default {
+  purOrderService: {
+    prefix: '/pur-server/pur/purOrder/',
+  }
+}
+
+/**
+ * @desc   : 采购订单路由
+ * @author : 付斌
+ * @date   : 2024-02-01 16:03
+ */
+export const routeUrl = {
+  purOrder: {
+    add: {key: 'add', method: 'add'},
+    revert: {key: 'revert', method: 'revert'},
+    close: {key: 'close', method: 'close'},
+    returnAndExchangeGoods: {key: 'returnAndExchangeGoods', method: 'returnAndExchangeGoods'},
+    purchaseReturn: {key: 'purchaseReturn', method: 'purchaseReturn'},
+    print: {key: 'print', method: 'print'},
+    //add:{key:'add', url:'/core/customer/add'}
+  }
+}

+ 11 - 0
src/router/routers.js

@@ -349,6 +349,17 @@ let menu = [
             },
           },
           {
+            path: '/pur/purEnter/entryHandle',
+            name: '采购入库-入库办理',
+            component: () => import('@/view/pur/pur-enter/entryHandle.vue'),
+            meta: {
+              title: '入库办理',
+              hideInMenu: true,
+              notCache: false,
+              flgRight:false,
+            },
+          },
+          {
             path: '/pur/purBySale/index',
             name: '以销定采',
             component: () => import('@/view/pur/pur-by-sale/index.vue'),

+ 18 - 0
src/view/pur/pur-enter/entryHandle.vue

@@ -0,0 +1,18 @@
+<template>
+  <CommonForm type="entryHandle" ></CommonForm>
+</template>
+
+<script>
+import CommonForm from './form'
+
+export default {
+  name: 'entryHandle',
+  components:{
+    CommonForm
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 505 - 0
src/view/pur/pur-enter/form.vue

@@ -0,0 +1,505 @@
+<!-- @desc:入库办理  @auth:付斌  @time:2024/1/30 15:15 -->
+<template>
+  <div class="main-div">
+    <DkCollapse @on-change="changeCollapse" ref="collapse">
+      <DkPanel prop="basic">
+        <DkForm slot="content" ref="formInline" style="width:100%;" name="dk-form" v-model="formData"
+                :rules="ruleInline"
+                @onValidate="onValidate" :labelMaxWords="5">
+          <!--所属公司-->
+          <DkFormItem :errorMessage="getErrMessage('ascpId')" :required="true" prop="ascpId">
+            <SelectPop v-model="formData.ascpId" :options="companyList" :multiple="false" :clearable="false"
+                       :disabled="true"
+                       label-key="ascpName" value-key="cpId"/>
+          </DkFormItem>
+          <!--入库单号-->
+          <DkFormItem prop="entryNo" :errorMessage="getErrMessage('entryNo')" :required="true">
+            <InputPop v-model="formData.entryNo" :readonly="true"/>
+          </DkFormItem>
+          <!--供应商名称-->
+          <DkFormItem prop="supplierName" :errorMessage="getErrMessage('supplierName')" :required="true">
+            <SelectPop v-model="formData.supplierId" :options="supplierList" :multiple="false" :clearable="false"
+                       :disabled="true"
+                       label-key="supplierName" value-key="supplierId"/>
+          </DkFormItem>
+          <!--发货日期-->
+          <DkFormItem prop="sale1OutDate" :errorMessage="getErrMessage('sale1OutDate')">
+            <InputPop v-model="formData.sale1OutDate" :readonly="true"/>
+          </DkFormItem>
+          <!--联系人-->
+          <DkFormItem prop="consignee" :errorMessage="getErrMessage('customerName')">
+            <InputPop v-model="formData.customerName" :readonly="true"/>
+          </DkFormItem>
+          <!--联系电话-->
+          <DkFormItem prop="consigneePhone" :errorMessage="getErrMessage('customerPhone')">
+            <InputPop :telephone="true" v-model="formData.customerPhone" maxlength="11" :readonly="true"/>
+          </DkFormItem>
+          <!--详细地址-->
+          <DkFormItem :errorMessage="getErrMessage('addressFull')" prop="takeOverAddress">
+            <InputPop ref="addressFull" :readonly="true" v-model="formData.addressFull"/>
+          </DkFormItem>
+          <!--收货仓库-->
+          <DkFormItem prop="receivingWh" :errorMessage="getErrMessage('receivingWh')" :required="true">
+            <SelectPop v-model="formData.entryWhId" :options="warehouseList" :multiple="false" :clearable="false"
+                       label-key="whName" value-key="whId" :disabled="entryStatus===3 || entryStatus === -2"
+                       @on-select="changeItemWhId"/>
+          </DkFormItem>
+          <DkFormItem prop="entryTime" :label="$t('entryTime')">
+            <DatePickerPop v-model="entryDate"
+                           :placeholder="$t('inputWords',{'search-name':$t('entryTime')})"
+                           type="date" :short-cut-flag="true" :readonly="true"/>
+          </DkFormItem>
+          <!--备注-->
+          <DkFormItem prop="remarks" :errorMessage="getErrMessage('remarks')">
+            <InputPop v-model="formData.remarks" maxlength=500 textareaFlag/>
+          </DkFormItem>
+        </DkForm>
+      </DkPanel>
+    </DkCollapse>
+    <DkButton style="z-index: 100;position: absolute;right: 4%;" @click="click()">
+      {{ $t('barcode') }}
+    </DkButton>
+
+    <div style="display: flex;">
+      <DkCollapse @on-change="changeCollapse" ref="collapse">
+        <DkPanel prop="goodsInformation">
+          <div id="search-cond-div-goods-info" ref="search-cond-div-goods-info"
+               slot="content">
+            <EditTable ref="table-select" :data="formData.orderEntryItemList"
+                       :columns-social="goodsSkuColumns"
+                       :columns="visUserSensitive? goodsSkuColumns : goodsSkuColumns.filter(it => !it.flgUserSensitive)"
+                       enabledRepeatId="skuId"
+                       controlId="skuId"
+                       :height="this.tableHeight-60 - 60"
+                       :showSeqBtnFlag="false"
+                       :enabledRepeat="true"
+                       :newRowFlag="false"
+                       :readonly="entryStatus===3"
+                       v-if="entryStatus"
+                       :flgHidePrice="!visUserSensitive"
+            ></EditTable>
+            <div>
+              <DkForm ref="goodsFootFormData" v-model="goodsFootFormData" :labelMaxWords="5" name="dk-form"
+                      class="form-content-class">
+                <!--货物金额-->
+                <DkFormItem prop="sumGoodsAmount">
+                  <InputNumberPop ref="sumGoodsAmount" v-model="goodsFootFormData.sumGoodsAmount"
+                                  :clearable="false"
+                                  :digits="2"
+                                  :readonly="true"/>
+                </DkFormItem>
+                <!--总重量-->
+                <DkFormItem prop="sumWeight">
+                  <InputNumberPop ref="sumWeight" v-model="goodsFootFormData.sumWeight" :digits="2"
+                                  :readonly="true" unit="KG"/>
+                </DkFormItem>
+                <!--总体积-->
+                <DkFormItem prop="sumVolume">
+                  <InputNumberPop ref="sumVolume" v-model="goodsFootFormData.sumVolume" :digits="2"
+                                  :readonly="true" unit="m³"/>
+                </DkFormItem>
+              </DkForm>
+            </div>
+          </div>
+        </DkPanel>
+      </DkCollapse>
+    </div>
+
+    <!--附件-->
+    <div style="display: flex;margin-bottom: 80px">
+      <DkCollapse @on-change="changeCollapse" ref="collapse">
+        <DkPanel prop="files">
+          <div id="search-cond-div-files-info" ref="search-cond-div-files-info"
+               slot="content">
+            <DkPicWall v-model="formData.annexPaths" :disabled="this.allCanNoEdit?true:false"
+                       folder="t_order/annex_paths" :accept="$config.uploadFileConfig.acceptPicType"
+                       :format="['jpg','jpeg','png']"></DkPicWall>
+          </div>
+        </DkPanel>
+      </DkCollapse>
+    </div>
+
+    <!--  下部分按钮区域  -->
+    <DkSaveButton :viewFlag="entryStatus === -2" ref="saveButton" :loading="loading" @save="submitForm"
+                  @close="btnGroupClick"></DkSaveButton>
+    <!--查看条码-->
+    <DkModal
+      v-model="barCodeModel"
+      :title="$t('barcode')"
+      width="600px"
+      :loading="loading"
+      :ok-visible-flag="false"
+    >
+      <DkTable ref="barcodeDetailsFlag"
+               primaryKey="barcodeId"
+               :id="'table-'+$options.name"
+               name="table3" :data="barCodeData"
+               :height="this.tableHeight/2-40"
+               :select-flag="false"
+               :pageFlag="false"
+               :pageTotalFlag="false">
+        <DkTableColumn type="seq" min-width="44"></DkTableColumn>
+        <DkTableColumn field="skuModel" width="150" :filter="false"></DkTableColumn>
+        <DkTableColumn field="skuName" width="150" :filter="false"></DkTableColumn>
+        <DkTableColumn field="skuCode" width="200" :filter="false"></DkTableColumn>
+        <DkTableColumn field="barcode" width="150" :filter="false" :title="$t('skuBarcode')"></DkTableColumn>
+        <DkTableColumn field="boxcode" width="150" :filter="false"></DkTableColumn>
+      </DkTable>
+      <div slot="footer"/>
+    </DkModal>
+
+  </div>
+</template>
+
+<script>
+import {formMixin} from '@/mixins/form'
+
+export default {
+  mixins: [formMixin],
+  data() {
+    let self = this
+    return {
+      //用户敏感信息隐藏
+      visUserSensitive: false,
+      itemPageInfo: {
+        total: 0,
+        pageSize: this.$config.pageSize,
+        currentPage: 1
+      },
+      //画面模式选项角标
+      bottomList: ['1', '2', '3', '5'],
+      //商品合计信息
+      goodsFootFormData: {
+        sumGoodsAmount: 0,
+        sumVolume: 0,
+        sumWeight: 0,
+      },
+      // 省市区list
+      areaTreeList: [],
+      // 所属公司
+      companyList: [],
+      // 所属供应商
+      supplierList: [],
+      // 收货仓库
+      warehouseList: [],
+      // 条码明细
+      barCodeData: [],
+      // 查看条码
+      barCodeModel: false,
+      // 单据状态
+      entryStatus: null,
+      loading: false,
+      errMessage: {},
+      entryDate: null,
+      formData: {
+        supplierName: null,
+        contactName: null,
+        contactPhones: null,
+        addressArea: null,
+        addressName: null,
+        addressNo: null,
+        addressFull: null,
+        remarks: '',
+        ascpId: null,
+        cpId: self.$store.state.user.cpId,
+        // 附件
+        annexPaths: [],
+        // 货物明细
+        orderEntryItemList: [],
+      },
+      //入库商品
+      goodsSkuColumns: [
+        {field: 'skuModel', type: 'disabled'},
+        {field: 'skuName', type: 'disabled'},
+        {field: 'skuCode', type: 'disabled'},
+        {field: 'orderQuantity', type: 'disabled', width: 'auto', digits: 2},
+        {field: 'entryGoingQuantity', type: 'disabled', width: 'auto', digits: 2},
+        {field: 'entryGoingAmount', type: 'disabled', flgUserSensitive: true, width: 'auto', digits: 2},
+        {field: 'orderPriceSale', type: 'disabled', flgUserSensitive: true, width: 'auto', digits: 2},
+        {
+          copyVisible: true,
+          searchDataFlag: false,
+          field: 'whId',
+          type: 'select',
+          options: () => self.warehouseList,
+          labelKey: 'whName',
+          valueKey: 'whId',
+          fieldUpdate: [
+            {updateField: 'warehouseName', valueFiled: 'whName'},
+            {updateField: 'whId', valueFiled: 'whId'},
+          ]
+        },
+        {field: 'nonStandardCode', type: 'disabled', width: 'auto'},
+        {field: 'skuTypeName', type: 'disabled', width: 'auto'},
+        {field: 'brandName', type: 'disabled', width: 'auto'},
+        {field: 'skuWeight', type: 'disabled', width: 'auto'},
+        {field: 'skuVolume', type: 'disabled', width: 'auto'},
+      ],
+      ruleInline: {
+        ascpId: [
+          {required: true, trigger: 'none', type: 'number'},
+        ],
+        supplierCode: [
+          {required: true, trigger: 'none'},
+        ],
+        supplierName: [
+          {required: true, trigger: 'none'},
+        ],
+        contactPhones: [
+          {
+            required: false,
+            trigger: 'none',
+            max: 11,
+            min: 11,
+            message: self.$t('W_071', {'param': self.$t('contactPhones')})
+          },
+        ],
+        supplierType: [
+          {required: true, trigger: 'none'}
+        ],
+      },
+      cpIds: [],
+      regionData: [],
+      cityData: [],
+    }
+  },
+  methods: {
+    /**
+     * @desc   : 总单仓库修改明细仓库
+     * @author : 常皓宁
+     * @date   : 2023/11/21 9:05
+     */
+    changeItemWhId() {
+      let itemData = this.formData.orderEntryItemList
+      let whName = this.warehouseList.filter(it => it.whId == this.formData.entryWhId)
+      if (itemData) {
+        itemData.forEach(it => {
+          it.whId = this.formData.entryWhId
+          it.whId_Name = whName[0].whName
+          it.whName = whName[0].whName
+        })
+        this.$refs['table-select'].$refs.xTable.reloadData(itemData)
+      }
+    },
+    /**
+     *   @desc   : 选择地址
+     *   @date   : 2022/6/9 19:15
+     *   @author : 寇珊珊
+     */
+    chooseAddress(value) {
+      this.formData.supplierDistrict = value;
+      // 说明是清空
+      if (!value) {
+        this.formData.addressName = null;
+        this.formData.addressFull = null;
+        this.formData.addressGcj02 = {};
+        this.formData.addressArea = {};
+      } else {
+        //按照title进行
+        this.formData.addressName = value.addressName;
+        this.formData.addressGcj02 = value.addressGcj02;
+        this.formData.addressArea = value.addressArea;
+        this.formData.addressFull = value.addressFull + (this.formData.addressNo ? this.formData.addressNo : '');
+      }
+    },
+    /**
+     * @desc   : 保存的提交事件
+     * @author : 常皓宁
+     * @date   : 2023/8/30 14:34
+     */
+    submitForm() {
+      this.$refs['formInline'].validate().then(valid => {
+        // 校验
+        if (!valid) {
+          return
+        }
+        this.loading = true
+        //保存
+        this.saveOrderEntry({...this.formData})
+      })
+    },
+
+    /**
+     * @desc   : 查看条码
+     * @author : 常皓宁
+     * @date   : 2023/8/31 9:04
+     */
+    click() {
+      this.barCodeModel = true
+    },
+
+    /**
+     * @desc   : 保存
+     * @author : 常皓宁
+     * @date   : 2023/8/30 14:35
+     */
+    saveOrderEntry(params) {
+
+    },
+    /**
+     * @desc   : 通过id查询
+     * @author : 常皓宁
+     * @date   : 2023/8/30 14:35
+     */
+    detail(id) {
+
+    },
+    /**
+     * @desc   : 获取明细
+     * @author : 常皓宁
+     * @date   : 2023/8/31 9:55
+     */
+    getStandardDetail() {
+
+    },
+    /**
+     * @desc   : 返回一览页面
+     * @author : 常皓宁
+     * @date   : 2023/8/30 14:35
+     */
+    btnGroupClick() {
+      this.formData = {}
+      this.closeTag(this.$route)
+    },
+    /**
+     * @desc   : 获取省市区树结构
+     * @author : 洪旭东
+     * @date   : 2022-05-23 16:43
+     */
+    getArea() {
+
+    },
+    /**
+     * @desc   : 查询所属公司
+     * @author : 常皓宁
+     * @date   : 2023/8/8 11:28
+     */
+    getCompany() {
+
+    },
+    /**
+     * @desc   : 查询所属供应商
+     * @author : 常皓宁
+     * @date   : 2023/8/30 14:36
+     */
+    getSupplier() {
+
+    },
+    /**
+     * @desc   : 查询收货仓库
+     * @author : 常皓宁
+     * @date   : 2023/8/30 14:36
+     */
+    getWarehouse() {
+
+    },
+    /**
+     * @desc   : 校验
+     * @author : 常皓宁
+     * @date   : 2023/8/8 13:06
+     */
+    getErrMessage(prop) {
+      return this.errMessage[prop]
+    },
+    /**
+     *   @desc   : 获取商品表格中数量、金额后计算总单信息
+     *   @date   : 2022/5/30 15:31
+     *   @author : 寇珊珊
+     */
+    getTotals(orderEntryItemList) {
+      let table = orderEntryItemList
+      let itemAmount = 0; // 货物总额
+      let weight = 0;// 总重量
+      let volumn = 0;// 总体积
+      let quantityName = this.type == this.$config.formMode.edit ? 'tItemQuantity' : 'entryGoingQuantity'
+      let amountName = this.type == this.$config.formMode.edit ? 'tItemAmount' : 'entryGoingAmount'
+      if (table && table.length > 0) {
+        table.forEach(row => {
+          if (row[amountName]) {
+            // 金额
+            itemAmount += parseFloat(row[amountName]);
+          }
+          // 重量
+          if (row.skuWeight && row[quantityName]) {
+            weight += parseFloat(row[quantityName]) * parseFloat(row.skuWeight);
+          }
+          // 体积
+          if (row.skuVolume && row[quantityName]) {
+            volumn += parseFloat(row[quantityName]) * parseFloat(row.skuVolume);
+          }
+
+          // 如果是组合,需要计算体积和重量
+          if (row['promotionType'] === this.$config.promotionType.combined) {
+            if (row.bomItems && row.bomItems.length > 0) {
+              row.bomItems.forEach(it => {
+                if (it.skuWeight) {
+                  weight += parseFloat(it[quantityName]) * parseFloat(it.skuWeight);
+                }
+                // 体积
+                if (it.skuVolume) {
+                  volumn += parseFloat(it[quantityName]) * parseFloat(it.skuVolume);
+                }
+              })
+            }
+          }
+        })
+      }
+      this.goodsFootFormData.sumGoodsAmount = itemAmount;
+      this.goodsFootFormData.sumWeight = parseFloat(weight.toFixed(6));
+      this.goodsFootFormData.sumVolume = parseFloat(volumn.toFixed(6));
+    },
+    /**
+     * @desc   : 动态加载区域
+     * @author : 洪旭东
+     * @date   : 2022-05-30 11:11
+     */
+    loadArea(item, callback) {
+
+    },
+    /**
+     * @desc   : 校验
+     * @author : 常皓宁
+     * @date   : 2023/8/8 13:06
+     */
+    onValidate({prop, status, error}) {
+      this.$set(this.errMessage, prop, error)
+    },
+  },
+  /**
+   * @desc   : 下拉控件数据源加载
+   * @author : 常皓宁
+   * @date   : 2023/8/8 13:07
+   */
+  created() {
+    // 根据用户敏感信息,设置隐藏列
+    let us = this.$store.state.user.userSensitive.filter(f => f.isCheck && f.docCode == this.$config.docCode.fxPurchaseOrder
+      && f.itemName == this.$config.sensitiveItemName.purchasePrice);
+    if (us.length > 0) {
+      this.visUserSensitive = true;
+    }
+
+    this.detail(this.$route.query.entryId)
+    // 获取省市区树结构
+    // this.getArea()
+    if (this.$store.state.user.cityName) {
+      let city = this.$store.state.user.cityName;
+      // 给城市赋值
+      this.cityData.push({key: city, value: city})
+    }
+    // 查询所属公司
+    this.getCompany();
+    // 查询供应商
+    this.getSupplier();
+    // 查询收货仓库
+    this.getWarehouse();
+  },
+}
+</script>
+
+<style lang="less" scoped>
+//form上下间隔
+.ivu-col {
+  margin-bottom: 3px;
+  margin-top: 3px;
+}
+</style>

+ 495 - 1
src/view/pur/pur-enter/index.vue

@@ -1,10 +1,504 @@
+<!-- @desc:采购入库  @auth:付斌  @time:2024/1/30 15:15 -->
 <template>
+  <div class="main-div">
+    <!--按钮区-->
+    <BaseIndexButtonGroup id="BaseIndexButtonGroup">
+      <template #left>
+        <BaseIndexButton ref="search" name="search"></BaseIndexButton>
+        <BaseIndexButton ref="clear" name="clear"></BaseIndexButton>
+        <BaseIndexButton ref="entryHandle" name="entryHandle" :isMustChooseFlag="false"></BaseIndexButton>
+        <BaseIndexButton ref="completeRevocation" name="completeRevocation" :isMustChooseFlag="false"></BaseIndexButton>
+      </template>
+    </BaseIndexButtonGroup>
 
+    <!--  查询条件区域  -->
+    <div id="search-cond-div" ref="search-cond-div" style="margin-top: 1px;padding: 0">
+      <SearchCond ref="searchCond" v-model="searchCond"
+                  @collapse-change="collapseChange" :setFlag="false"
+                  :search-content="searchContent"
+                  @on-switch-change="changeShowItem"></SearchCond>
+    </div>
+
+    <!--  表格部分  -->
+    <DkSplit mode="vertical" v-model="split" :height="tableHeight">
+      <div slot="top">
+        <!--      商品标价列表-->
+        <DkTabs v-model="tableModel" :options="tabsOptions" @on-click="initData(1)"></DkTabs>
+        <!-- 列表总单  -->
+        <!--待入库Tbale-->
+        <DkTable :id="'table-'+$options.name"
+                 ref="table-select"
+                 :data="tableData"
+                 :height="tableHeight/2-70"
+                 primaryKey="entryId"
+                 @current-change="currentChangeStandard"
+                 @pageChange="pageSizeChange">
+          <DkTableColumn class-name="fixed-left" type="radio" fixed="left" width="45"></DkTableColumn>
+          <DkTableColumn :title="$t('seq')" min-width="44px" type="seq" width="60"></DkTableColumn>
+          <!-- 所属公司-->
+          <DkTableColumn field="sale2Name" :title="$t('ascpId')"></DkTableColumn>
+          <!-- 采购入库单号-->
+          <DkTableColumn :type="$libaray.checkButtonHasRight('entryHandle')?'link':''"
+                         field="entryNo" width="auto" min-width="220px" @on-link="entryHandle"></DkTableColumn>
+          <!-- 发货日期-->
+          <DkTableColumn field="sale1OutDate" width="auto" min-width="110" :filter=false></DkTableColumn>
+          <!-- 入库日期-->
+          <DkTableColumn field="entryDate" width="auto" min-width="110" :filter=false
+                         :title="$t('WarehousingData')"></DkTableColumn>
+          <!-- 入库状态-->
+          <DkTableColumn field="entryStatusString" :title="$t('inStatus')" width="auto" min-width="110"
+                         :filter=false></DkTableColumn>
+          <!-- 待入库数量-->
+          <DkTableColumn field="sumEntryGoingQuantity" :title="'待入库数量'" width="auto" min-width="110" :filter=false
+                         :sum="true" :digits="0"></DkTableColumn>
+          <!-- 待入库金额-->
+          <DkTableColumn field="sumEntryGoingAmount" :title="'待入库金额'" width="auto" min-width="110" :filter=false
+                         :sum="true" :digits="0"></DkTableColumn>
+          <!-- 合计退货数量-->
+          <DkTableColumn field="sumRejectQuantity" :title="'合计退货数量'" width="auto" min-width="110" :filter=false
+                         :sum="true" :digits="0"></DkTableColumn>
+          <!-- 合计退货金额-->
+          <DkTableColumn field="sumRejectAmount" :title="'合计退货金额'" width="auto" min-width="110" :filter=false
+                         :sum="true" :digits="0"></DkTableColumn>
+          <!-- 仓库-->
+          <DkTableColumn field="whName" width="auto" min-width="110" :filter=false></DkTableColumn>
+          <!-- 供应商-->
+          <DkTableColumn field="supplierName" width="auto" min-width="110" :filter=false></DkTableColumn>
+          <!-- 收货人-->
+          <DkTableColumn field="receiverName" width="auto" min-width="110" :filter=false
+                         :title="$t('consignee')"></DkTableColumn>
+          <!-- 收货电话-->
+          <DkTableColumn field="receiverPhone" width="auto" min-width="110" :filter=false
+                         :title="$t('consigneePhone')"></DkTableColumn>
+          <!-- 收货地址-->
+          <DkTableColumn field="receiverAddress" width="auto" min-width="110" :filter=false
+                         :title="$t('takeOverAddress')"></DkTableColumn>
+          <!--制单人-->
+          <DkTableColumn field="makingUserName" :title="$t('makingUser')" width="auto" min-width="110px"
+                         :filter="false"></DkTableColumn>
+          <!--入库办理人-->
+          <DkTableColumn field="doneUserName" :title="$t('entryHandleUser')" width="150px"></DkTableColumn>
+          <!-- 备注-->
+          <DkTableColumn field="remarks" width="auto" min-width="110px" :filter="false"></DkTableColumn>
+        </DkTable>
+      </div>
+      <div slot="bottom">
+        <DkTabs v-model="tabsModel" :options="detailTabsOptions" @on-click="tabsClick"></DkTabs>
+        <!-- 货物明细-->
+        <div v-show="standardGoodsFlag">
+          <DkTable ref="standardGoodsFlag"
+                   primaryKey="itemId"
+                   :id="'table-'+$options.name"
+                   name="table2" :data="goodsDetailData"
+                   :height="this.tableHeight/2-40"
+                   showFooter
+                   :select-flag="false"
+                   :pageFlag="false"
+                   :pageTotalFlag="false"
+                   v-if="this.tableModel === 'waitEntry'">
+            <DkTableColumn type="seq" min-width="44"></DkTableColumn>
+            <!-- 采购订单号-->
+            <DkTableColumn field="procureOrderNo" width="150" :filter="false"
+                           :title="$t('procureOrderNo1')"></DkTableColumn>
+            <!-- 商品型号-->
+            <DkTableColumn field="skuModel" width="150" :filter="false"></DkTableColumn>
+            <!-- 商品名称-->
+            <DkTableColumn field="skuName" width="150" :filter="false"></DkTableColumn>
+            <!-- 唯一编码-->
+            <DkTableColumn field="skuCode" width="200" :filter="false"></DkTableColumn>
+            <!-- 品牌-->
+            <DkTableColumn field="brandName" width="auto" :filter="false" :title="$t('skuBrand')"></DkTableColumn>
+            <!-- 采购单价-->
+            <DkTableColumn field="orderPriceSale" width="auto" :filter="false" v-if="visUserSensitive"></DkTableColumn>
+            <!-- 待入库数量-->
+            <DkTableColumn field="entryGoingQuantity" :title="'待入库数量'" width="auto" min-width="110" :filter=false
+                           :sum="true" :digits="0"></DkTableColumn>
+            <!-- 待入库金额-->
+            <DkTableColumn field="entryGoingAmount" :title="'待入库金额'" width="auto" min-width="110" :filter=false
+                           :sum="true" v-if="visUserSensitive"></DkTableColumn>
+            <!-- 退货数量-->
+            <DkTableColumn field="rejectQuantity" :title="'退货数量'" width="auto" min-width="110" :filter=false
+                           :sum="true" :digits="0"></DkTableColumn>
+            <!-- 退货金额-->
+            <DkTableColumn field="rejectAmount" :title="'退货金额'" width="auto" min-width="110" :filter=false
+                           :sum="true"></DkTableColumn>
+            <!-- 仓库-->
+            <DkTableColumn field="whName" width="auto" :filter="false"></DkTableColumn>
+            <!--型号分类-->
+            <DkTableColumn field="skuTypeName" width="auto" :filter="false"></DkTableColumn>
+            <!--非标号-->
+            <DkTableColumn field="nonStandardCode" width="auto" :filter="false"></DkTableColumn>
+            <DkTableColumn field="remarks" min-width="200" width="auto" :filter=false></DkTableColumn>
+          </DkTable>
+
+          <DkTable ref="standardGoodsFlag"
+                   primaryKey="itemId"
+                   :id="'table-'+$options.name"
+                   name="table2" :data="goodsDetailData"
+                   :height="this.tableHeight/2-40"
+                   showFooter
+                   :select-flag="false"
+                   :pageFlag="false"
+                   :pageTotalFlag="false"
+                   v-if="this.tableModel === 'ingEntry'">
+            <DkTableColumn type="seq" min-width="44"></DkTableColumn>
+            <!-- 采购订单号-->
+            <DkTableColumn field="procureOrderNo" width="150" :filter="false"
+                           :title="$t('procureOrderNo1')"></DkTableColumn>
+            <!-- 商品型号-->
+            <DkTableColumn field="skuModel" width="150" :filter="false"></DkTableColumn>
+            <!-- 商品名称-->
+            <DkTableColumn field="skuName" width="150" :filter="false"></DkTableColumn>
+            <!-- 唯一编码-->
+            <DkTableColumn field="skuCode" width="200" :filter="false"></DkTableColumn>
+            <!-- 品牌-->
+            <DkTableColumn field="brandName" width="auto" :filter="false" :title="$t('skuBrand')"></DkTableColumn>
+            <!-- 采购单价-->
+            <DkTableColumn field="orderPriceSale" width="auto" :filter="false" v-if="visUserSensitive"></DkTableColumn>
+            <!-- 已入库数量-->
+            <DkTableColumn field="entryQuantity" :title="'已入库数量'" width="auto" min-width="110" :filter=false
+                           :sum="true" :digits="0"></DkTableColumn>
+            <!-- 已入库金额-->
+            <DkTableColumn field="entryAmount" :title="'已入库金额'" width="auto" min-width="110" :filter=false
+                           :sum="true" v-if="visUserSensitive"></DkTableColumn>
+            <!-- 仓库-->
+            <DkTableColumn field="whName" width="auto" :filter="false"></DkTableColumn>
+            <!--型号分类-->
+            <DkTableColumn field="skuTypeName" width="auto" :filter="false"></DkTableColumn>
+            <!--非标号-->
+            <DkTableColumn field="nonStandardCode" width="auto" :filter="false"></DkTableColumn>
+            <DkTableColumn field="remarks" min-width="200" width="auto" :filter=false></DkTableColumn>
+          </DkTable>
+        </div>
+        <!--  条码明细-->
+        <div v-show="barcodeDetailsFlag">
+          <DkTable ref="barcodeDetailsFlag"
+                   primaryKey="barcodeId"
+                   :id="'table-'+$options.name"
+                   name="table3" :data="barCodeData"
+                   :height="this.tableHeight/2-40"
+                   :select-flag="false"
+                   :pageFlag="false"
+                   :pageTotalFlag="false">>
+            <DkTableColumn type="seq" min-width="44"></DkTableColumn>
+            <!-- 入库单号-->
+            <DkTableColumn field="entryNo" width="150" :filter="false"></DkTableColumn>
+            <DkTableColumn field="skuModel" width="150" :filter="false"></DkTableColumn>
+            <DkTableColumn field="skuName" width="150" :filter="false"></DkTableColumn>
+            <DkTableColumn field="skuCode" width="200" :filter="false"></DkTableColumn>
+            <DkTableColumn field="barcode" width="150" :filter="false" :title="$t('skuBarcode')"></DkTableColumn>
+            <DkTableColumn field="boxcode" width="150" :filter="false"></DkTableColumn>
+            <!--扫码日期-->
+            <DkTableColumn field="opCreateTime" width="150" :filter="false"></DkTableColumn>
+            <!-- 操作员-->
+            <DkTableColumn field="opCreateUserName" width="150" :filter="false"></DkTableColumn>
+          </DkTable>
+        </div>
+        <!--  附件明细-->
+        <div v-show="reviewResumeFlag">
+          <DkTable ref="reviewResumeFlag"
+                   primaryKey="reviewResumeId"
+                   :id="'table-'+$options.name"
+                   name="table4" :data="reviewResumeData"
+                   :height="this.tableHeight/2-40"
+                   @pageChange="itemPageChange"
+                   :select-flag="false">
+            <DkTableColumn type="seq" min-width="44"></DkTableColumn>
+            <DkTableColumn field="remarks" min-width="200" width="auto" :filter=false></DkTableColumn>
+          </DkTable>
+        </div>
+      </div>
+    </DkSplit>
+  </div>
 </template>
 
 <script>
+import {indexMixin} from '@/mixins'
+
 export default {
-  name: "index"
+  name: "procure-entry",
+  mixins: [indexMixin],
+  data() {
+    let self = this
+    return {
+      //用户敏感信息隐藏
+      visUserSensitive: false,
+      Rectification: false,//查看冲正单据
+      itemPageInfo: {
+        total: 0,
+        pageSize: this.$config.pageSize,
+        currentPage: 1
+      },
+      standardGoodsFlag: true,
+      barcodeDetailsFlag: false,
+      reviewResumeFlag: false,
+      tableModel: 'waitEntry',
+      tabsModel: 'goodsDetail',
+      tabsOptions: [
+        {
+          label: this.$t('waitEntry'),
+          name: 'waitEntry'
+        },
+        {
+          label: this.$t('ingEntry'),
+          name: 'ingEntry'
+        }
+      ],
+      detailTabsOptions: [
+        {
+          label: this.$t('goodsDetail'),
+          name: 'goodsDetail'
+        },
+        {
+          label: this.$t('barcodeDetails'),
+          name: 'barcodeDetails'
+        },
+        {
+          label: this.$t('filesDetail'),
+          name: 'filesDetail'
+        }
+      ],
+      tableData: [],
+      goodsDetailData: [],//商品明细
+      barCodeData: [],//条码明细
+      reviewResumeData: [],//附件明细
+      entryId: null,//入库Id
+      searchContent: [
+        {
+          itemCode: 'entryNo',
+        },
+        {
+          itemCode: 'orderNo',
+        },
+        {
+          itemCode: 'supplierName',
+        },
+        {
+          itemCode: '商品型号-文本',
+          itemName: 'skuModel',
+          valueFormat: {code: 'skuModel'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '商品名称-文本',
+          itemName: 'skuName',
+          valueFormat: {code: 'skuName'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '商品编码-文本',
+          itemName: 'skuCode',
+          valueFormat: {code: 'skuCode'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '仓库名称-文本',
+          itemName: 'whName',
+          valueFormat: {code: 'whName'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '编码-日期',
+          itemName: 'sale1OutDate',
+          valueFormat: {
+            code: 'sale1OutDate',
+            default: [new Date().addMonths(-1).format('yyyy-MM-dd'), new Date().format('yyyy-MM-dd')]
+          },
+          valueKind: 'DATE_RANGE'
+        },
+        {
+          itemCode: '编码-日期',
+          itemName: 'WarehousingData',
+          valueFormat: {
+            code: 'entryDate',
+            default: [new Date().addMonths(-1).format('yyyy-MM-dd'), new Date().format('yyyy-MM-dd')]
+          },
+          valueKind: 'DATE_RANGE'
+        },
+        {
+          itemCode: '查看冲正单据',
+          itemName: '查看冲正单据',
+          valueFormat: {code: 'showItem', default: false},
+          valueKind: 'SWITCH'
+        },
+      ],
+      errMessage: {},
+    }
+  },
+  methods: {
+    //endregion
+    exportData() {
+      let param = this.setSearchParams()
+      delete param.pageSize
+      delete param.currentPage
+      window.location.href = this.$config.serviceUrl + '/mdm-server/sale/standard_item/export?' + qs.stringify(param)
+    },
+
+    /**
+     * @desc   : 点击Tab进行切换
+     * @author : 付斌
+     * @date   : 2024-02-19 11:33
+     */
+    tabsClick(val) {
+      if (val === 'goodsDetail') {
+        this.standardGoodsFlag = true
+        this.barcodeDetailsFlag = false
+        this.reviewResumeFlag = false
+      }
+      if (val === 'barcodeDetails') {
+        this.standardGoodsFlag = false
+        this.barcodeDetailsFlag = true
+        this.reviewResumeFlag = false
+      } else if (val === 'filesDetail') {
+        this.standardGoodsFlag = false
+        this.barcodeDetailsFlag = false
+        this.reviewResumeFlag = true
+      }
+    },
+
+    /**
+     * @desc   : 明细查询
+     * @author : 付斌
+     * @date   : 2024-02-19 11:34
+     */
+    getStandardDetail() {
+
+    },
+    /**
+     * @desc   : 查询
+     * @author : 付斌
+     * @date   : 2024-02-19 11:34
+     */
+    initData(currentPage) {
+      // this.$nextTick(() => {
+      //   //查询条件
+      //   this.searchCondOk(this.searchCond)
+      //   this.loading = true
+      //   this.tableData = []
+      //   if (currentPage) {
+      //     this.pageInfo.currentPage = currentPage
+      //   }
+      //   this.getData()
+      // })
+
+    },
+    /**
+     * @desc   : 查看冲正单据
+     * @author : 付斌
+     * @date   : 2024-02-19 11:34
+     */
+    changeShowItem({code, e}) {
+      if ('showItem' === code) {
+        this.Rectification = e;
+        // 查询数据
+        this.initData(1)
+      }
+    },
+    /**
+     * @desc   : 获取数据
+     * @author : 付斌
+     * @date   : 2024-02-19 11:34
+     */
+    getData() {
+
+    },
+    /**
+     * @desc   : 查询参数设定
+     * @author : 付斌
+     * @date   : 2024-02-19 16:25
+     */
+    setSearchParams() {
+      let params = this.searchList
+      params.currentPage = this.pageInfo.currentPage
+      params.pageSize = this.pageInfo.pageSize
+      params.flgValid = this.$config.flgValid.valid
+      if (this.$store.state.user.ascpId) {
+        params.ascpId = this.$store.state.user.ascpId  //所属公司
+      }
+      params.entryKinds = [this.$config.entryKind.purchaseEntryKind]
+      if (this.tableModel === 'waitEntry') {
+        if (this.Rectification) {
+          params.entryStatuses = [2, 4, -3, -1]
+        } else {
+          params.entryStatuses = [2, 4, -3]
+        }
+      } else if (this.tableModel === 'ingEntry') {
+        if (this.Rectification) {
+          params.entryStatuses = [3, -2]
+        } else {
+          params.entryStatuses = [3]
+        }
+      }
+      return params
+    },
+    /**
+     * @desc   : 列表行变化事件
+     * @author : 付斌
+     * @date   : 2024-02-19 16:26
+     */
+    currentChangeStandard({row}) {
+      if (row) {
+        this.entryId = row.entryId
+        this.currentRow = row
+        this.itemPageInfo.currentPage = 1
+        this.getStandardDetail()
+      }
+    },
+    /**
+     * @desc   : 入库处理
+     * @author : 付斌
+     * @date   : 2023/8/25 14:22
+     */
+    entryHandle() {
+      this.$router.push('/pur/purEnter/entryHandle?entryId=' + this.$refs['table-select'].batchKeys[0])
+    },
+    /**
+     * @desc   : 完成撤销
+     * @author : 付斌
+     * @date   : 2023/8/30 14:02
+     */
+    completeRevocation() {
+
+    },
+    /**
+     * @desc   : 分页
+     * @author : 付斌
+     * @date   : 2024-02-19 16:26
+     */
+    pageSizeChange(pageInfo) {
+      this.pageInfo = pageInfo
+      this.getData()
+    },
+
+    /**
+     * @desc   : 分页事件
+     * @author : 付斌
+     * @date   : 2024-02-19 16:26
+     */
+    itemPageChange(page) {
+      this.itemPageInfo = page
+      this.getStandardDetail()
+    },
+  },
+  created() {
+    this.primaryKey = 'purEnterId'  // 设置主键Id
+    this.routeObjName = 'purEnter'  // 设置路由名称
+
+    // 根据用户敏感信息,设置隐藏列
+    let us = this.$store.state.user.userSensitive.filter(f => f.isCheck && f.docCode == this.$config.docCode.fxPurchaseOrder
+      && f.itemName == this.$config.sensitiveItemName.purchasePrice);
+    if (us.length > 0) {
+      this.visUserSensitive = true;
+    }
+    // //一览查询
+    // this.$nextTick(() => {
+    //   this.initData(1)//初始化数据
+    // })
+  },
+  activated() {
+    // //初始化页面数据
+    // this.initData(1)
+  }
 }
 </script>
 

+ 2448 - 2
src/view/pur/pur-order/form.vue

@@ -1,13 +1,2459 @@
 <template>
+  <div class="main-div" style="position: relative;">
+    <DkButton type="primary" style="position:fixed;right: 100px;z-index: 1000;height: 30px"
+              v-if="this.type == this.$config.formMode.add"
+              @click="purchaseBasedOnSales(true)"> {{ $t('purchaseBasedOnSales') }}
+    </DkButton>
+    <DkCollapse @on-change="changeCollapse" ref="collapse">
+      <DkPanel prop="essentialInformation">
 
+        <!--  单据信息  -->
+        <DkForm slot="content" ref="formInline" v-model="formData" :rules="ruleInline" name="dk-form"
+                style="width:100%" @onValidate="onValidate" :label-max-words="5">
+          <!--所属公司-->
+          <DkFormItem :errorMessage="getErrMessage('ascpId')" :label="$t('affiliatedCompany')"
+                      prop="ascpId" :required="true">
+            <SelectMagnifier v-model="formData.ascpId" :displayText="formData.cpName"
+                             :type="this.$config.MagnifierType.company"
+                             :readonly="checkColumnIsEdit('ascpId')"
+                             @ok="ascpIdOk"
+                             :initSearchFlag="true"
+                             searchType="S"/>
+          </DkFormItem>
+          <!--采购单号-->
+          <DkFormItem prop="orderNo" :label="$t('procureOrderNo')">
+            <InputPop ref="orderNo" v-model="formData.orderNo" :readonly="true"/>
+          </DkFormItem>
+          <!--供应商-->
+          <DkFormItem prop="supplierId" :label="$t('supplier')" :required="true"
+                      :errorMessage="getErrMessage('supplierId')">
+            <SelectMagnifier v-model="formData.supplierId" :display-text="formData.supplierName"
+                             :type="this.$config.MagnifierType.supplier"
+                             :other-condition="{cpId:$store.state.user.cpId,
+                                     orgId:$store.state.user.orgId}"
+                             @ok="supplierOk"
+                             :initSearchFlag="true"
+                             :readonly="checkColumnIsEdit('supplierId')"
+                             searchType="S"/>
+          </DkFormItem>
+          <!--预计收货时间-->
+          <DkFormItem :errorMessage="getErrMessage('entryTime')" :label="$t('expectedDeliverDate')"
+                      prop="entryTime" :required="false">
+            <DatePickerPop v-model="formData.entryTime"
+                           :placeholder="$t('inputWords',{'search-name':$t('entryTime')})"
+                           :readonly="checkColumnIsEdit('entryTime')"
+                           type="date" :short-cut-flag="true"/>
+          </DkFormItem>
+          <!--收货仓库-->
+          <DkFormItem prop="entryWhId" :label="$t('receivingWarehouse')" :required="true"
+                      :errorMessage="getErrMessage('entryWhId')">
+            <SelectMagnifier v-model="formData.entryWhId" :displayText="formData.warehouseName"
+                             :type="this.$config.MagnifierType.warehousePurchase"
+                             @ok="warehouseOk"
+                             :other-condition="{flgValid: true, ascpId: $store.state.user.ascpId}"
+                             :initSearchFlag="true"
+                             searchType="S"/>
+          </DkFormItem>
+          <!--收货人-->
+          <DkFormItem prop="contactName" :label="$t('consignee')" :required="true">
+            <SelectMagnifier v-model="formData.contactName" :display-text="formData.contactName"
+                             :type="this.$config.MagnifierType.address"
+                             :other-condition="{customerId:$store.state.user.sale2CustomerId}"
+                             @ok="addressOk"
+                             :initSearchFlag="true"
+                             :readonly="checkColumnIsEdit('contactName')"
+                             searchType="S"/>
+          </DkFormItem>
+          <!--收货电话-->
+          <DkFormItem prop="contactPhones" :label="$t('consigneePhone')">
+            <InputPop :telephone="true" ref="contactPhones" :readonly="true" v-model="formData.contactPhones"/>
+          </DkFormItem>
+          <!--                &lt;!&ndash;地址定位&ndash;&gt;-->
+          <!--                <Col class="Col" span="6">-->
+          <!--                  <DkFormItem prop="customerDistrict" :label="$t('addressing')">-->
+          <!--                    <RegionsChoose v-model="regionData" :options="cityData" :default-value="formData.addressName"-->
+          <!--                                   ref="customerDistrict"-->
+          <!--                                   @on-choose="chooseAddress"></RegionsChoose>-->
+          <!--                  </DkFormItem>-->
+          <!--                </Col>-->
+          <!--                &lt;!&ndash;门牌号&ndash;&gt;-->
+          <!--                <Col class="Col" span="6">-->
+          <!--                  <DkFormItem :errorMessage="getErrMessage('addressNo')" prop="addressNo" :required="true">-->
+          <!--                    <InputPop ref="addressNo"-->
+          <!--                              v-model="formData.addressNo"-->
+          <!--                              @input="setAddressFull"/>-->
+          <!--                  </DkFormItem>-->
+          <!--                </Col>-->
+          <!--收货地址-->
+          <DkFormItem :label="$t('takeOverAddress')" :errorMessage="getErrMessage('addressFull')"
+                      prop="addressFull" :required="true">
+            <InputPop ref="addressFull" :readonly="true" v-model="formData.addressFull"/>
+          </DkFormItem>
+          <!--备注-->
+          <DkFormItem prop="remarks">
+            <InputPop ref="remarks" v-model="formData.remarks" :readonly="checkColumnIsEdit('remarks')"
+                      maxlength=500 textareaFlag/>
+          </DkFormItem>
+        </DkForm>
+      </DkPanel>
+    </DkCollapse>
+
+    <!--商品信息-->
+    <div style="display: flex;margin-top: 30px">
+      <DkCollapse @on-change="changeCollapse" ref="collapse">
+        <DkPanel prop="goodsInformation">
+          <div id="search-cond-div-goods-info" ref="search-cond-div-goods-info"
+               slot="content">
+            <EditTreeTable ref="goodsTable" :data="formData.goodsList" showFooter exchange-field="replaceableSku"
+                           major-field="itemId"
+                           combined-field="promotionId"
+                           :new-row-flag="!(!this.formData.orgId)"
+                           :readonly="checkColumnIsEdit('goodsTable')"
+                           :amount-name="this.type == this.$config.formMode.add?'itemAmount':'tItemAmount'"
+                           :columns-social="(this.type == this.$config.formMode.add
+                                    || this.type == this.$config.formMode.approval)?goodsColumns:goodsColumnsEdit"
+                           :columns="(this.type == this.$config.formMode.add
+                                    || this.type == this.$config.formMode.approval)?(visUserSensitive? goodsColumns : goodsColumns.filter(it => !it.flgUserSensitive))
+                                    :(visUserSensitive ?goodsColumnsEdit : goodsColumnsEdit.filter(it => !it.flgUserSensitive))"
+                           :orgId="this.formData.orgId"
+                           :customerId="this.formData.customerId"
+                           :saleChannelCode="this.formData.salesChannelCode"
+                           :defWhId="this.formData.defWhId"
+                           :supplierWhName="this.formData.supplierWhName"
+                           :entryWhId="this.formData.entryWhId"
+                           :purchaseWhFlag="true"
+                           :flgHidePrice="!visUserSensitive"
+                           controlId="skuId"
+                           @on-choose="getTotals"
+                           @changeValue="changeValue"
+                           :height="400"
+            ></EditTreeTable>
+            <div>
+              <DkForm slot="content" ref="goodsFootFormData" v-model="goodsFootFormData" :labelMaxWords="5"
+                      name="dk-form"
+                      class="form-content-class">
+                <DkRow>
+                  <!--货物金额-->
+                  <Col class="Col" span="6" v-if="visUserSensitive">
+                    <DkFormItem prop="sumGoodsAmount">
+                      <InputNumberPop ref="sumGoodsAmount" v-model="goodsFootFormData.sumGoodsAmount" :clearable="false"
+                                      :digits="2" :readonly="true"/>
+                    </DkFormItem>
+                  </Col>
+                  <!--总重量-->
+                  <Col class="Col" span="6">
+                    <DkFormItem prop="sumWeight">
+                      <InputNumberPop ref="sumWeight" v-model="goodsFootFormData.sumWeight" :digits="2"
+                                      :readonly="true" unit="KG"/>
+                    </DkFormItem>
+                  </Col>
+                  <!--总体积-->
+                  <Col class="Col" span="6">
+                    <DkFormItem prop="sumVolume">
+                      <InputNumberPop ref="sumVolume" v-model="goodsFootFormData.sumVolume" :digits="2"
+                                      :readonly="true" unit="m³"/>
+                    </DkFormItem>
+                  </Col>
+                </DkRow>
+              </DkForm>
+            </div>
+          </div>
+        </DkPanel>
+      </DkCollapse>
+    </div>
+
+    <!--附件-->
+    <div style="display: flex;margin-bottom: 80px">
+      <DkCollapse @on-change="changeCollapse" ref="collapse">
+        <DkPanel prop="files">
+          <div id="search-cond-div-files-info" ref="search-cond-div-files-info"
+               slot="content">
+            <DkPicWall v-model="formData.annexPaths" :disabled="this.allCanNoEdit?true:false"
+                       folder="t_order/annex_paths" :accept="$config.uploadFileConfig.acceptPicType"
+                       :format="['jpg','jpeg','png']"></DkPicWall>
+          </div>
+        </DkPanel>
+      </DkCollapse>
+    </div>
+    <!--      下部分按钮区域-->
+    <!--分销订单-->
+    <DkSaveButton
+      v-if="this.type != this.$config.formMode.approval"
+      ref="saveButton" :disabled="allCanNoEdit"
+      :showQuotation=true :loading="loading"
+      right-button="purchase-order-save"
+      @save="submitForm(true)"
+      @close="closeForm">
+      <!--分销暂存-->
+      <DkButton ref="saveQuotation" type="primary"
+                v-if="!formData.orderStatus  || formData.orderStatus === this.$config.orderStatus.staging "
+                @click="submitForm(false)" style="margin-right: 10px;" :loading="loading">{{ $t('staging') }}
+      </DkButton>
+    </DkSaveButton>
+
+    <!--以销定采-->
+    <DkModal
+      :loading="loading"
+      v-model="purchaseBasedOnSalesFlag"
+      :title="$t('purchaseBasedOnSales')"
+      width="1500px"
+      @modalOk="purchaseBasedOnSalesOk"
+      @modalCancel="clearPurchaseBasedOnSales"
+    >
+      <card :padding=0 style="margin-top: 1px;padding: 0">
+        <!-- 查询条件-->
+        <DkForm ref="purchaseBasedOnSalesFormData" v-model="purchaseBasedOnSalesFormData"
+                name="purchase-based-on-sales-form"
+                class="form-content-class" style="margin-top: 5px">
+          <DkButton @click="purchaseBasedOnSales(true)"> {{ $t('search') }}</DkButton>
+          <DkButton style="margin-left: 5px" @click="clearPurchaseBasedOnSales"> {{ $t('clear') }}</DkButton>
+          <!--订单单号-->
+          <DkFormItem prop="orderNo" :label="$t('orderNo')">
+            <InputPop ref="orderNo" v-model="purchaseBasedOnSalesFormData.orderNo"/>
+          </DkFormItem>
+          <!--商品型号-->
+          <DkFormItem prop="skuModel" :label="$t('skuModel')">
+            <InputPop ref="skuModel" v-model="purchaseBasedOnSalesFormData.skuModel"/>
+          </DkFormItem>
+          <!--商品编码-->
+          <DkFormItem prop="skuCode" :label="$t('goodCode')">
+            <InputPop ref="skuCode" v-model="purchaseBasedOnSalesFormData.skuCode"/>
+          </DkFormItem>
+          <!--商品名称-->
+          <DkFormItem prop="skuName" :label="$t('skuName')">
+            <InputPop ref="skuName" v-model="purchaseBasedOnSalesFormData.skuName"/>
+          </DkFormItem>
+          <!--客户名称-->
+          <DkFormItem prop="customerName" :label="$t('customerName')">
+            <InputPop ref="customerName" v-model="purchaseBasedOnSalesFormData.customerName"/>
+          </DkFormItem>
+          <!--客户电话-->
+          <DkFormItem prop="customerPhone" :label="$t('customerPhone')">
+            <InputPop ref="customerPhone" v-model="purchaseBasedOnSalesFormData.customerPhone"/>
+          </DkFormItem>
+          <!--详细地址-->
+          <DkFormItem prop="addressFull" :label="$t('customerAddress')">
+            <InputPop ref="addressFull" v-model="purchaseBasedOnSalesFormData.addressFull"/>
+          </DkFormItem>
+          <!--部门-->
+          <DkFormItem prop="orgId" :label="$t('orgId')">
+            <SelectMagnifier v-model="purchaseBasedOnSalesFormData.orgId"
+                             :display-text="purchaseBasedOnSalesFormData.orgName"
+                             :type="this.$config.MagnifierType.organization"
+                             :other-condition="{cpId:$store.state.user.cpId}"
+                             searchType="S"/>
+          </DkFormItem>
+          <!--送货日期-->
+          <DkFormItem prop="deliveryTime">
+            <DatePickerPop v-model="purchaseBasedOnSalesFormData.deliveryTime"
+                           :placeholder="$t('inputWords',{'search-name':$t('estimateDeliveryDate')})"
+                           type="date" :short-cut-flag="true"/>
+          </DkFormItem>
+        </DkForm>
+        <DkTable primaryKey="itemId"
+                 ref="table-purchase-based-on-sales-select" :id="'table-'+$options.name"
+                 name="table"
+                 :data="purchaseBasedOnSalesTableData"
+                 :height="purchaseBasedOnSalesHeight"
+                 :lazy="false"
+                 :selectFlag="false"
+                 :operateFlag="false"
+                 :link-click-checked="true"
+                 @pageChange="purchaseBasedOnSalePageSizeChange">
+          <DkTableColumn class-name="fixed-left" type="checkbox" fixed="left" width="45"></DkTableColumn>
+          <DkTableColumn type="seq" align="center" width="60" min-width="44px"></DkTableColumn>
+          <DkTableColumn v-for="(item,index) in purchaseBasedOnSalesColumns" :key="index" :field="item.field"
+                         :title="item.title"
+                         :width="item.width"
+                         :filter="false"
+                         :resize-flag="index === purchaseBasedOnSalesColumns.length - 1"></DkTableColumn>
+        </DkTable>
+      </card>
+    </DkModal>
+  </div>
 </template>
 
 <script>
+
+import {formMixin} from '@/mixins/form'
+
 export default {
-  name: "form"
+  components: {},
+  mixins: [formMixin],
+  data() {
+    let self = this
+    return {
+      //用户敏感信息隐藏
+      visUserSensitive: false,
+      //以销定采
+      purchaseBasedOnSalesFlag: false,
+      purchaseBasedOnSalesTableData: [],
+      purchaseBasedOnSalesHeight: 400,
+      purchaseBasedOnSalesColumns: [
+        {field: 'orderNo', width: '200px', title: self.$t('saleOrderNo'), type: 'text'},
+        {
+          field: 'transferableQuantity',
+          width: '120px',
+          type: 'number',
+          digits: 0,
+          sum: true
+        },//可转采购数量
+        {field: 'skuModel', type: 'text'},//商品型号
+        {field: 'skuName', width: '200px', type: 'text'},//商品名称
+        {field: 'skuCode', width: '100px', type: 'text'},//商品编码
+        {field: 'makingTime', width: '200px', type: 'text'},//订单日期
+        {field: 'entryTime', width: '200px', title: self.$t('expectedDeliverDate'), type: 'text'},//预计送货日期
+        {field: 'outStatusStringDetail', width: '200px', title: self.$t('orderStatus'), type: 'text'},//单据状态
+        {field: 'customerName', width: '200px', type: 'text'},//客户名称
+        {field: 'customerPhone', width: '200px', type: 'text'},//客户电话
+        {field: 'addressFull', width: '200px', type: 'text'},//客户地址
+        {field: 'orgName', width: '200px', title: self.$t('orgId'), type: 'text'},//业务部门
+        {field: 'staffName', width: '200px', title: self.$t('staffId'), type: 'text'},//业务员
+        {field: 'priceSale', width: '120px', title: self.$t('salePrice'), type: 'text'},//销售单价
+        {field: 'itemAmount', width: '120px', title: self.$t('saleAmount'), type: 'text'},//销售金额
+        {field: 'warehouseName', width: '120px', type: 'text'},//仓库
+        {field: 'brandName', width: '120px', type: 'text'},//商品品牌
+        {field: 'nonStandardCode', width: '120px', type: 'text'},//非标号
+        {field: 'skuWeight', width: '120px', type: 'number', digits: 2, sum: true},//重量
+        {field: 'skuVolume', width: '120px', type: 'number', digits: 2, sum: true},//体积
+        {field: 'remarks', width: '120px', type: 'text'},//备注
+        // {field: 'outGoingQuantity', width: '120px', type: 'number', digits: 0, dataType: 'number', sum: true},
+        // {field: 'outQuantity', width: '120px', type: 'number', digits: 0, dataType: 'number', sum: true},
+        // {field: 'rejectQuantity', width: '120px', type: 'number', digits: 0, dataType: 'number', sum: true},
+        // {field: 'skuTypeName', width: '120px', type: 'text'},
+        // {field: 'promotionTypeName', width: '120px', type: 'text'},
+        // {field: 'promotionPriceTypeName', width: '120px', type: 'text'},
+      ],
+      purchaseBasedOnSalePageInfo: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      orderId: null,
+      procureList: [],//每次以销定采选择后存放数据
+      //连接业务接口
+      purchaseBasedOnSalesFormData: {
+        orderNo: null,//订单单号
+        deliveryTime: null,//送货日期
+        customerName: null,//客户名称
+        customerPhone: null,//客户电话
+        addressFull: null,//详细地址
+        orgId: null,//业务部门
+        orgName: null,//业务名称
+        skuModel: null,//商品型号
+        skuCode: null,//商品名称
+        skuName: null,//商品编码
+      },
+      //画面模式选项角标
+      bottomList: ['1', '2', '3', '5'],
+      setCustomerFlag: false,  // 是否是选择客户设置以及编辑时设置
+      loading: false,
+      //一直可以编辑的列(客户名称(暂时不让改)、客户来源、 客户送货信息:客户地址、联系人、联系电话、小区档案 预计收货日期、备注、附件)
+      alwaysEditColumns: ['remarks', 'designRemarks', 'customerFrom',
+        'addressName', 'addressNo', 'contractNo', 'entryTime', 'estateId', 'contactName', 'contactPhones'],
+      customerColumns: ['customerName', 'addressNo', 'addressGcj02', 'contactName', 'contactPhones', 'addressName'],
+      allCanEdit: true,  //是否可以进行大编辑
+      allCanNoEdit: false, //是否所有的都不允许编辑
+      formData: {
+        ascpId: null,//所属公司Id
+        sale1Id: null,//二级商户
+        sale2Id: null,//一级商户
+        cpId: null,//公司ID
+        cpName: null,//所属公司
+        orderId: 0, //订单Id
+        orderNo: null,
+        supplierId: null,//供应商Id
+        supplierName: null,//供应商名称
+        supplierCode: null,//供应商编码
+        entryTime: null,//预计收货日期
+        entryWhId: null,//默认仓库
+        warehouseName: null,
+        orgId: self.$store.state.user.orgId,
+        staffId: self.$store.state.user.staffId,
+        staffName: null,
+        staffCode: null,
+        erpUserCode: null,
+        orgName: null,
+        orgCode: null,
+        erpOrgCode: null,
+        salesChannel: null,//销售渠道
+        salesChannelName: null,//销售渠道名称
+        salesChannelCode: null,//销售渠道编码
+        remarks: null,
+        sale2OrgId: null,
+        goodsList: [],
+        feeFormData: {},
+        files: [],
+        feeList: [], //费用金额
+        sumFeeAmount: 0,//累计费用金额
+        receiptList: [], //定金金额
+        // 交货方式
+        deliveryType: null,
+        remarksInside: null,
+        defWhId: null,//默认仓库
+        supplierWhName: null,//经销商仓库
+        // 附件
+        annexPaths: [],
+        //地址id
+        addressId: null,
+        //客户信息
+        customerId: null,//客户Id
+        customerName: null,//客户名称
+        customerCode: null,//客户编码
+        customerPhone: null,//客户电话
+        customerFrom: null,//客户来源
+        customerFromName: null,//客户来源
+        contactName: null,//联系人
+        contactPhones: null,//联系电话
+        addressArea: null,//行政区划
+        addressFull: null,//详细地址
+        addressGcj02: null,//地址坐标(gcj02)
+        addressName: null,//小区或POI
+        addressNo: null,//门牌号
+        estateId: null,//小区档案
+        customerDistrict: {},//记录选择的客户区域
+        erpPushStatus: null,//推送结果
+        apvResult: null,//审批结果
+        editTime: null,//编辑的时间戳
+        orderStatus: null,//订单状态
+        docCode: null,//单据类型
+        orderType: null,//订单类型
+        staffList: [],//业务员数组
+        orgList: [],//组织机构数组
+        designStatusFlag: false,//设计状态标识
+      },
+      orderType: null,
+      regionData: [],//客户区域
+      cityData: [],//客户区域
+      // 校验规则
+      ruleInline: {
+        //所属公司
+        cpName: [
+          {required: true, trigger: 'none'}
+        ],
+        //供应商
+        supplierId: [
+          {required: true, trigger: 'none', type: 'number'}
+        ],
+        //收货仓库
+        entryWhId: [
+          {required: true, trigger: 'none', type: 'number'}
+        ],
+        // 收货地址
+        customerDistrict: [
+          {required: true, trigger: 'none', type: 'object'}
+        ],
+        //客户地址
+        addressFull: [
+          {required: true, trigger: 'none'}
+        ],
+        //联系人
+        contactName: [
+          {required: true, trigger: 'none'}
+        ],
+      },
+      //监听上一次所选的用户
+      userFormData: {},
+      tableHeight: 300,
+      // 保存错误消息
+      errMessage: {},
+      goodsColumns: [
+        {
+          field: 'skuModel',
+          controlId: 'skuId',
+          treeNode: true,
+          width: 200,
+          type: 'tableSelect',
+          fixed: 'left',
+          promotionType: true,
+          dataType: self.$config.tableSelectType.goods,
+          tip: self.$t('W_117'),
+          fieldUpdate: [
+            {updateField: 'skuCode', valueFiled: 'skuCode'},
+            {updateField: 'skuModel', valueFiled: 'skuModel'},
+            {updateField: 'itemPrice', valueFiled: 'itemPrice'},
+            {updateField: 'itemQuantity', valueFiled: 'itemQuantity', defaultValue: 1},
+            {updateField: 'skuId', valueFiled: 'skuId'},
+            {updateField: 'skuName', valueFiled: 'skuName'},
+            {updateField: 'spuId', valueFiled: 'spuId'},
+            {updateField: 'spuCode', valueFiled: 'spuCode'},
+            {updateField: 'skuSpecs', valueFiled: 'skuSpecs'},//商品规格
+            {updateField: 'skuUnit', valueFiled: 'skuUnit'},//计量单位
+            {updateField: 'flgEstimate', valueFiled: 'flgEstimate'},//计量标识
+            {updateField: 'salesMode', valueFiled: 'salesMode'},//流通方式
+            {updateField: 'goodsCategoryName', valueFiled: 'goodsCategoryName'},//商品种类
+            {updateField: 'goodsVarietyName', valueFiled: 'goodsCategoryName'},//商品品种
+            {updateField: 'skuSeries', valueFiled: 'skuSeries'},//商品系列
+            {updateField: 'skuBrand', valueFiled: 'skuBrand'},//商品品牌
+            {updateField: 'skuLength', valueFiled: 'skuLength'},
+            {updateField: 'skuWidth', valueFiled: 'skuWidth'},
+            {updateField: 'skuHeight', valueFiled: 'skuHeight'},
+            {updateField: 'skuVolume', valueFiled: 'skuVolume'},
+            {updateField: 'skuWeight', valueFiled: 'skuWeight'},
+            {updateField: 'skuArea', valueFiled: 'skuArea'},
+            {updateField: 'skuType', valueFiled: 'skuType'},
+            {updateField: 'standardId', valueFiled: 'standardId'},
+            {updateField: 'standardItemId', valueFiled: 'standardItemId'},
+            {updateField: 'priceStandard', valueFiled: 'priceStandard'},
+            {updateField: 'promotionId', valueFiled: 'promotionId'},
+            {updateField: 'promotionItemId', valueFiled: 'promotionItemId'},
+            {updateField: 'pricePromotion', valueFiled: 'pricePromotion'},
+            {updateField: 'priceSale', valueFiled: 'priceSale'},
+            {updateField: 'promotionTypeName', valueFiled: 'promotionTypeName'},
+            {updateField: 'promotionPriceType', valueFiled: 'promotionPriceType'},
+            {updateField: 'promotionPriceTypeName', valueFiled: 'promotionPriceTypeName'},
+            {updateField: 'promotionType', valueFiled: 'promotionType'},
+            {updateField: 'promotionName', valueFiled: 'promotionName'},
+            {updateField: 'activityId', valueFiled: 'activityId'},
+            {updateField: 'activityName', valueFiled: 'activityName'},
+            {updateField: 'combinedTypeId', valueFiled: 'combinedTypeId'},
+            {updateField: 'combinedSpecsId', valueFiled: 'combinedSpecsId'},
+            {updateField: 'orderItemQuantity', valueFiled: 'orderItemQuantity'},
+            {updateField: 'discountStandard', valueFiled: 'discountStandard'},
+            {updateField: 'discountPromotion', valueFiled: 'discountPromotion'},
+            {updateField: 'flgGift', valueFiled: 'flgGift'},
+            {updateField: 'nonGlassPriceItems', valueFiled: 'nonGlassPriceItems'},
+            {updateField: 'nonGlassSpuItems', valueFiled: 'nonGlassSpuItems'},
+            {updateField: 'nonGlassListShow', valueFiled: 'nonGlassListShow'},
+            {updateField: 'flgNonStandardType', valueFiled: 'flgNonStandardType'},
+            {updateField: 'specialType', valueFiled: 'specialType'},
+            {updateField: 'cpFlgGift', valueFiled: 'cpFlgGift'},
+            {updateField: 'flgAllowSpecsUndefine', valueFiled: 'flgAllowSpecsUndefine'},
+            {updateField: 'flgSpecsUndefine', valueFiled: 'flgSpecsUndefine'},
+            {updateField: 'specialFormula', valueFiled: 'specialFormula'},
+            {updateField: 'entryWhId', valueFiled: 'entryWhId'},
+            {updateField: 'nonStandardCode', valueFiled: 'nonStandardCode'},
+            {updateField: 'warehouseName', valueFiled: 'warehouseName'},
+            {updateField: 'bomParentId', valueFiled: 'bomParentId'},
+          ],
+          searchDetailFlag: false
+        },
+        {
+          field: 'skuName',
+          controlId: 'skuId',
+          type: 'tableSelect',
+          width: 300,
+          fixed: 'left',
+          promotionType: true,
+          dataType: self.$config.tableSelectType.goods,
+          fieldUpdate: [
+            {updateField: 'skuCode', valueFiled: 'skuCode'},
+            {updateField: 'skuModel', valueFiled: 'skuModel'},
+            {updateField: 'itemPrice', valueFiled: 'itemPrice'},
+            {updateField: 'itemQuantity', valueFiled: 'itemQuantity', defaultValue: 1},
+            {updateField: 'skuId', valueFiled: 'skuId'},
+            {updateField: 'skuName', valueFiled: 'skuName'},
+            {updateField: 'spuId', valueFiled: 'spuId'},
+            {updateField: 'spuCode', valueFiled: 'spuCode'},
+            {updateField: 'skuSpecs', valueFiled: 'skuSpecs'},//商品规格
+            {updateField: 'skuUnit', valueFiled: 'skuUnit'},//计量单位
+            {updateField: 'flgEstimate', valueFiled: 'flgEstimate'},//计量标识
+            {updateField: 'salesMode', valueFiled: 'salesMode'},//流通方式
+            {updateField: 'goodsCategoryName', valueFiled: 'goodsCategoryName'},//商品种类
+            {updateField: 'goodsVarietyName', valueFiled: 'goodsCategoryName'},//商品品种
+            {updateField: 'skuSeries', valueFiled: 'skuSeries'},//商品系列
+            {updateField: 'skuBrand', valueFiled: 'skuBrand'},//商品品牌
+            {updateField: 'skuLength', valueFiled: 'skuLength'},
+            {updateField: 'skuWidth', valueFiled: 'skuWidth'},
+            {updateField: 'skuHeight', valueFiled: 'skuHeight'},
+            {updateField: 'skuVolume', valueFiled: 'skuVolume'},
+            {updateField: 'skuWeight', valueFiled: 'skuWeight'},
+            {updateField: 'skuArea', valueFiled: 'skuArea'},
+            {updateField: 'skuType', valueFiled: 'skuType'},
+            {updateField: 'standardId', valueFiled: 'standardId'},
+            {updateField: 'standardItemId', valueFiled: 'standardItemId'},
+            {updateField: 'priceStandard', valueFiled: 'priceStandard'},
+            {updateField: 'promotionId', valueFiled: 'promotionId'},
+            {updateField: 'promotionItemId', valueFiled: 'promotionItemId'},
+            {updateField: 'pricePromotion', valueFiled: 'pricePromotion'},
+            {updateField: 'priceSale', valueFiled: 'priceSale'},
+            {updateField: 'promotionTypeName', valueFiled: 'promotionTypeName'},
+            {updateField: 'promotionPriceType', valueFiled: 'promotionPriceType'},
+            {updateField: 'promotionPriceTypeName', valueFiled: 'promotionPriceTypeName'},
+            {updateField: 'promotionType', valueFiled: 'promotionType'},
+            {updateField: 'promotionName', valueFiled: 'promotionName'},
+            {updateField: 'activityId', valueFiled: 'activityId'},
+            {updateField: 'activityName', valueFiled: 'activityName'},
+            {updateField: 'combinedTypeId', valueFiled: 'combinedTypeId'},
+            {updateField: 'combinedSpecsId', valueFiled: 'combinedSpecsId'},
+            {updateField: 'orderItemQuantity', valueFiled: 'orderItemQuantity'},
+            {updateField: 'discountStandard', valueFiled: 'discountStandard'},
+            {updateField: 'discountPromotion', valueFiled: 'discountPromotion'},
+            {updateField: 'flgGift', valueFiled: 'flgGift'},
+            {updateField: 'nonGlassPriceItems', valueFiled: 'nonGlassPriceItems'},
+            {updateField: 'nonGlassSpuItems', valueFiled: 'nonGlassSpuItems'},
+            {updateField: 'nonGlassListShow', valueFiled: 'nonGlassListShow'},
+            {updateField: 'flgNonStandardType', valueFiled: 'flgNonStandardType'},
+            {updateField: 'specialType', valueFiled: 'specialType'},
+            {updateField: 'cpFlgGift', valueFiled: 'cpFlgGift'},
+            {updateField: 'flgAllowSpecsUndefine', valueFiled: 'flgAllowSpecsUndefine'},
+            {updateField: 'flgSpecsUndefine', valueFiled: 'flgSpecsUndefine'},
+            {updateField: 'specialFormula', valueFiled: 'specialFormula'},
+            {updateField: 'entryWhId', valueFiled: 'entryWhId'},
+            {updateField: 'nonStandardCode', valueFiled: 'nonStandardCode'},
+            {updateField: 'warehouseName', valueFiled: 'warehouseName'},
+            {updateField: 'bomParentId', valueFiled: 'bomParentId'},
+          ],
+          searchDetailFlag: false
+        },
+        {
+          field: 'itemQuantity',
+          type: 'number',
+          shareField: 'orderItemQuantity',
+          digits: 0,
+          sum: true,
+          formula: {
+            itemAmount: ['itemQuantity*priceSale*nonStandardArea', 'itemQuantity', 'priceSale', 'nonStandardArea'],
+            discountStandard: ['priceSale/priceStandard*100', 'priceSale', 'priceStandard'],
+            discountPromotion: ['priceSale/pricePromotion*100', 'priceSale', 'pricePromotion']
+          },
+        },//数量
+        {
+          field: 'priceSale',
+          type: 'disabled',
+          flgUserSensitive: true,
+          digits: 2,
+          switchField: 'flgGift', // 开关控制的列
+          formula: {
+            itemAmount: ['itemQuantity*priceSale*nonStandardArea', 'itemQuantity', 'priceSale', 'nonStandardArea'],
+            discountStandard: ['priceSale/priceStandard*100', 'priceSale', 'priceStandard'],
+            discountPromotion: ['priceSale/pricePromotion*100', 'priceSale', 'pricePromotion']
+          },
+          shareField: 'percent',
+          percent: ['priceSale/pricePromotion*pricePromotion[child]', 'priceSale', 'pricePromotion[child]', 'pricePromotion']
+        },//价格(子级放在前面,不然replace就不对)
+        {
+          field: 'itemAmount',
+          type: 'disabled',
+          flgUserSensitive: true,
+          digits: 2,
+          number: true,
+          sum: true,
+          shareField: 'percent',
+          switchField: 'flgGift', // 开关控制的列
+          supply: true,  // 补缺,最后一条,用父级-其他子级
+          // amount: ['itemQuantity[child]*priceSale[child]', 'itemQuantity[child]', 'priceSale[child]'],
+          percent: ['itemAmount/pricePromotion*pricePromotion[child]', 'itemAmount', 'pricePromotion[child]', 'pricePromotion'],
+          formulaLate: true,  // 只有在changevalue时触发,为了避免价格和数量计算金额,然后再根据金额和数量计算价格
+          formula: {
+            priceSale: ['itemAmount/itemQuantity/nonStandardArea', 'itemAmount', 'itemQuantity', 'nonStandardArea'],
+            discountStandard: ['itemAmount/itemQuantity/priceStandard/nonStandardArea*100', 'itemAmount', 'itemQuantity', 'priceStandard', 'nonStandardArea'],
+            discountPromotion: ['itemAmount/itemQuantity/pricePromotion/nonStandardArea*100', 'itemAmount', 'itemQuantity', 'pricePromotion', 'nonStandardArea']
+          },
+        },//金额
+        {field: 'activityName', type: 'disabled'},//套餐名称
+        {field: 'promotionTypeName', type: 'disabled'},//促销类型
+        {field: 'promotionName', type: 'disabled', title: self.$t('promoName')},//促销名称
+        {
+          field: 'priceStandard',
+          type: 'disabled',
+          flgUserSensitive: true,
+          showFlag: true,
+          number: true,
+          digits: 2,
+          shareField: 'sumTotal',
+          // 根据子级去计算父级
+          sumTotal: ['orderItemQuantity[child]*priceStandard[child]', 'orderItemQuantity[child]', 'priceStandard[child]']
+        },//商品标价
+        {
+          field: 'pricePromotion',
+          type: 'disabled',
+          flgUserSensitive: true,
+          showFlag: true,
+          number: true,
+          digits: 2,
+          title: self.$t('standardPriceMoney'),
+        },//商品促销价
+        {
+          field: 'discountStandard',
+          type: 'disabled',
+          flgUserSensitive: true,
+          showFlag: true,
+          number: true,
+          digits: 2,
+        },//标价折扣
+        {
+          field: 'discountPromotion',
+          type: 'disabled',
+          flgUserSensitive: true,
+          showFlag: true,
+          number: true,
+          equal: true,
+          digits: 2,
+        },//促销折扣
+        {
+          field: 'entryWhId',
+          type: 'select',
+          title: self.$t('receivingWarehouse'),
+          options: () => self.warehouseList,
+          labelKey: 'whName',
+          valueKey: 'whId',
+          equal: true,
+        },//收货仓库
+        {
+          field: 'nonStandardCode',
+          type: 'disabled',
+        },//非标号
+        {field: 'nonGlassListShow', type: 'nonGlassFlag'},//非标信息
+        {
+          field: 'warehouseName',
+          title: self.$t('supplierWarehouseName'),
+          type: 'disabled',
+        },//经销商仓库
+        {
+          field: 'brandName',
+          title: self.$t('skuBrand'),
+          type: 'disabled',
+        },//商品品牌
+        {
+          field: 'skuWeight',
+          title: self.$t('skuWeight'),
+          type: 'disabled',
+        },//重量
+        {
+          field: 'skuVolume',
+          title: self.$t('skuVolume'),
+          type: 'disabled',
+        },//体积
+        {
+          field: 'flgGift',
+          type: 'switch',
+          width: 100,
+          value: false,
+          controlField: 'cpFlgGift',
+          switchField: 'priceSale'  // 开关控制的列
+        },//赠品标识
+        {
+          field: 'remarks', type: 'text', width: 300,
+          equal: true,
+        },
+      ],
+      goodsColumnsEdit: [
+        {
+          field: 'skuModel',
+          controlId: 'skuId',
+          treeNode: true,
+          width: 200,
+          type: 'tableSelect',
+          fixed: 'left',
+          promotionType: true,
+          dataType: self.$config.tableSelectType.goods,
+          tip: self.$t('W_117'),
+          fieldUpdate: [
+            {updateField: 'skuCode', valueFiled: 'skuCode'},
+            {updateField: 'skuModel', valueFiled: 'skuModel'},
+            {updateField: 'itemPrice', valueFiled: 'itemPrice'},
+            {updateField: 'tItemQuantity', valueFiled: 'tItemQuantity', defaultValue: 1},
+            {updateField: 'skuId', valueFiled: 'skuId'},
+            {updateField: 'skuName', valueFiled: 'skuName'},
+            {updateField: 'spuId', valueFiled: 'spuId'},
+            {updateField: 'spuCode', valueFiled: 'spuCode'},
+            {updateField: 'skuSpecs', valueFiled: 'skuSpecs'},//商品规格
+            {updateField: 'skuUnit', valueFiled: 'skuUnit'},//计量单位
+            {updateField: 'flgEstimate', valueFiled: 'flgEstimate'},//计量标识
+            {updateField: 'salesMode', valueFiled: 'salesMode'},//流通方式
+            {updateField: 'goodsCategoryName', valueFiled: 'goodsCategoryName'},//商品种类
+            {updateField: 'goodsVarietyName', valueFiled: 'goodsCategoryName'},//商品品种
+            {updateField: 'skuSeries', valueFiled: 'skuSeries'},//商品系列
+            {updateField: 'skuBrand', valueFiled: 'skuBrand'},//商品品牌
+            {updateField: 'skuLength', valueFiled: 'skuLength'},
+            {updateField: 'skuWidth', valueFiled: 'skuWidth'},
+            {updateField: 'skuHeight', valueFiled: 'skuHeight'},
+            {updateField: 'skuVolume', valueFiled: 'skuVolume'},
+            {updateField: 'skuWeight', valueFiled: 'skuWeight'},
+            {updateField: 'skuArea', valueFiled: 'skuArea'},
+            {updateField: 'skuType', valueFiled: 'skuType'},
+            {updateField: 'standardId', valueFiled: 'standardId'},
+            {updateField: 'standardItemId', valueFiled: 'standardItemId'},
+            {updateField: 'priceStandard', valueFiled: 'priceStandard'},
+            {updateField: 'promotionId', valueFiled: 'promotionId'},
+            {updateField: 'promotionItemId', valueFiled: 'promotionItemId'},
+            {updateField: 'pricePromotion', valueFiled: 'pricePromotion'},
+            {updateField: 'priceSale', valueFiled: 'priceSale'},
+            {updateField: 'promotionTypeName', valueFiled: 'promotionTypeName'},
+            {updateField: 'promotionPriceType', valueFiled: 'promotionPriceType'},
+            {updateField: 'promotionPriceTypeName', valueFiled: 'promotionPriceTypeName'},
+            {updateField: 'promotionType', valueFiled: 'promotionType'},
+            {updateField: 'promotionName', valueFiled: 'promotionName'},
+            {updateField: 'activityId', valueFiled: 'activityId'},
+            {updateField: 'activityName', valueFiled: 'activityName'},
+            {updateField: 'combinedTypeId', valueFiled: 'combinedTypeId'},
+            {updateField: 'combinedSpecsId', valueFiled: 'combinedSpecsId'},
+            {updateField: 'orderItemQuantity', valueFiled: 'orderItemQuantity'},
+            {updateField: 'discountStandard', valueFiled: 'discountStandard'},
+            {updateField: 'discountPromotion', valueFiled: 'discountPromotion'},
+            {updateField: 'flgGift', valueFiled: 'flgGift'},
+            {updateField: 'nonGlassPriceItems', valueFiled: 'nonGlassPriceItems'},
+            {updateField: 'nonGlassSpuItems', valueFiled: 'nonGlassSpuItems'},
+            {updateField: 'nonGlassListShow', valueFiled: 'nonGlassListShow'},
+            {updateField: 'flgNonStandardType', valueFiled: 'flgNonStandardType'},
+            {updateField: 'specialType', valueFiled: 'specialType'},
+            {updateField: 'cpFlgGift', valueFiled: 'cpFlgGift'},
+            {updateField: 'flgAllowSpecsUndefine', valueFiled: 'flgAllowSpecsUndefine'},
+            {updateField: 'flgSpecsUndefine', valueFiled: 'flgSpecsUndefine'},
+            {updateField: 'specialFormula', valueFiled: 'specialFormula'},
+            {updateField: 'entryWhId', valueFiled: 'entryWhId'},
+            {updateField: 'nonStandardCode', valueFiled: 'nonStandardCode'},
+            {updateField: 'warehouseName', valueFiled: 'warehouseName'},
+            {updateField: 'bomParentId', valueFiled: 'bomParentId'},
+          ],
+          searchDetailFlag: false
+        },
+        {
+          field: 'skuName',
+          controlId: 'skuId',
+          type: 'tableSelect',
+          width: 300,
+          fixed: 'left',
+          promotionType: true,
+          dataType: self.$config.tableSelectType.goods,
+          fieldUpdate: [
+            {updateField: 'skuCode', valueFiled: 'skuCode'},
+            {updateField: 'skuModel', valueFiled: 'skuModel'},
+            {updateField: 'itemPrice', valueFiled: 'itemPrice'},
+            {updateField: 'tItemQuantity', valueFiled: 'tItemQuantity', defaultValue: 1},
+            {updateField: 'skuId', valueFiled: 'skuId'},
+            {updateField: 'skuName', valueFiled: 'skuName'},
+            {updateField: 'spuId', valueFiled: 'spuId'},
+            {updateField: 'spuCode', valueFiled: 'spuCode'},
+            {updateField: 'skuSpecs', valueFiled: 'skuSpecs'},//商品规格
+            {updateField: 'skuUnit', valueFiled: 'skuUnit'},//计量单位
+            {updateField: 'flgEstimate', valueFiled: 'flgEstimate'},//计量标识
+            {updateField: 'salesMode', valueFiled: 'salesMode'},//流通方式
+            {updateField: 'goodsCategoryName', valueFiled: 'goodsCategoryName'},//商品种类
+            {updateField: 'goodsVarietyName', valueFiled: 'goodsCategoryName'},//商品品种
+            {updateField: 'skuSeries', valueFiled: 'skuSeries'},//商品系列
+            {updateField: 'skuBrand', valueFiled: 'skuBrand'},//商品品牌
+            {updateField: 'skuLength', valueFiled: 'skuLength'},
+            {updateField: 'skuWidth', valueFiled: 'skuWidth'},
+            {updateField: 'skuHeight', valueFiled: 'skuHeight'},
+            {updateField: 'skuVolume', valueFiled: 'skuVolume'},
+            {updateField: 'skuWeight', valueFiled: 'skuWeight'},
+            {updateField: 'skuArea', valueFiled: 'skuArea'},
+            {updateField: 'skuType', valueFiled: 'skuType'},
+            {updateField: 'standardId', valueFiled: 'standardId'},
+            {updateField: 'standardItemId', valueFiled: 'standardItemId'},
+            {updateField: 'priceStandard', valueFiled: 'priceStandard'},
+            {updateField: 'promotionId', valueFiled: 'promotionId'},
+            {updateField: 'promotionItemId', valueFiled: 'promotionItemId'},
+            {updateField: 'pricePromotion', valueFiled: 'pricePromotion'},
+            {updateField: 'priceSale', valueFiled: 'priceSale'},
+            {updateField: 'promotionTypeName', valueFiled: 'promotionTypeName'},
+            {updateField: 'promotionPriceType', valueFiled: 'promotionPriceType'},
+            {updateField: 'promotionPriceTypeName', valueFiled: 'promotionPriceTypeName'},
+            {updateField: 'promotionType', valueFiled: 'promotionType'},
+            {updateField: 'promotionName', valueFiled: 'promotionName'},
+            {updateField: 'activityId', valueFiled: 'activityId'},
+            {updateField: 'activityName', valueFiled: 'activityName'},
+            {updateField: 'combinedTypeId', valueFiled: 'combinedTypeId'},
+            {updateField: 'combinedSpecsId', valueFiled: 'combinedSpecsId'},
+            {updateField: 'orderItemQuantity', valueFiled: 'orderItemQuantity'},
+            {updateField: 'discountStandard', valueFiled: 'discountStandard'},
+            {updateField: 'discountPromotion', valueFiled: 'discountPromotion'},
+            {updateField: 'flgGift', valueFiled: 'flgGift'},
+            {updateField: 'nonGlassPriceItems', valueFiled: 'nonGlassPriceItems'},
+            {updateField: 'nonGlassSpuItems', valueFiled: 'nonGlassSpuItems'},
+            {updateField: 'nonGlassListShow', valueFiled: 'nonGlassListShow'},
+            {updateField: 'flgNonStandardType', valueFiled: 'flgNonStandardType'},
+            {updateField: 'specialType', valueFiled: 'specialType'},
+            {updateField: 'cpFlgGift', valueFiled: 'cpFlgGift'},
+            {updateField: 'flgAllowSpecsUndefine', valueFiled: 'flgAllowSpecsUndefine'},
+            {updateField: 'flgSpecsUndefine', valueFiled: 'flgSpecsUndefine'},
+            {updateField: 'specialFormula', valueFiled: 'specialFormula'},
+            {updateField: 'entryWhId', valueFiled: 'entryWhId'},
+            {updateField: 'nonStandardCode', valueFiled: 'nonStandardCode'},
+            {updateField: 'warehouseName', valueFiled: 'warehouseName'},
+            {updateField: 'bomParentId', valueFiled: 'bomParentId'},
+          ],
+          searchDetailFlag: false
+        },
+        {
+          field: 'tItemQuantity',
+          type: 'number',
+          shareField: 'orderItemQuantity',
+          title: self.$t('itemQuantity'),
+          sum: true,
+          formula: {
+            tItemAmount: ['tItemQuantity*priceSale*nonStandardArea', 'tItemQuantity', 'priceSale', 'nonStandardArea'],
+            discountStandard: ['priceSale/priceStandard*100', 'priceSale', 'priceStandard'],
+            discountPromotion: ['priceSale/pricePromotion*100', 'priceSale', 'pricePromotion']
+          },
+        },//数量
+        {
+          field: 'priceSale',
+          type: 'disabled',
+          flgUserSensitive: true,
+          digits: 2,
+          switchField: 'flgGift', // 开关控制的列
+          formula: {
+            tItemAmount: ['tItemQuantity*priceSale*nonStandardArea', 'tItemQuantity', 'priceSale', 'nonStandardArea'],
+            discountStandard: ['priceSale/priceStandard*100', 'priceSale', 'priceStandard'],
+            discountPromotion: ['priceSale/pricePromotion*100', 'priceSale', 'pricePromotion']
+          },
+          shareField: 'percent',
+          percent: ['priceSale/pricePromotion*pricePromotion[child]', 'priceSale', 'pricePromotion[child]', 'pricePromotion']
+        },//价格(子级放在前面,不然replace就不对)
+        {
+          field: 'tItemAmount',
+          type: 'disabled',
+          flgUserSensitive: true,
+          title: self.$t('itemAmount'),
+          digits: 2,
+          number: true,
+          sum: true,
+          shareField: 'percent',
+          switchField: 'flgGift', // 开关控制的列
+          supply: true,  // 补缺,最后一条,用父级-其他子级
+          percent: ['tItemAmount/pricePromotion*pricePromotion[child]', 'tItemAmount', 'pricePromotion[child]', 'pricePromotion'],
+          formulaLate: true,  // 只有在changevalue时触发,为了避免价格和数量计算金额,然后再根据金额和数量计算价格
+          formula: {
+            priceSale: ['tItemAmount/tItemQuantity/nonStandardArea', 'tItemAmount', 'tItemQuantity', 'nonStandardArea'],
+            discountStandard: ['tItemAmount/tItemQuantity/priceStandard/nonStandardArea*100', 'tItemAmount', 'tItemQuantity', 'priceStandard', 'nonStandardArea'],
+            discountPromotion: ['tItemAmount/tItemQuantity/pricePromotion/nonStandardArea*100', 'tItemAmount', 'tItemQuantity', 'pricePromotion', 'nonStandardArea']
+          },
+        },//金额
+        {field: 'activityName', type: 'disabled'},//套餐名称
+        {field: 'promotionTypeName', type: 'disabled'},//促销类型
+        {field: 'promotionName', type: 'disabled', title: self.$t('promoName')},//促销名称
+        {
+          field: 'priceStandard',
+          showFlag: true,
+          type: 'disabled',
+          flgUserSensitive: true,
+          number: true,
+          digits: 2,
+          shareField: 'sumTotal',
+          // 根据子级去计算父级
+          sumTotal: ['orderItemQuantity[child]*priceStandard[child]', 'orderItemQuantity[child]', 'priceStandard[child]']
+        },//商品标价
+        {
+          field: 'pricePromotion',
+          showFlag: true,
+          type: 'disabled',
+          flgUserSensitive: true,
+          number: true,
+          digits: 2,
+          title: self.$t('standardPriceMoney'),
+        },//商品促销价
+        {
+          field: 'discountStandard',
+          type: 'disabled',
+          flgUserSensitive: true,
+          number: true,
+          digits: 2,
+          showFlag: true,
+        },//标价折扣
+        {
+          field: 'discountPromotion',
+          type: 'disabled',
+          flgUserSensitive: true,
+          number: true,
+          equal: true,
+          digits: 2,
+          showFlag: true,
+        },//促销折扣
+        {
+          field: 'entryWhId',
+          type: 'select',
+          title: self.$t('receivingWarehouse'),
+          options: () => self.warehouseList,
+          labelKey: 'whName',
+          valueKey: 'whId',
+          equal: true,
+        },//收货仓库
+        {
+          field: 'nonStandardCode',
+          type: 'disabled',
+        },//非标号
+        {field: 'nonGlassListShow', type: 'nonGlassFlag'},//非标信息
+        {
+          field: 'warehouseName',
+          title: self.$t('supplierWarehouseName'),
+          type: 'disabled',
+        },//经销商仓库
+        {
+          field: 'brandName',
+          title: self.$t('skuBrand'),
+          type: 'disabled',
+        },//商品品牌
+        {
+          field: 'skuWeight',
+          title: self.$t('skuWeight'),
+          type: 'disabled',
+        },//重量
+        {
+          field: 'skuVolume',
+          title: self.$t('skuVolume'),
+          type: 'disabled',
+        },//体积
+        {
+          field: 'flgGift',
+          type: 'switch',
+          width: 100,
+          value: false,
+          controlField: 'cpFlgGift',
+          switchField: 'priceSale'  // 开关控制的列
+        },//赠品标识
+        {
+          field: 'remarks', type: 'text', width: 300,
+          equal: true,
+        },
+      ],
+      //商品合计信息
+      goodsFootFormData: {
+        sumGoodsAmount: 0,
+        sumStandard: 0,
+        sumPromotion: 0,
+        discountPromotion: 0,
+        discountStandard: 0,
+        sumVolume: 0,
+        sumWeight: 0,
+        sumQuantity: 0,//总数量
+      },
+      receiptList: [],//收款集合
+      //客户收款
+      feeFormData: {
+        sumAmount: 0, //合计金额
+        sumFeeAmount: 0,//费用金额
+        sumReceiptAmount: 0,//定金金额
+        sumUsePrestore: 0,//使用预存
+        usablePrestore: 0,//可用预存
+        sumReceivableAmount: 0,// 定金+使用预存
+        receivable: 0, //剩余应收
+        sumReceiptList: [],//收款
+      },
+      warehouseList: [],//仓库
+    }
+  },
+
+  methods: {
+    /**
+     * @desc   : 分页
+     * @author : 付斌
+     * @date   : 2024-02-19 10:44
+     */
+    purchaseBasedOnSalePageSizeChange(pageInfo) {
+      this.purchaseBasedOnSalePageInfo = pageInfo
+      this.purchaseBasedOnSales(false)
+    },
+    /**
+     * @desc   : 以销定采弹窗打开并查询数据
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    purchaseBasedOnSales(modalOpenFlag) {
+      this.purchaseBasedOnSalesFlag = true
+    },
+
+    /**
+     * @desc   : 合并以销定采数量
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    mergeProcureQuantity(list) {
+      //不重复Id集合
+      let ids = []
+      //不重复数据集合
+      let arr = []
+      for (let i = 0; i < list.length; i++) {
+        if (ids.indexOf(list[i].skuId) == -1) {
+          ids.push(list[i].skuId)
+          arr.push(JSON.parse(JSON.stringify(list[i])))
+        }
+      }
+      //把重复的数据中的可转采购数量相加
+      for (let index in arr) {
+        let orderS2tobuyVOList = []
+        arr[index].transferableQuantity = list.filter(it => it.skuId == arr[index].skuId).sum('transferableQuantity')
+        arr[index].itemQuantity = arr[index].transferableQuantity
+        arr[index].transferableFlag = true
+        for (let item = 0; item < list.length; item++) {
+          if (list[item].skuId == arr[index].skuId) {
+            let json = {}
+            json.s2orderId = list[item].orderId
+            json.s2orderItemId = list[item].itemId
+            json.buyQuantity = list[item].transferableQuantity
+            orderS2tobuyVOList.push(json)
+          }
+        }
+        arr[index].orderS2tobuyVOList = orderS2tobuyVOList
+      }
+      return arr
+    },
+    /**
+     * @desc   : 以销定采选择商品确认带回方法
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    purchaseBasedOnSalesOk() {
+
+    },
+    /**
+     * @desc   : 关闭弹窗
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    clearPurchaseBasedOnSales() {
+      this.$refs.purchaseBasedOnSalesFormData.$refs['purchase-based-on-sales-form'].resetFields();
+      this.orderId = null
+    },
+
+    /**
+     * @desc   : 所属公司选择后事件
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    ascpIdOk(val) {
+    },
+
+    /**
+     * @desc   : 供应商选择后事件
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    supplierOk(val) {
+    },
+
+    /**
+     * @desc   : 选择默认仓库
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    warehouseOk(val) {
+      if (val && val.length > 0) {
+        let row = val[0]
+        this.formData.entryWhId = row.whId
+        this.formData.warehouseName = row.whName
+      }
+    },
+    /**
+     * @desc   : 选择地址
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    addressOk(val) {
+      if (val && val[0]) {
+        if (val[0].addressArea && val[0].addressArea.value) {
+          val[0].addressArea = JSON.parse(val[0].addressArea.value)
+        }
+        if (val[0].addressGcj02 && val[0].addressGcj02.value) {
+          val[0].addressGcj02 = JSON.parse(val[0].addressGcj02.value)
+        }
+        this.formData.contactName = val[0].contactName//联系人
+        this.formData.contactPhones = val[0].contactPhone//联系电话
+        this.formData.addressArea = val[0].addressArea//行政区划
+        this.formData.addressFull = val[0].addressFull//详细地址
+        this.formData.addressGcj02 = val[0].addressGcj02//地址坐标(gcj02)
+        this.formData.addressName = val[0].addressName//小区或POI
+        this.formData.addressNo = val[0].addressNo//门牌号
+      }
+    },
+    /**
+     * @desc   : 选择地址
+     * @author : 付斌
+     * @date   : 2024-02-19 10:45
+     */
+    chooseAddress(value) {
+      this.formData.customerDistrict = value;
+      // 说明是清空
+      if (!value) {
+        this.formData.addressName = null;
+        this.formData.addressFull = null;
+        this.formData.addressGcj02 = {};
+        this.formData.addressArea = {};
+      } else {
+        //按照title进行
+        this.formData.addressName = value.addressName;
+        this.formData.addressGcj02 = value.addressGcj02;
+        this.formData.addressArea = value.addressArea;
+        this.formData.addressFull = value.addressFull + (this.formData.addressNo ? this.formData.addressNo : '');
+      }
+    },
+
+    /**
+     * @desc   : 拼写详细地址
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    setAddressFull(e) {
+      // 客户区域有值才会拼接详细地址
+      if (!this.setCustomerFlag && this.formData.customerDistrict && this.formData.customerDistrict.addressFull) {
+        this.formData.addressFull = this.formData.customerDistrict.addressFull + (this.formData.addressNo ? this.formData.addressNo : '')
+      }
+    },
+
+    /**
+     * @desc   : 上传文件
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    uploadFile(response, file, fileList) {
+      if (response.code == 200) {
+        this.formData.files.push(response.data)
+      } else {
+        this.$Message.error(response.message)
+      }
+    },
+    /**
+     * @desc   : 移除文件
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    fileRemove(file, fileList) {
+      this.formData.files = fileList.map(m => m.response.data)
+    },
+    /**
+     * @desc   : 表单值改变事件
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    changeValue(field, row, rowIndex) {
+      if (field == "entryWhId") {
+        this.$nextTick(() => {
+          this.formData.goodsList[rowIndex].entryWhId = row.whId
+        })
+      }
+      this.$nextTick(() => {
+        // 计算合计值
+        this.getTotals(field, row, rowIndex, false);
+      })
+    },
+
+    /**
+     * @desc   : 获取商品表格中数量、金额后计算总单信息
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    getTotals(field, row, rowIndex, purchaseFlag) {
+      // console.log("this.$refs['goodsTable'].getTableDataFilter()",this.$refs['goodsTable'].getTableDataFilter())
+      let table = this.$refs['goodsTable'].getTableDataFilter().filter(it => it.flgNonStandardType != 1 && it.flgNonStandardType != 2 && (it.priceStandard && it.priceStandard != 0) && it.priceSale > 0 && it.itemAmount > 0);
+      let itemAmount = 0; // 货物总额
+      let weight = 0;// 总重量
+      let volumn = 0;// 总体积
+      let sumStandard = 0;// 标价总额
+      let sumPromotion = 0; // 标准价总额
+      let quantityName = this.type == this.$config.formMode.edit ? 'tItemQuantity' : 'itemQuantity'
+      let amountName = this.type == this.$config.formMode.edit ? 'tItemAmount' : 'itemAmount'
+      if (table && table.length > 0) {
+        table.forEach(row => {
+          if (row[amountName]) {
+            // 金额
+            itemAmount += parseFloat(row[amountName]);
+          }
+          // 重量
+          if (row.skuWeight && row[quantityName]) {
+            weight += parseFloat(row[quantityName]) * parseFloat(row.skuWeight);
+          }
+          // 体积
+          if (row.skuVolume && row[quantityName]) {
+            volumn += parseFloat(row[quantityName]) * parseFloat(row.skuVolume);
+          }
+          // 标价
+          if (row.priceStandard && row[quantityName]) {
+            if (row.nonStandardArea) {
+              sumStandard += parseFloat(row[quantityName]) * parseFloat(row.priceStandard) * parseFloat(row.nonStandardArea);
+            } else {
+              sumStandard += parseFloat(row[quantityName]) * parseFloat(row.priceStandard);
+            }
+          }
+          // 标准价
+          if ((row.pricePromotion || parseFloat(row['priceStandard'])) && row[quantityName]) {
+            if (row.nonStandardArea) {
+              sumPromotion += parseFloat(row[quantityName]) * (parseFloat(row['pricePromotion']) ? parseFloat(row['pricePromotion']) : parseFloat(row['priceStandard'])) * parseFloat(row.nonStandardArea);
+            } else {
+              sumPromotion += parseFloat(row[quantityName]) * (parseFloat(row['pricePromotion']) ? parseFloat(row['pricePromotion']) : parseFloat(row['priceStandard']));
+            }
+          }
+          // 如果是组合,需要计算体积和重量
+          if (row['promotionType'] === this.$config.promotionType.combined) {
+            if (row.bomItems && row.bomItems.length > 0) {
+              row.bomItems.forEach(it => {
+                if (it.skuWeight) {
+                  weight += parseFloat(it[quantityName]) * parseFloat(it.skuWeight);
+                }
+                // 体积
+                if (it.skuVolume) {
+                  volumn += parseFloat(it[quantityName]) * parseFloat(it.skuVolume);
+                }
+              })
+            }
+          }
+        })
+      }
+      this.goodsFootFormData.sumStandard = sumStandard;
+      this.goodsFootFormData.sumPromotion = sumPromotion;
+      // 标价折扣
+      this.goodsFootFormData.discountStandard = sumStandard === 0 ? 0 : parseFloat((itemAmount * 100 / sumStandard).toFixed(2));
+      // 标准价折扣
+      this.goodsFootFormData.discountPromotion = sumPromotion === 0 ? 0 : parseFloat((itemAmount * 100 / sumPromotion).toFixed(2));
+      //非标,售价为0的数据
+      let otherTable = this.$refs['goodsTable'].getTableDataFilter().filter(it => it.flgNonStandardType == 1 || it.flgNonStandardType == 2 || (!it.priceStandard || it.priceStandard == 0));
+      ;
+      for (let item of otherTable) {
+        if (item[amountName]) {
+          // 金额
+          itemAmount += parseFloat(item[amountName]);
+        }
+      }
+      this.goodsFootFormData.sumGoodsAmount = itemAmount;
+      // 计算合计金额
+      this.getSumAmount();
+      this.goodsFootFormData.sumWeight = parseFloat(weight.toFixed(6));
+      this.goodsFootFormData.sumVolume = parseFloat(volumn.toFixed(6));
+      //设计字段赋值
+      if (field && field.flgNonStandard) {
+        this.formData.designStatus = this.$config.orderAllocation.designStatusYes
+      }
+    },
+
+    /**
+     * @desc   : 编辑时查询非标参数
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    setNonGlassForm(row) {
+      if (row.nonGlassSpuItems && row.nonGlassSpuItems.length > 0) {
+        row.nonGlassSpuItems.forEach(it => {
+          if (!row.nonGlassForm) {
+            row.nonGlassForm = {}
+          }
+          row.nonGlassForm[it.fieldCode] = null;
+        })
+      }
+      if (row.nonGlassList && row.nonGlassList.length > 0) {
+        let noInputs = []
+        row.nonGlassList.forEach(fRow => {
+          row.nonGlassForm[fRow.fieldCode] = fRow.optionCode;
+          // 做成不包括文本输入的字符串
+          if (fRow.isScope == 0) {
+            noInputs.push(fRow.fieldName + ":" + fRow.optionName)
+          }
+        })
+        row.nonGlassListShow_no_input = noInputs.join(',')
+      }
+    },
+
+    /**
+     * @desc   : 计算合计金额
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    getSumAmount() {
+      // 合计金额=费用金额+货物金额
+      this.feeFormData.sumAmount = this.feeFormData.sumFeeAmount + this.goodsFootFormData.sumGoodsAmount;
+      // 剩余应收=合计金额-收款金额
+      this.feeFormData.receivable = this.feeFormData.sumAmount - this.feeFormData.sumReceivableAmount;
+    },
+    /**
+     * @desc   : 校验数据
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    validData(flag) {
+      return new Promise(resolve => {
+        // 判断客户的省市区不存在,那么就要重新选addressGcj02
+        if (!this.formData.addressArea || typeof this.formData.addressArea == null
+          || this.formData.addressArea.province == null) {
+          this.$message.error(this.$t('W_061', {'param': this.$t('addressArea')}))
+          resolve(false);
+          return false;
+        }
+        // 判断经纬度是否存在
+        if (!this.formData.addressGcj02) {
+          this.$message.error(this.$t('W_061', {'param': this.$t('addressGcj02')}))
+          resolve(false);
+          return false;
+        }
+        // 明细必须有数据
+        let table = this.$refs['goodsTable'].tableData.filter(it => it.skuId || (it.bomItems && it.bomItems.length > 0))
+        // console.log("this.getTableChangeData();", this.getTableChangeData())
+        // console.log("this.formData.goodsList", this.formData.goodsList)
+        // let table = this.formData.goodsList
+        if (this.type === this.$config.formMode.add) {
+          if (!table || table.length === 0) {
+            this.$message.error(this.$t('W_012'))
+            resolve(false);
+            return false;
+          }
+        }
+        //校验以销定采选择数据
+        for (let index = 0; index < table.length; index++) {
+          //以销定采数据  实际数量大于以可转采购数量
+          let quantityName = this.type == this.$config.formMode.add ? 'itemQuantity' : 'tItemQuantity'
+          if (table[index].transferableFlag && table[index][quantityName] > table[index].transferableQuantity) {
+            this.$message.error(this.$t('W_119', {'param1': (index + 1), 'param2': this.$t('transferableQuantity')}))
+            resolve(false);
+            return false;
+          }
+        }
+        //商品标价不可为0、仓库不可为空
+        for (let i = 0; i < table.length; i++) {
+          if (!table[i]['priceStandard'] || table[i]['priceStandard'] == 0) {
+            this.$message.error(this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('W_132'))
+            resolve(false);
+            return false;
+          }
+          if (!table[i]['entryWhId']) {
+            this.$message.error(this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('W_128'))
+            resolve(false);
+            return false;
+          }
+          if (!table[i]['warehouseName']) {
+            this.$message.error(this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('W_129'))
+            resolve(false);
+            return false;
+          }
+        }
+        // 报价单不进行控制
+        if (flag) {
+          // 新建和大编辑才能校验明细
+          if (this.type == this.$config.formMode.add || this.type == this.$config.formMode.edit
+            && this.allCanEdit) {
+            table = this.$refs['goodsTable'].getTableData();
+            // 校验明细中是否有数量没有填写的
+            for (let i = 0; i < table.length; i++) {
+              if (!table[i]['skuId'] && !table[i]['promotionId']) {
+                continue;
+              }
+              if (this.type == this.$config.formMode.add) {
+                if (!table[i]['itemQuantity'] || table[i]['itemQuantity'] === 0) {
+                  this.$message.error(this.$t('W_041', {'param': this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('itemQuantity')}))
+                  resolve(false);
+                  return false;
+                }
+              } else {
+                if (!table[i]['tItemQuantity'] || table[i]['tItemQuantity'] === 0) {
+                  this.$message.error(this.$t('W_041', {'param': this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('itemQuantity')}))
+                  resolve(false);
+                  return false;
+                }
+              }
+              //校验标价折扣是否超过范围
+              if (table[i]['discountStandard'] && parseFloat(table[i]['discountStandard']) > this.$config.maxDiscount) {
+                this.$message.error(this.$t('W_051', {
+                  'param1': this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('discountStandard'),
+                  'param2': this.$config.maxDiscount
+                }))
+                resolve(false);
+                return false;
+              }
+              //校验标准价折扣是否超过范围
+              if (table[i]['discountPromotion'] && parseFloat(table[i]['discountPromotion']) > this.$config.maxDiscount) {
+                this.$message.error(this.$t('W_051', {
+                  'param1': this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('discountPromotion'),
+                  'param2': this.$config.maxDiscount
+                }))
+                resolve(false);
+                return false;
+              }
+            }
+          }
+        }
+        resolve(true);
+      });
+    },
+    /**
+     * @desc   : 关闭窗体
+     * @author : 付斌
+     * @date   : 2024-02-19 10:46
+     */
+    closeForm() {
+      this.formData = {}
+      this.closeTag(this.$route)
+      this.$router.push('/sale/purchase-order/index')
+    },
+    /**
+     * @desc   : 提交事件
+     * @author : 付斌
+     * @date   : 2024-02-19 10:47
+     */
+    submitForm(flag) {
+
+    },
+    /**
+     * @desc   : 新建成功后清理数据
+     * @author : 付斌
+     * @date   : 2024-02-19 10:47
+     */
+    clearForm() {
+      // 清空数据源
+      this.$refs['goodsTable'].clearTable();
+      // this.formData.goodsList = []
+      for (let feeFormDataKey in this.feeFormData) {
+        this.feeFormData[feeFormDataKey] = 0
+        this.feeFormData.sumReceiptList = []
+      }
+      for (let goodsFootFormDataKey in this.goodsFootFormData) {
+        this.goodsFootFormData[goodsFootFormDataKey] = 0
+      }
+      // 清空附件
+      this.formData.annexPaths = null;
+      this.formData.designRemarks = null;
+      this.formData.designUser = null;
+      this.formData.designStatusFlag = false;
+      this.formData.remarks = null;
+      //设置默认值
+      this.setDefaultValue();
+    },
+
+    /***************************列表及其他事件************************************/
+
+    /**
+     * @desc   : tabs切换事件
+     * @author : 付斌
+     * @date   : 2024-02-19 10:47
+     */
+    changeElTabs(e) {
+      let name = e
+      this.bottomList = ['1', '2', '3', '4', '5']
+      window.location.href = '#' + name
+      // 如果点击附件直接打开附件上传界面
+      if (e === 'name5') {
+        if (this.$refs['uploadFile']) {
+          this.$refs['uploadFile'].$refs.input.click();
+        }
+      }
+    },
+    /**
+     * @desc   : 获取错误信息
+     * @author : 付斌
+     * @date   : 2024-02-19 10:47
+     */
+    getErrMessage(prop) {
+      return this.errMessage[prop]
+    },
+    /**
+     * @desc   : 保存校验
+     * @author : 付斌
+     * @date   : 2024-02-19 10:47
+     */
+    onValidate({prop, status, error}) {
+      this.$set(this.errMessage, prop, error)
+    },
+
+    /***************************设定参数函数************************************/
+
+    /**
+     * @desc   : 设置保存的参数(小编辑)
+     * @author : 付斌
+     * @date   : 2024-02-19 10:47
+     */
+    setSubmitFormParamsLimitEdit() {
+      let params = {}
+      // 小编辑
+      params.limitEdit = true;
+      params.cpId = this.formData.cpId;
+      //所属公司
+      params.ascpId = this.formData.ascpId;
+      params.editTime = new Date(this.formData.editTime).format();
+      //订单Id
+      params.orderId = this.formData.orderId;
+      //订单单号
+      params.orderNo = this.formData.orderNo;
+      //订单类型
+      params.orderType = this.formData.orderType
+      //推送结果
+      params.erpPushStatus = this.formData.erpPushStatus
+      //审批结果
+      params.apvResult = this.formData.apvResult;
+      //制单人
+      params.makingUser = this.formData.staffId
+      params.userCode = this.formData.staffCode
+      params.userName = this.formData.staffName
+      params.erpUserCode = this.formData.erpUserCode;
+      //制单人(采购订单)"
+      params.makingUserPur = this.$store.state.user.id
+      //客户Id
+      params.customerId = this.formData.customerId;
+      //客户名称
+      params.customerName = this.formData.customerName;
+      //行政区域
+      params.addressArea = this.formData.addressArea;
+      //地址坐标
+      params.addressGcj02 = this.formData.addressGcj02;
+      //小区
+      params.addressName = this.formData.addressName;
+      //详细地址
+      params.addressFull = this.formData.addressFull;
+      //门牌号
+      params.addressNo = this.formData.addressNo;
+      //联系人
+      params.contactName = this.formData.contactName;
+      //联系电话
+      params.contactPhones = this.formData.contactPhones;
+      //客户来源
+      params.customerFrom = this.formData.customerFrom;
+      //业务员
+      params.staffId = this.formData.staffId;
+      params.staffCode = this.formData.staffCode;
+      //业务部门
+      params.orgId = this.formData.orgId;
+      params.erpOrgCode = this.formData.erpOrgCode;
+      //销售渠道
+      params.salesChannel = this.formData.salesChannel
+      params.salesChannelName = this.formData.salesChannelName
+      params.salesChannelCode = this.formData.salesChannelCode
+      //仓库
+      params.entryWhId = this.formData.entryWhId;
+      params.warehouseName = this.formData.warehouseName;
+      //供应商
+      params.supplierId = this.formData.supplierId;
+      params.supplierName = this.formData.supplierName;
+      params.supplierCode = this.formData.supplierCode;
+      //一级商户
+      params.sale1Id = this.formData.sale1Id
+      //二级商户
+      params.sale2Id = this.formData.sale2Id
+      //预计收货日期
+      if (this.formData.entryTime) {
+        params.entryTime = this.timestampToTime(Date.parse(this.formData.entryTime));
+      }
+      //备注
+      params.remarks = this.formData.remarks;
+      //附件
+      if (this.formData && this.formData.annexPaths && this.formData.annexPaths.length > 0) {
+        params.annexPaths = this.formData.annexPaths.map(m => {
+          return {
+            name: m.name,
+            url: m.path,
+            type: m.type,
+            docType: "采购订单",
+            createTime: m.createTime
+          }
+        })
+      }
+      return params;
+    },
+    /**
+     * @desc   : 时间戳转换为 yyyy-mm-dd或yyyy-MM-dd HH-mm-ss
+     * @author : 付斌
+     * @date   : 2024-02-19 10:47
+     */
+    timestampToTime(timestamp) {
+      var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+      var Y = date.getFullYear() + '-';
+      var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+      var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
+      var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
+      var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
+      var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
+      return Y + M + D + h + m + s;
+    },
+    /**
+     * @desc   : 设置保存的参数
+     * @author : 付斌
+     * @date   : 2024-02-19 10:47
+     */
+    setSubmitFormParams(flag) {
+      let params = {...this.formData}
+      params.cpId = this.formData.cpId
+      params.ascpId = this.formData.ascpId
+      //单据类型-分销订单
+      params.docCode = this.$config.docCode.purchaseOrder
+      // 编辑才会传递
+      if (this.type == this.$config.formMode.edit) {
+        params.editTime = new Date(this.formData.editTime).format();
+      }
+      //一级商户
+      params.sale1Id = this.formData.sale1Id
+      //二级商户
+      params.sale2Id = this.formData.sale2Id
+      //仓库
+      params.warehouseId = this.$store.state.user.warehouseId;
+      params.warehouseName = this.$store.state.user.warehouseName;
+      //订单Id
+      params.orderId = this.formData.orderId;
+      //订单状态
+      if (flag) {
+        params.orderStatus = this.$config.orderStatus.done;
+      } else {
+        params.orderStatus = this.$config.orderStatus.staging;
+      }
+      //订单类型
+      if (flag) {
+        params.orderType = this.$config.orderType.order;
+        // this.orderType = this.$config.orderType.order;
+      } else {
+        params.orderType = this.$config.orderType.quote
+        // this.orderType = this.$config.orderType.quote;
+      }
+      //审批结果
+      params.apvResult = this.formData.apvResult;
+      //制单人
+      params.makingUser = this.formData.staffId
+      params.userCode = this.formData.staffCode
+      params.userName = this.formData.staffName
+      params.erpUserCode = this.formData.erpUserCode;
+      //制单人(采购订单)"
+      params.makingUserPur = this.$store.state.user.id
+      //合同号
+      params.contractNo = this.formData.contractNo;
+      //客户电话
+      params.customerPhone = this.formData.customerPhone;
+      //客户Id
+      params.customerId = this.formData.customerId;
+      //客户编码
+      params.customerCode = this.formData.customerCode;
+      //客户名称
+      params.customerName = this.formData.customerName;
+      //行政区域
+      params.addressArea = this.formData.addressArea;
+      //地址坐标
+      params.addressGcj02 = this.formData.addressGcj02;
+      //小区
+      params.addressName = this.formData.addressName;
+      //详细地址
+      params.addressFull = this.formData.addressFull;
+      //门牌号
+      params.addressNo = this.formData.addressNo;
+      //联系人
+      params.contactName = this.formData.contactName;
+      //联系电话
+      params.contactPhones = this.formData.contactPhones;
+      //业务员
+      params.staffId = this.formData.staffId;
+      params.staffCode = this.formData.staffCode;
+      //业务员数组
+      params.staffList = this.formData.staffList;
+      //业务部门
+      params.orgId = this.formData.orgId;
+      params.erpOrgCode = this.formData.erpOrgCode;
+      //业务部门数组
+      params.orgList = this.formData.orgList;
+      //小区档案
+      params.estateId = this.formData.estateId;
+      //客户来源
+      params.customerFrom = this.formData.customerFrom;
+      //渠道
+      if (!params.salesChannel) {
+        params.salesChannel = this.$store.state.user.salesChannel;
+        params.salesChannelName = this.$store.state.user.salesChannelName;
+        params.salesChannelCode = this.$store.state.user.salesChannelCode;
+      }
+      //仓库
+      params.entryWhId = this.formData.entryWhId;
+      params.warehouseName = this.formData.warehouseName;
+      //供应商
+      params.supplierId = this.formData.supplierId;
+      params.supplierName = this.formData.supplierName;
+      params.supplierCode = this.formData.supplierCode;
+      //送货时间
+      if (this.formData.entryTime) {
+        params.entryTime = this.timestampToTime(Date.parse(this.formData.entryTime));
+      }
+      //是否设计
+      params.designStatus = this.formData.designStatusFlag ? this.$config.designStatus.yes : this.$config.designStatus.no;
+      //备注
+      params.remarks = this.formData.remarks;
+      //货物总额
+      params.sumGoodsAmount = this.goodsFootFormData.sumGoodsAmount;
+      //标价总额
+      params.sumStandard = this.goodsFootFormData.sumStandard;
+      //标价折扣
+      params.discountStandard = this.goodsFootFormData.discountStandard;
+      //标准售价
+      params.sumPromotion = this.goodsFootFormData.sumPromotion;
+      //合计金额
+      params.sumAmount = this.feeFormData.sumAmount;
+      //货物总额
+      params.tSumGoodsAmount = this.goodsFootFormData.sumGoodsAmount;
+      //标价总额
+      params.tSumStandard = this.goodsFootFormData.sumStandard;
+      //标价折扣
+      params.tDiscountStandard = this.goodsFootFormData.discountStandard;
+      //标准售价
+      params.tSumPromotion = this.goodsFootFormData.sumPromotion;
+      //合计金额
+      params.tSumAmount = this.feeFormData.sumAmount;
+      //标准售价折扣
+      params.discountPromotion = this.goodsFootFormData.discountPromotion;
+      //总重量
+      params.sumWeight = this.goodsFootFormData.sumWeight ? this.goodsFootFormData.sumWeight : 0;
+      //总体积
+      params.sumVolume = this.goodsFootFormData.sumVolume ? this.goodsFootFormData.sumVolume : 0;
+      //费用金额
+      params.sumFeeAmount = 0;
+      //订单定金
+      params.sumReceiptAmount = 0;
+      //使用预存
+      params.sumUsePrestore = 0;
+      // 收款明细
+      params.receiptVOList = [];
+      // if (params.receiptVOList && params.receiptVOList.length > 0) {
+      //   params.receiptVOList = params.receiptVOList.filter(it => it.itemAmount != 0)
+      //   for (let i of params.receiptVOList) {
+      //     i.settlementType = i.typeId
+      //     i.sumAmount = i.itemAmount
+      //     //账款-商户
+      //     //一级商户
+      //     i.sale1Id = this.formData.sale1Id
+      //     //二级商户
+      //     i.sale2Id = this.formData.sale2Id
+      //     //所属商户
+      //     i.ascpId = this.formData.ascpId
+      //   }
+      // }
+      // 剩余应收
+      params.receivable = 0;
+      // 收款状态
+      this.feeFormData.sumReceivableAmount = 0
+      if (this.feeFormData.sumReceivableAmount === 0) {
+        //未收款
+        params.receiptStatus = this.$config.receiptStatus.no;
+      } else if (this.feeFormData.sumReceivableAmount < this.feeFormData.sumAmount) {
+        //部分收款
+        params.receiptStatus = this.$config.receiptStatus.part;
+      } else {
+        //收款完成
+        params.receiptStatus = this.$config.receiptStatus.all;
+      }
+      //合计收款金额  使用预存+订单定金
+      // params.sumCollectedAmount = parseFloat(this.feeFormData.sumUsePrestore) + parseFloat(this.feeFormData.sumReceiptAmount);
+      params.sumCollectedAmount = 0;
+      //销售订单明细
+      this.setOrderItem(params);
+      //删除明细的Ids
+      let table = this.$refs['goodsTable'].getDeleteData();
+      if (table && table.length > 0) {
+        params.orderItemDeleteVOList = table.map(it => it.itemId);
+      }
+      //附件
+      if (this.formData && this.formData.annexPaths && this.formData.annexPaths.length > 0) {
+        params.annexPaths = this.formData.annexPaths.map(m => {
+          return {
+            name: m.name,
+            url: m.path,
+            type: m.type,
+            docType: "采购订单",
+            createTime: m.createTime
+          }
+        })
+      }
+      return params
+    },
+    /**
+     * @desc   : 获取改变的数据
+     * @author : 付斌
+     * @date   : 2024-02-19 10:48
+     */
+    getTableChangeData() {
+      let table = this.$refs['goodsTable'].tableData
+      // 过滤掉数量为0的数据
+      table = table.filter(it => it.itemQuantity && it.itemQuantity != 0);
+      return table;
+    },
+    /**
+     * @desc   : 处理组合中的bom数据
+     * @author : 付斌
+     * @date   : 2024-02-19 10:48
+     */
+    setCombinedBomData(row, pRow) {
+      if (row.bomItems && row.bomItems.length > 0) {
+        let sumVolume = 0;
+        let sumWeight = 0;
+        let skuVolume = 0;
+        let skuWeight = 0;
+        let itemAmount = 0;
+        let quantityName = this.type == this.$config.formMode.edit ? 'tItemQuantity' : 'itemQuantity'
+        let amountName = this.type == this.$config.formMode.edit ? 'tItemAmount' : 'itemAmount'
+        // 数量
+        row[quantityName] = parseFloat(pRow[quantityName]) * parseFloat(row['orderItemQuantity'])
+        row.bomItems.forEach(it => {
+          skuVolume = parseFloat(it['skuVolume']) * parseFloat(it[quantityName]);
+          sumVolume += skuVolume;
+          skuWeight = parseFloat(it['skuWeight']) * parseFloat(it[quantityName]);
+          sumWeight += skuWeight;
+          if (it['tItemQuantity'] && it['priceSale']) {
+            itemAmount += parseFloat(it['tItemQuantity']) * parseFloat(it['priceSale']);
+          }
+        })
+        row['skuVolume'] = sumVolume;
+        row['skuWeight'] = skuWeight;
+        row[amountName] = itemAmount;
+        row['priceSale'] = row[quantityName] == 0 ? 0 : (itemAmount / row[quantityName]).toFixed(2)
+        row.discountPromotion = row.pricePromotion == 0 ? 0 : (row.priceSale * 100 / row.pricePromotion).toFixed(2);
+        row.discountStandard = row.priceStandard == 0 ? 0 : (row.priceSale * 100 / row.priceStandard).toFixed(2);
+      }
+    },
+    /**
+     * @desc   : 设置明细
+     * @author : 付斌
+     * @date   : 2024-02-19 10:48
+     */
+    setOrderItem(params) {
+      let table = null;
+      // 报价单取全部
+      if (this.orderType == this.$config.orderType.quote) {
+        table = this.$refs['goodsTable'].getTableDataFilter();
+      } else {
+        table = this.getTableChangeData();
+      }
+      let quantityName = this.type == this.$config.formMode.add ? 'itemQuantity' : 'tItemQuantity'
+      params.orderItemVOList = [];
+      // 如果有子级需要子级加载出来
+      let index = 1;
+      table.forEach((row, rowIndex) => {
+        if (this.type == this.$config.formMode.add) {
+          delete row.itemId
+        }
+        if (row.transferableFlag && row.transferableQuantity == 0) {
+          row.orderS2tobuyVOList = []
+        } else if (row.transferableFlag && row.transferableQuantity > row[quantityName]) {
+          let diff = row.transferableQuantity - row[quantityName]
+          for (let it = 0; it < row.orderS2tobuyVOList.length; it++) {
+            if (diff >= row.orderS2tobuyVOList[it].buyQuantity) {
+              diff -= row.orderS2tobuyVOList[it].buyQuantity
+              row.orderS2tobuyVOList.splice(it, 1)
+              it--
+            } else if (diff < row.orderS2tobuyVOList[it].buyQuantity) {
+              row.orderS2tobuyVOList[it].buyQuantity = row.orderS2tobuyVOList[it].buyQuantity - diff
+              diff = 0
+            }
+            if (diff == 0) {
+              break
+            }
+          }
+        }
+        row['itemIndex'] = index;
+        row['flgGift'] = row['flgGift'] == null ? false : row['flgGift'];
+        let sumVolume = 0;
+        let sumWeight = 0;
+        let skuVolume = 0;
+        let skuWeight = 0;
+        // 如果有子级,子级需要处理一下
+        if (row['bomItems'] && row['bomItems'].length > 0) {
+          row['bomItems'].forEach(cRow => {
+            index++;
+            cRow['itemIndex'] = index;
+            // 给明细赋值活动id
+            cRow['activityId'] = row['activityId']
+            cRow['whId'] = this.formData.defWhId
+            if (cRow['hasChild'] == 0) {
+              skuVolume = parseFloat(cRow['skuVolume']) * parseFloat(cRow['itemQuantity']);
+              sumVolume += skuVolume;
+              cRow['skuVolume'] = skuVolume;
+              skuWeight = parseFloat(cRow['skuWeight']) * parseFloat(cRow['itemQuantity']);
+              sumWeight += skuWeight;
+              cRow['skuWeight'] = skuWeight;
+              cRow['flgBomCombined'] = false;
+            } else {
+              // 给组合中的bom需要做处理
+              this.setCombinedBomData(cRow, row);
+              cRow['flgBomCombined'] = true;
+            }
+            //售价为0,为赠品
+            if (!cRow['priceSale'] || cRow['priceSale'] == 0) {
+              cRow['flgGift'] = true;
+            } else {
+              cRow['flgGift'] = false;
+            }
+            // 如果标准售价折扣没有值,那么为0
+            cRow.discountPromotion = cRow.discountPromotion ? cRow.discountPromotion : 0;
+            cRow.pricePromotion = cRow.pricePromotion ? cRow.pricePromotion : 0;
+            cRow.discountStandard = cRow.discountStandard ? cRow.discountStandard : 0;
+            cRow.priceStandard = cRow.priceStandard ? cRow.priceStandard : 0;
+            cRow.priceSale = cRow.priceSale ? cRow.priceSale : 0;
+            params.orderItemVOList.push(cRow);
+          })
+          row['skuVolume'] = sumVolume ? sumVolume.toFixed(6) : 0;
+          row['skuWeight'] = sumWeight ? sumWeight.toFixed(6) : 0;
+        } else {
+          row['skuVolume'] = (parseFloat(row['skuVolume']) * parseFloat(row[quantityName])).toFixed(6)
+          row['skuWeight'] = (parseFloat(row['skuWeight']) * parseFloat(row[quantityName])).toFixed(6)
+          row['skuVolume'] = row['skuVolume'] ? row['skuVolume'] : 0
+          row['skuWeight'] = row['skuWeight'] ? row['skuWeight'] : 0
+        }
+        row['flgBomCombined'] = false;
+        // 如果标准售价折扣没有值,那么为0
+        row.discountPromotion = row.discountPromotion ? row.discountPromotion : 0;
+        row.pricePromotion = row.pricePromotion ? row.pricePromotion : 0;
+        row.discountStandard = row.discountStandard ? row.discountStandard : 0;
+        row.priceStandard = row.priceStandard ? row.priceStandard : 0;
+        row.priceSale = row.priceSale ? row.priceSale : 0;
+        row.whId = this.formData.defWhId
+        params.orderItemVOList.push(row);
+      })
+      // 计算总单数量
+      let tableFilter = this.$refs['goodsTable'].getTableDataFilter();
+      // 如果有子级需要子级加载出来
+      let sumQuantity = 0;
+      let categoryQuantityList = []; // 品类数据
+      tableFilter.forEach(row => {
+        // 如果有子级,子级需要处理一下
+        if (row['bomItems'] && row['bomItems'].length > 0) {
+          row['bomItems'].forEach(cRow => {
+            cRow.whId = this.formData.defWhId
+            if (cRow['hasChild'] == 0) {
+              sumQuantity += parseFloat(cRow[quantityName]);
+              if (cRow.skuSpecs == null) {
+                cRow.skuSpecs = " "
+              }
+              if (cRow.skuSpecs && !categoryQuantityList.includes(cRow.skuSpecs)) {
+                categoryQuantityList.push(cRow.skuSpecs)
+              }
+            }
+          })
+        } else {
+          sumQuantity += parseFloat(row[quantityName]);
+          if (row.skuSpecs == null) {
+            row.skuSpecs = " "
+          }
+          // 如果没有子级,就加上即可
+          if (row.skuSpecs && !categoryQuantityList.includes(row.skuSpecs)) {
+            categoryQuantityList.push(row.skuSpecs)
+          }
+        }
+      })
+      // 给总单数量赋值
+      params.sumQuantity = sumQuantity;
+      // 给总单数量赋值(编辑时取实际的量)
+      params.tSumQuantity = sumQuantity;
+      // 给品类数赋值
+      params.categoryQuantity = categoryQuantityList.length;
+      // 获取特殊标识
+      params.intentionTags = this.$libaray.getSpecilType(params.orderItemVOList);
+    },
+    /***************************created调用数据接口函数************************************/
+
+    /**
+     * @desc   : 通过id查询
+     * @author : 付斌
+     * @date   : 2024-02-19 10:48
+     */
+    detail(id) {
+
+    },
+    /**
+     * @desc   : 判断列是否可以编辑
+     * @author : 付斌
+     * @date   : 2024-02-19 10:48
+     */
+    checkColumnIsEdit(field) {
+      let flag = false;
+      if (this.type === this.$config.formMode.edit) {
+        // 如果所有的列不允许编辑,返回true
+        if (this.allCanNoEdit) {
+          flag = true;
+        } else if (this.allCanEdit) {
+          flag = false;
+        } else {
+          // 小编辑时,只能编辑,可以编辑的列
+          if (this.alwaysEditColumns.includes(field)) {
+            flag = false;
+          } else {
+            flag = true;
+          }
+        }
+      } else {
+        // 新建也是大编辑
+        this.allCanEdit = true;
+        flag = false;
+      }
+      return flag;
+    },
+    /**
+     * @desc   : 赋值
+     * @author : 付斌
+     * @date   : 2024-02-19 10:48
+     */
+    setEntityByEdit(data) {
+      //对 editTime 进行处理
+      for (let key of Object.keys(data)) {
+        if (key == 'editTime') {
+          let lastIndex = data[key].lastIndexOf(".");
+          data[key] = data[key].substring(0, lastIndex)
+          data[key] = data[key].replace("T", " ");
+        }
+      }
+      this.warehouseList.push({
+        whId: data.entryWhId,
+        whName: data.warehouseName,
+        entryWhId: data.entryWhId,
+      })
+      this.setCustomerFlag = true;
+      //编辑的时间戳
+      this.formData.editTime = data.editTime;
+      //订单状态
+      this.formData.orderStatus = data.orderStatus;
+      //冲正、分销不允许编辑
+      if (data.orderStatus === this.$config.orderStatus.reverse
+        || data.orderStatus === this.$config.orderStatus.distribution) {
+        this.allCanNoEdit = true;
+      } else if (data.apvResult === this.$config.approvalStatus.refuse ||
+        data.apvResult === this.$config.approvalStatus.error ||
+        data.orderType == this.$config.orderType.quote) {
+        // 审批状态是拒绝和异常、报价单是可以进行大编辑
+        this.allCanEdit = true;
+      } else {
+        this.allCanEdit = false;
+      }
+      this.formData.apvResult = data.apvResult
+      //订单类型
+      this.formData.orderType = data.orderType
+      this.orderType = data.orderType
+      //订单Id
+      this.formData.orderId = data.orderId;
+      //订单号
+      this.formData.orderNo = data.orderNo;
+      //客户电话
+      this.formData.customerPhone = data.customerPhone;
+      //客户Id
+      this.formData.customerId = data.customerId;
+      // 客户编码
+      this.formData.customerCode = data.customerCode;
+      //客户名称
+      this.formData.customerName = data.customerName;
+      //行政区域
+      this.formData.addressArea = data.addressArea;
+      //地址坐标
+      this.formData.addressGcj02 = data.addressGcj02;
+      //小区
+      this.formData.addressName = data.addressName;
+      //详细地址
+      this.formData.addressFull = data.addressFull;
+      //门牌号
+      this.formData.addressNo = data.addressNo;
+      if (data.addressFull) {
+        // 设置地址(不包括门牌号)
+        this.formData.customerDistrict = {}
+        this.formData.customerDistrict.addressFull = data.addressFull.replace(data.addressNo, '')
+      }
+      //联系人
+      this.formData.contactName = data.contactName ? data.contactName : this.formData.contactName
+      //联系电话
+      this.formData.contactPhones = data.contactPhones ? data.contactPhones : this.formData.contactPhones
+      if (!this.$route.query.editId) {
+        // 给业务员赋默认值
+        this.formData.staffId = data.staffId ? data.staffId : this.formData.staffId
+        this.formData.staffName = data.staffName ? data.staffName : this.formData.staffName
+        // 给业务部门赋默认值
+        this.formData.orgId = data.orgId ? data.orgId : this.formData.orgId
+        this.formData.orgName = data.orgName ? data.orgName : this.formData.orgName
+      }
+      //小区档案
+      this.formData.estateId = data.estateId ? data.estateId : this.formData.estateId
+      this.formData.estateName = data.estateName ? data.estateName : this.formData.estateName;
+      //客户来源
+      this.formData.customerFrom = data.customerFrom ? data.customerFrom : this.formData.customerFrom;
+      //预计送货日期
+      this.formData.entryTime = data.entryTime ? data.entryTime : this.formData.entryTime;
+      //所属公司Id
+      this.formData.ascpId = data.sale2Id ? data.sale2Id : this.formData.ascpId;
+      this.formData.cpName = data.sale2AscpName ? data.sale2AscpName : this.formData.cpName;
+      //供应商Id
+      this.formData.supplierId = data.supplierId ? data.supplierId : this.formData.supplierId;
+      //供应商名称
+      this.formData.supplierName = data.supplierName ? data.supplierName : this.formData.supplierName;
+      //供应商编码
+      this.formData.supplierCode = data.supplierCode ? data.supplierCode : this.formData.supplierCode;
+      //默认仓库
+      this.formData.entryWhId = data.entryWhId ? data.entryWhId : this.formData.entryWhId;
+      //默认仓库
+      this.formData.warehouseName = data.warehouseName ? data.warehouseName : this.formData.warehouseName;
+      //是否设计
+      this.formData.designStatusFlag = data.designStatus === this.$config.designStatus.yes ? true : false;
+      //交货方式
+      this.formData.deliveryType = data.deliveryType;
+      //备注
+      this.formData.remarks = data.remarks;
+      //表格下方金额赋值
+      if (this.type == this.$config.formMode.approval) {
+        //货物总额
+        this.goodsFootFormData.sumGoodsAmount = data.sumGoodsAmount;
+        //标价总额
+        this.goodsFootFormData.sumStandard = data.sumStandard;
+        //标价折扣
+        this.goodsFootFormData.discountStandard = data.discountStandard;
+        //标准售价
+        this.goodsFootFormData.sumPromotion = data.sumPromotion;
+        //标准售价折扣
+        this.goodsFootFormData.discountPromotion = data.discountPromotion;
+        //合计金额
+        this.feeFormData.sumAmount = data.sumAmount;
+      } else {
+        //货物总额
+        this.goodsFootFormData.sumGoodsAmount = data.tSumGoodsAmount;
+        //标价总额
+        this.goodsFootFormData.sumStandard = data.tSumStandard;
+        //标价折扣
+        this.goodsFootFormData.discountStandard = data.tDiscountStandard;
+        //标准售价
+        this.goodsFootFormData.sumPromotion = data.tSumPromotion;
+        //标准售价折扣
+        this.goodsFootFormData.discountPromotion = data.tDiscountPromotion;
+        //合计金额
+        this.feeFormData.sumAmount = data.tSumAmount;
+      }
+      //总重量
+      this.goodsFootFormData.sumWeight = data.sumWeight;
+      //总体积
+      this.goodsFootFormData.sumVolume = data.sumVolume;
+      //总数量
+      this.goodsFootFormData.sumQuantity = data.tSumQuantity;
+      //费用金额
+      this.feeFormData.sumFeeAmount = data.sumFeeAmount;
+      //订单定金
+      this.feeFormData.sumReceiptAmount = data.sumReceiptAmount;
+      //使用预存
+      this.feeFormData.sumUsePrestore = data.sumUsePrestore;
+      // 预存+定金
+      this.feeFormData.sumReceivableAmount = data.sumCollectedAmount;
+      // 收款明细
+      this.receiptList = data.receiptVOList;
+      this.feeFormData.sumReceiptList = data.receiptVOList;
+      // 剩余应收
+      this.feeFormData.receivable = data.receivable;
+      //推送结果
+      this.formData.erpPushStatus = data.erpPushStatus;
+      if (!this.$route.query.editId) {
+        // 订单明细
+        this.formData.goodsList = data.orderItemVOList;
+        let children = []
+        // 把明细的子级放到children中
+        if (data.orderItemVOList && data.orderItemVOList.length > 0) {
+          data.orderItemVOList.forEach(row => {
+            row.warehouseName = row.whName
+            //分销销售订单转采购明细存在
+            if (row.orderS2tobuyVOList && row.orderS2tobuyVOList.length > 0) {
+              row.transferableQuantity = row.orderS2tobuyVOList.filter(it => it.buyQuantity).sum('buyQuantity')
+              row.transferableFlag = true
+            }
+            if (row['bomItems'] && row['bomItems'].length > 0) {
+              row['bomItems'].forEach(it => {
+                it.warehouseName = it.whName
+                children.push(it);
+              })
+            }
+            // 如果是大编辑,非标参数需要设置
+            if (this.allCanEdit && row.nonGlassList && row.nonGlassList.length > 0) {
+              this.setNonGlassForm(row);
+              // 面积
+              if (row.nonStandardArea) {
+                row.nonStandardArea = row.nonStandardArea.toFixed(6)
+              }
+            }
+          })
+          this.$refs['goodsTable'].children = children;
+        }
+      }
+      this.formData.designUser = data.designUser
+      this.formData.designRemarks = data.designRemarks
+      this.formData.designUserName = data.designUserName;
+      this.setCustomerFlag = false;
+      if (data.annexPaths) {
+        this.formData.annexPaths = data.annexPaths.map(m => {
+          return {
+            name: m.name,
+            path: m.url,
+            type: m.type,
+            docType: m.docType,
+            createTime: m.createTime
+          }
+        })
+      }
+    },
+    /**
+     * @desc   : 页面初始化所需下拉数据
+     * @author : 付斌
+     * @date   : 2024-02-19 10:49
+     */
+    initSelectData() {
+      //查询所属公司
+      if (this.type == this.$config.formMode.add) {
+        this.getCpId()
+      }
+      //查询客户
+      this.getCustomer()
+      //查询供应商
+      if (this.type == this.$config.formMode.add) {
+        this.getSupplier()
+      }
+      //查询默认收货地址
+      this.getAddress()
+    },
+    /**
+     * @desc   : 查询客户
+     * @author : 付斌
+     * @date   : 2024-02-19 10:49
+     */
+    getCustomer() {
+
+    },
+    /**
+     * @desc   : 获取业务员
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    getStaff(staffId) {
+
+    },
+    /**
+     * @desc   : 获取业务部门 销售渠道
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    getOrgAndSaleChannel(orgId) {
+
+    },
+    /**
+     * @desc   : 查询仓库
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    getWarehouse() {
+
+    },
+    /**
+     * @desc   : 查询供应商
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    getSupplier() {
+
+    },
+    /**
+     * @desc   : 查询所属公司
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    getCpId() {
+
+    },
+    /**
+     * @desc   : 查询仓库
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    getCpIdWarehouse() {
+
+    },
+    /**
+     * @desc   : 查询明细仓库
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    getDetailWarehouse() {
+
+    },
+    /**
+     * @desc   : 查询默认收货地址
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    getAddress() {
+
+    },
+    /**
+     * @desc   : 设置默认值
+     * @author : 付斌
+     * @date   : 2024-02-19 10:50
+     */
+    setDefaultValue() {
+      //客户赋值
+      this.formData.sale2OrgId = this.$store.state.user.sale2OrgId
+      this.formData.sale2StaffId = this.$store.state.user.sale2StaffId
+      this.formData.supplierId = this.$store.state.user.sale2SupplierId
+      //地址赋值
+      if (this.$store.state.user.cityName) {
+        let city = this.$store.state.user.cityName;
+        let filterRows = this.cityData.filter(it => it.key == city);
+        if (!filterRows || filterRows.length === 0) {
+          // 给城市赋值
+          this.cityData.push({key: city, value: city})
+        }
+      }
+    },
+  },
+  activated() {
+    this.focusItem = 'supplierId';    // 给第一个组件赋值,可以在混入中自动去聚焦
+    if (this.$route.query && this.$route.query.editId) {
+      this.orderId = this.$route.query.editId
+      this.purchaseBasedOnSales(true)
+    }
+  },
+  /**
+   * @desc   : 在实例创建完成后被立即同步调用
+   * @author : 寇珊珊
+   * @date   : 2022/3/3 10:32
+   */
+  created() {
+    this.focusItem = 'supplierId';    // 给第一个组件赋值,可以在混入中自动去聚焦
+    this.primaryKey = 'purOrderId'  // 设置主键Id
+    // 根据用户敏感信息,设置隐藏列
+    let us = this.$store.state.user.userSensitive.filter(f => f.isCheck && f.docCode == this.$config.docCode.fxPurchaseOrder
+      && f.itemName == this.$config.sensitiveItemName.purchasePrice);
+    if (us.length > 0) {
+      this.visUserSensitive = true;
+    }
+    //查询页面初始化所需数据
+    this.initSelectData();
+  },
+  /**
+   * @desc   : 实例被挂载后调用
+   * @author : 寇珊珊
+   * @date   : 2022/3/3 10:31
+   */
+  mounted() {
+  },
 }
 </script>
 
-<style scoped>
+<style lang="less" scoped>
+.imageWrap {
+  width: 100%;
+  height: 90px;
+  border: 1px solid red;
+}
+
+.tab-class {
+  width: 100%;
+  height: 32px;
+  position: fixed;
+  z-index: 999;
+  background: #fff;
+}
+
+.Col {
+  margin-bottom: 3px;
+}
+
+//暗锚
+.hide-anchor {
+  position: relative;
+  top: -50px;
+  display: block;
+  height: 0;
+  overflow: hidden;
+}
+
 
+.form-content-class {
+  padding-left: 8px;
+  width: 98%
+}
+
+.search-button-class {
+  justify-content: center;
+  align-items: center;
+  display: flex;
+  height: 28px;
+  width: 24px;
+  cursor: pointer;
+  border-bottom: 1px solid rgb(220, 222, 226);
+  border-right: 1px solid rgb(220, 222, 226);
+  border-top: 1px solid rgb(220, 222, 226);
+}
+
+.close-class {
+  cursor: pointer;
+  width: 24px;
+  position: absolute;
+  top: 5px;
+  right: 15px;
+  align-items: center;
+  justify-content: center;
+  height: 24px;
+  color: #a0a5ac;
+  z-index: 99;
+}
 </style>

+ 824 - 2
src/view/pur/pur-order/index.vue

@@ -1,13 +1,835 @@
+<!-- @desc:采购订单  @auth:付斌  @time:2024/1/30 15:15 -->
 <template>
+  <div class="main-div">
+    <BaseIndexButtonGroup id="BaseIndexButtonGroup">
+      <template #left>
+        <BaseIndexButton ref="search" name="search"></BaseIndexButton>
+        <BaseIndexButton ref="clear" name="clear"></BaseIndexButton>
+        <BaseIndexButton ref="edit" name="edit"></BaseIndexButton>
+        <!--冲正-->
+        <BaseIndexButton ref="revert" name="revert"></BaseIndexButton>
+        <!--关闭-->
+        <BaseIndexButton ref="close" name="close"></BaseIndexButton>
+        <!--退货/换货-->
+        <BaseIndexButton ref="returnAndExchangeGoods" name="returnAndExchangeGoods"></BaseIndexButton>
+        <!--采购退货-->
+        <BaseIndexButton ref="purchaseReturn" name="purchaseReturn"></BaseIndexButton>
+        <!--打印-->
+        <BaseIndexButton ref="print" name="print"></BaseIndexButton>
+      </template>
+      <template #right>
+        <BaseIndexButton ref="add" name="add"></BaseIndexButton>
+      </template>
 
+    </BaseIndexButtonGroup>
+    <!--  查询条件区域  -->
+    <div id="search-cond-div" ref="search-cond-div" style="margin-top: 1px;padding: 0">
+      <SearchCond ref="searchCond" v-model="searchCond"
+                  @collapse-change="collapseChange" :setFlag="false"
+                  :searchContent="searchContent"></SearchCond>
+    </div>
+    <DkSplit mode="vertical" v-model="split" :height="tableHeight">
+      <div slot="top" style="margin-left: 5px;">
+        <!--  表格部分  -->
+        <DkTabs v-model="tabsModel" :options="tabsOptions" @on-click="tabsClick"></DkTabs>
+        <DkTable :pageFlag="true" primaryKey="orderId" :id="'table-'+$options.name" name="table"
+                 @current-change="selectChangeTable" :refreshSelect="false" :show-footer="true"
+                 :checkMethodFlag="true"
+                 :export-url="$libaray.checkButtonHasRight('sale-export')?'/order-server/sale/order/export/':''"
+                 :export-condition="exportCondition"
+                 :tree-flag="true" sum-total-type="total"
+                 @pageChange="pageSizeChange" ref="table-select" :data="tableData" :height="tableHeight/2-70">
+          <DkTableColumn class-name="fixed-left" type="radio" fixed="left" width="45"></DkTableColumn>
+          <DkTableColumn type="seq" width="60" sortable></DkTableColumn>
+          <!--所属公司-->
+          <DkTableColumn field="ascpName" :title="$t('asCpId')" width="130px"></DkTableColumn>
+          <!--采购单号-->
+          <DkTableColumn :type="$libaray.checkButtonHasRight('purchase-order-edit')?'link':''" field="orderNo"
+                         :title="$t('procureOrderNo')" width="220px"
+                         :tree-node="true"
+                         @on-link="edit"></DkTableColumn>
+          <!--订单日期-->
+          <DkTableColumn field="makingTime" width="120px" data-type="date"
+                         :title="$t('purchaseDate')"></DkTableColumn>
+          <!--供应商-->
+          <DkTableColumn field="supplierName" :title="$t('supplier')" width="160px"></DkTableColumn>
+          <!--单据状态-->
+          <DkTableColumn field="orderStatusString" :title="$t('orderStatus')" width="120px"></DkTableColumn>
+          <!--审批状态-->
+          <DkTableColumn field="apvResult" :title="$t('approvalStatus')" width="120px"></DkTableColumn>
+          <!--合计金额-->
+          <DkTableColumn field="tSumAmount" width="120px" :title="$t('sumAmount')" :digits="2"
+                         sum v-if="visUserSensitive"></DkTableColumn>
+          <!--货物金额-->
+          <DkTableColumn field="tSumGoodsAmount" width="120px" :title="$t('sumGoodsAmount')" :digits="2"
+                         sum v-if="visUserSensitive"></DkTableColumn>
+          <!--发货状态-->
+          <DkTableColumn field="outStatusString" :color-cards="['未出库','出库中','出库完成']" :title="$t('shipmentStatus')"
+                         width="120px"></DkTableColumn>
+          <!--合计出库数量-->
+          <DkTableColumn field="sumOrderOutQuantity" width="150px" :title="$t('totalOutQuantity')" :digits="2"
+                         sum></DkTableColumn>
+          <!--合计出库金额-->
+          <DkTableColumn field="sumOrderOutAmount" width="150px" :title="$t('totalOutAmount')" :digits="2" sum
+                         dataType="number" v-if="visUserSensitive"></DkTableColumn>
+          <!--入库状态-->
+          <DkTableColumn field="entryStatusString" :color-cards="['未入库','入库中','入库完成']" :title="$t('entryStatus')"
+                         width="120px"></DkTableColumn>
+          <!--合计入库数量-->
+          <DkTableColumn field="sumEntryQuantity" width="150px" :title="$t('totalEntryQuantity')" :digits="2"
+                         sum></DkTableColumn>
+          <!--合计入库金额-->
+          <DkTableColumn field="sumEntryAmount" width="150px" :title="$t('totalEntryAmount')" :digits="2" sum
+                         dataType="number" v-if="visUserSensitive"></DkTableColumn>
+          <!--退货状态-->
+          <DkTableColumn field="rejectStatusString" :color-cards="['有退货','无退货']" :title="$t('rejectStatus')"
+                         width="120px"></DkTableColumn>
+          <!--合计退货数量-->
+          <DkTableColumn field="sumRejectQuantity" width="150px" :title="$t('sumRejectQuantity')" :digits="2"
+                         sum></DkTableColumn>
+          <!--合计退货金额-->
+          <DkTableColumn field="sumRejectAmount" width="150px" :title="$t('sumRejectAmount')" :digits="2"
+                         sum v-if="visUserSensitive"></DkTableColumn>
+          <!--预计收货日期-->
+          <DkTableColumn field="entryTime" width="140px" data-type="date"
+                         :title="$t('expectedDeliverDate')"></DkTableColumn>
+          <!--收货地址-->
+          <DkTableColumn field="addressFull" width="250px" dataType="string"
+                         :title="$t('takeOverAddress')"></DkTableColumn>
+          <!--收货人-->
+          <DkTableColumn field="contactName" width="120px" :title="$t('consignee')"></DkTableColumn>
+          <!--收货电话-->
+          <DkTableColumn field="customerPhone" width="120px" :title="$t('consigneePhone')"></DkTableColumn>
+          <!--收货仓库-->
+          <DkTableColumn field="entryWhName" :title="$t('receivingWarehouse')" width="120px"></DkTableColumn>
+          <!--推送状态-->
+          <DkTableColumn field="erpPushStatusName" :title="$t('erpPushStatus')" width="120px"></DkTableColumn>
+          <!--推送结果-->
+          <DkTableColumn field="erpPushResult" width="120px"></DkTableColumn>
+          <!--制单人-->
+          <DkTableColumn field="makingUserName" width="120px" :title="$t('makingUser')"></DkTableColumn>
+          <!--制单人-采购订单-->
+          <DkTableColumn field="makingUserPurName" width="120px" :title="$t('makingUserPurName')"></DkTableColumn>
+          <!--制单日期-->
+          <DkTableColumn field="makingTime" width="120px" data-type="dateTime"
+                         :title="$t('makingData')"></DkTableColumn>
+          <!--备注-->
+          <DkTableColumn field="remarks" width="250px"></DkTableColumn>
+        </DkTable>
+      </div>
+      <div slot="bottom">
+        <DkTabs v-model="detailModel" :options="detailOptions" @on-click="detailTabsClick"></DkTabs>
+        <div v-show="standardGoodsFlag">
+          <!--订单明细-->
+          <DkTable :pageFlag="false" :pageTotalFlag="false" :treeFlag="true" primaryKey="itemId"
+                   :expand-flag="true"
+                   :id="'table-'+$options.name" :show-footer="true"
+                   :export-url="$libaray.checkButtonHasRight('sale-export')?'/order-server/sale/order_item/export/'+orderId:''"
+                   name="table" ref="detail-select" :data="tableDataDetail_goodsDetail" :height="this.tableHeight/2-40">
+            <DkTableColumn type="seq" width="60" sortable></DkTableColumn>
+            <DkTableColumn
+              v-for="(item, index) in tableDataTitle_goodsDetail"
+              :key="detailModel+index"
+              v-if="!(item.UserSensitiveFlag && !visUserSensitive)"
+              align="center"
+              :type="item.type"
+              :field="item.field"
+              :title="item.title"
+              :sum="item.sum"
+              :digits="item.digits"
+              :width="item.width"
+              :dataType="item.dataType"
+              :tree-node="item.treeNode"
+            >
+            </DkTableColumn>
+          </DkTable>
+        </div>
+        <!--附件-->
+        <div v-show="reviewResumeFlag">
+          <DkTable :pageFlag="false" :pageTotalFlag="false" :id="'table-'+$options.name"
+                   name="table" ref="file-select" :data="tableDataDetail_files" :height="this.tableHeight/2-40">
+            <DkTableColumn type="seq" width="60" sortable></DkTableColumn>
+            <DkTableColumn field="docType" min-width="150" width="150"></DkTableColumn>
+            <DkTableColumn field="name" :title="$t('fileName')" min-width="300" width="300"></DkTableColumn>
+            <vxe-column field="createTime" :title="$t('uploadTime')" min-width="150" width="150"></vxe-column>
+            <vxe-column :title="$t('picture')" class-name="img-column" width="100">
+              <template #default="{row}">
+                <img :src="$config.imgUrl + row.url" v-if="row.type == 'img' || row.type == 'image'"
+                     style="width: 100px; height: 100px; cursor: pointer;"
+                     @click="openFile(row)"/>
+              </template>
+            </vxe-column>
+            <vxe-column>
+              <template #default="{row}">
+                <DkButton @click="openFile(row)">
+                  <Icon type="md-download"/>
+                </DkButton>
+              </template>
+            </vxe-column>
+          </DkTable>
+        </div>
+      </div>
+    </DkSplit>
+  </div>
 </template>
 
 <script>
+
+import {indexMixin} from '@/mixins'
+
 export default {
-  name: "index"
+  name: 'purchase-order',
+  mixins: [indexMixin],
+  data() {
+    let self = this
+    return {
+      //用户敏感信息隐藏
+      visUserSensitive: false,
+      standardGoodsFlag: true,
+      reviewResumeFlag: false,
+      //总单导出条件
+      exportCondition: null,
+      totalTab: null,//存放总单tab切换到那个标签
+      // 模式切换值
+      tabsModel: 'orderAll',
+      tabsOptions: [{label: self.$t('orderAll'), name: 'orderAll'}, //全部订单
+        {label: self.$t('purchaseOrder'), name: 'purchaseOrder'}, //采购暂存
+        {label: self.$t('purchaseReal'), name: 'purchaseReal'},//采购成交
+      ],
+      detailModel: 'goodsDetail',
+      detailOptions: [{label: self.$t('goodsDetail'), name: 'goodsDetail'}, //货物明细
+        {label: self.$t('filesDetail'), name: 'filesDetail'}, //附件明细
+      ],
+      //画面模式选项角标
+      bottomList: ['1', '2', '3', '4', '5', '6'],
+      tableData: [],
+      tableDataDetail_goodsDetail: [],  // 用于存放订单明细数据
+      tableDataDetail_returnDetail: [],// 用于存放销售退货单数据
+      tableDataDetail_refundDetail: [],// 用于存放销售退款单数据
+      tableDataDetail_files: [],  // 用于存放订单附件
+      tableDataTitle: [],
+      tableDataTitle_goodsDetail: [
+        {field: 'skuModel', width: '120px', type: 'text', treeNode: true},
+        {field: 'skuName', width: '200px', type: 'text'},
+        {field: 'skuCode', width: '100px', type: 'text'},
+        {field: 'bomSkuCode', width: '120px', type: 'text'},
+        //采购数量
+        {
+          field: 'tItemQuantity',
+          title: self.$t('purchaseQuantity'),
+          width: '120px',
+          type: 'number',
+          digits: 0,
+          sum: true
+        },
+        //采购单价
+        {
+          field: 'priceSale',
+          width: '120px',
+          title: self.$t('purchasePriceSale'),
+          digits: 2,
+          type: 'number',
+          UserSensitiveFlag: true
+        },
+        //采购金额
+        {
+          field: 'tItemAmount',
+          title: self.$t('purchaseAmount'),
+          width: '120px',
+          type: 'number',
+          digits: 2,
+          sum: true,
+          UserSensitiveFlag: true
+        },
+        //发货状态
+        {
+          field: 'outStatusString',
+          title: self.$t('shipmentStatus'),
+          width: '120px',
+          type: 'number',
+          digits: 2,
+          sum: true
+        },
+        //出库中数量
+        {field: 'outGoingQuantity', width: '120px', type: 'number', digits: 0, dataType: 'number', sum: true},
+        //已出库数量
+        {field: 'outQuantity', width: '120px', type: 'number', digits: 0, dataType: 'number', sum: true},
+        //入库状态
+        {
+          field: 'entryStatusString',
+          title: self.$t('entryStatus'),
+          width: '120px',
+          type: 'text',
+        },
+        //入库中数量
+        {
+          field: 'entryGoingQuantity',
+          title: self.$t('quantityInStorage'),
+          width: '120px',
+          type: 'number',
+          digits: 0,
+          dataType: 'number',
+          sum: true
+        },
+        //已入库数量
+        {
+          field: 'entryQuantity',
+          title: self.$t('quantityInStock'),
+          width: '120px',
+          type: 'number',
+          digits: 0,
+          dataType: 'number',
+          sum: true
+        },
+        //退货状态
+        {
+          field: 'rejectStatusString',
+          title: self.$t('rejectStatus'),
+          width: '120px',
+          type: 'text',
+        },
+        //退货中数量
+        {
+          field: 'entryRejectQuantity',
+          title: self.$t('rejectGoingQuantity'),
+          width: '120px',
+          type: 'number',
+          digits: 0,
+          dataType: 'number',
+          sum: true
+        },
+        //已退货数量
+        {
+          field: 'rejectQuantity',
+          title: self.$t('rejectOutQuantity'),
+          width: '120px',
+          type: 'number',
+          digits: 0,
+          dataType: 'number',
+          sum: true
+        },
+        //商品品牌
+        {field: 'skuBrand', width: '120px', type: 'text'},
+        //型号分类
+        {field: 'skuTypeName', title: self.$t('skuTypeBom'), width: '120px', type: 'text'},
+        //非标号
+        {field: 'nonStandardCode', width: '120px', type: 'text', title: self.$t('nonStandardCode')},
+        //计量标识
+        {field: 'unitName', width: '120px', type: 'text', title: self.$t('flgEstimate')},
+        //收货仓库
+        {field: 'entryWhName', width: '120px', title: self.$t('receivingWh'), type: 'text'},
+        //经销商库区
+        {field: 'whName', width: '120px', title: self.$t('supplierWareHouse'), type: 'text'},
+        //促销类型
+        {field: 'promotionTypeName', width: '120px', type: 'text'},
+        //营销活动
+        {field: 'activityName', width: '220px', type: 'text'},
+        //促销名称
+        {field: 'promotionName', width: '120px', type: 'text', title: self.$t('promoName')},
+        //重量
+        {field: 'skuWeight', width: '120px', type: 'number', digits: 2, sum: true},
+        //体积
+        {field: 'skuVolume', width: '120px', type: 'number', digits: 2, sum: true},
+        //备注
+        {field: 'remarks', width: '220px', type: 'text'},
+      ],
+      tableDataTitle_returnDetail: [
+        {field: 'skuModel', width: '120px', type: 'text'},
+        {field: 'skuName', width: '200px', type: 'text'},
+        {field: 'skuCode', width: '100px', type: 'text'},
+        {field: 'spuCode', width: '120px', type: 'text'},
+        {field: 'rejectQuantity', width: '200px', digits: 0, type: 'number', sum: true},
+        {field: 'rejectAmount', width: '200px', type: 'number', digits: 2, sum: true, UserSensitiveFlag: true},
+        {field: 'skuWeight', width: '120px', type: 'number', digits: 2, sum: true},
+        {field: 'skuVolume', width: '120px', type: 'number', digits: 2, sum: true},
+        {field: 'remarks', width: '220px', type: 'text'},
+      ],
+      tableDataTitle_refundDetail: [
+        {field: 'refundNo', width: '220px', type: 'text'},
+        {field: 'refundStatus', width: '200px', type: 'text', title: self.$t('refundStatusName')},
+        {field: 'erpRefundTypeName', width: '140px', type: 'text'},
+        {field: 'erpRefundNo', width: '220px', type: 'text'},
+        {field: 'erpRefundAmount', width: '150px', digits: 2, type: 'number', sum: true, UserSensitiveFlag: true},
+        {field: 'applyAmount', width: '150px', type: 'number', digits: 2, sum: true, UserSensitiveFlag: true},
+        {field: 'refundAmount', width: '150px', type: 'number', digits: 2, sum: true, UserSensitiveFlag: true},
+        {field: 'cancelAmount', width: '150px', type: 'number', digits: 2, sum: true, UserSensitiveFlag: true},
+        {field: 'settlementTypeName', width: '180px', type: 'text'},
+        {field: 'erpApvResult', width: '180px', type: 'text'},
+        {field: 'erpApvResultTime', width: '120px', type: 'text'},
+        {field: 'erpApvResultMsg', width: '120px', type: 'text'},
+        {field: 'remarks', width: '220px', type: 'text'},
+      ],
+      orderId: 0,//查询明细需要的订单id
+      orderType: self.$config.orderType.order,
+      // tabsClickDetailVariable: self.$config.orderDetailAllocation.goodsDetail,//明细tab默认变量
+      // 查询条件
+      searchCond: {},
+      searchContent: [
+        {
+          itemCode: '采购单号-文本',
+          itemName: 'procureOrderNo',
+          valueFormat: {code: 'orderNo'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '供应商-文本',
+          itemName: 'supplier',
+          valueFormat: {code: 'supplierId'},
+          valueKind: 'S-SEARCH',
+          magnifierType: self.$config.MagnifierType.supplier,
+        },
+        {
+          itemCode: '收货人-文本',
+          itemName: 'consignee',
+          valueFormat: {code: 'customerName'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '收货电话-文本',
+          itemName: 'consigneePhone',
+          valueFormat: {code: 'customerPhone'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '收货地址-文本',
+          itemName: 'takeOverAddress',
+          valueFormat: {code: 'addressFull'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '所属公司-文本',
+          itemName: 'asCpId',
+          valueFormat: {code: 'asCpIds'},
+          valueKind: 'M-SEARCH',
+          magnifierType: self.$config.MagnifierType.company,
+        },
+        {
+          itemCode: '发货状态-下拉',
+          itemName: 'outStatus',
+          valueFormat: {
+            code: 'outStatusList',
+            data: [
+              {valueKey: '出库状态-未收', flgValid: '未出库'},
+              {valueKey: '出库状态-部分', flgValid: '出库中'},
+              {valueKey: '出库状态-完成', flgValid: '出库完成'}],
+            valueKey: 'valueKey',
+            labelKey: 'flgValid',
+            default: []
+          },
+          valueKind: 'M-CHOICE'
+        },
+        {
+          itemCode: '入库状态-下拉',
+          itemName: 'entryStatus',
+          valueFormat: {
+            code: 'entryStatusList',
+            data: [
+              {valueKey: '入库状态-未收', flgValid: '未入库'},
+              {valueKey: '入库状态-部分', flgValid: '入库中'},
+              {valueKey: '入库状态-完成', flgValid: '入库完成'}],
+            valueKey: 'valueKey',
+            labelKey: 'flgValid',
+            default: []
+          },
+          valueKind: 'M-CHOICE'
+        },
+        {
+          itemCode: '商品名称-文本',
+          itemName: 'skuName',
+          valueFormat: {code: 'skuName'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '商品型号-文本',
+          itemName: 'skuModel',
+          valueFormat: {code: 'skuModel'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '唯一编码-文本',
+          itemName: 'onlyCode',
+          valueFormat: {code: 'skuCode'},
+          valueKind: 'STR'
+        },
+        {
+          itemCode: '入库日期-时间',
+          itemName: 'entryTime',
+          valueFormat: {code: 'entryTime'},
+          valueKind: 'DATE_RANGE'
+        },
+        {
+          itemCode: '采购日期-时间',
+          itemName: 'purchaseDate',
+          valueFormat: {code: 'opCreateTime', default: [new Date().addMonths(-1), new Date()]},
+          valueKind: 'DATE_RANGE'
+        },
+      ],
+      //修改收货日期
+      editEntryTimeFlag: false,
+      errMessage: {},
+      depositTitle: this.$t('editEntryTime'),
+      editEntryTimeFormData: {
+        orderId: null,
+        supplierName: null,
+        orderNo: null,
+        contactName: null,
+        addressFull: null,
+        orgName: null,
+        staffName: null,
+        oldEntryTime: null,
+        nowEntryTime: null,
+        detailLength: 0,
+        tSumAmount: 0,
+      },
+      ruleInline: {
+        nowEntryTime: [
+          {required: true, trigger: 'none', type: 'date'}
+        ]
+      },
+
+    }
+  },
+  methods: {
+    /**
+     * @desc   : 新建
+     * @author : 付斌
+     * @date   : 2024-02-19 9:59
+     */
+    add() {
+      this.$router.push('/pur/purOrder/add');
+    },
+    /**
+     * @desc   : 进入客户页面
+     * @author : 付斌
+     * @date   : 2024-02-01 14:20
+     */
+    edit(row) {
+      this.$router.push('/pur/purOrder/edit/' + row['purOrderId'])
+    },
+    /**
+     * @desc   : 查询事件
+     * @author : 付斌
+     * @date   : 2024-02-19 9:59
+     */
+    initData(currentPage, StringOrderTab) {
+      //查询条件
+      if (currentPage) {
+        this.pageInfo.currentPage = currentPage
+      }
+      // 查询数据
+      this.getData(StringOrderTab)
+    },
+    /**
+     * @desc   : 查询数据
+     * @author : 付斌
+     * @date   : 2024-02-19 9:59
+     */
+    getData(StringOrderTab) {
+
+    },
+    /**
+     * @desc   : 根据明细tabs查询订单明细
+     * @author : 付斌
+     * @date   : 2024-02-19 10:00
+     */
+    initDetailData(detailTabString, type) {
+
+    },
+    /**
+     * @desc   : 打开附件
+     * @author : 付斌
+     * @date   : 2024-02-19 10:00
+     */
+    openFile(row) {
+      window.open(this.$config.imgUrl + row.url)
+    },
+    /**
+     * @desc   : 打印订单
+     * @author : 付斌
+     * @date   : 2024-02-19 10:00
+     */
+    printOrder() {
+      if (this.$refs['table-select'].batchKeys.length !== 1) {
+        this.$Message.error(this.$t('W_013'))
+        return
+      }
+      this.$refs['print-btn'].openChooseTemplate()
+    },
+    /**
+     * @desc   : 冲正
+     * @author : 付斌
+     * @date   : 2024-02-19 10:01
+     */
+    revert() {
+
+    },
+    /**
+     * @desc   : 关闭暂存单
+     * @author : 付斌
+     * @date   : 2024-02-19 10:01
+     */
+    close() {
+
+    },
+    /***************************列表及其他事件************************************/
+
+    /**
+     * @desc   : 分页
+     * @author : 付斌
+     * @date   : 2024-02-19 10:02
+     */
+    pageSizeChange(pageInfo) {
+      this.pageInfo = pageInfo
+      this.getData() // 查询数据
+    },
+    /**
+     * @desc   : 总单行事件选择
+     * @author : 付斌
+     * @date   : 2024-02-19 10:02
+     */
+    selectChangeTable(e) {
+      // 先把明细恢复到第一个
+      this.detailModel = this.$config.orderDetailAllocation.goodsDetail;
+      if (e && e.row) {
+        this.orderId = e.row.orderId
+        // 订单类型
+        this.orderType = e.row.orderType
+        //订单附件
+        this.tableDataDetail_files = e.row.annexPaths
+        //根据总单id查询明细以及收款
+        this.initDetailData(this.$config.orderDetailAllocation.goodsDetail,
+          JSON.stringify({'type': this.orderType}))
+      }
+    },
+    /**
+     * @desc   : 总单tab切换
+     * @author : 付斌
+     * @date   : 2024-02-19 10:02
+     */
+    tabsClick(val) {
+      //如果切换的tab存在就去根据条件查询
+      if (val) {
+        this.totalTab = val
+        this.initData(1, val)
+      }
+    },
+    /**
+     * @desc   : 点击Tab进行切换
+     * @author : 付斌
+     * @date   : 2024-02-19 11:33
+     */
+    detailTabsClick(val) {
+      if (val === 'goodsDetail') {
+        this.standardGoodsFlag = true
+        this.reviewResumeFlag = false
+      } else if (val === 'filesDetail') {
+        this.standardGoodsFlag = false
+        this.reviewResumeFlag = true
+      }
+    },
+    /***************************设定参数函数************************************/
+    /**
+     * @desc   : 查询参数设定
+     * @author : 付斌
+     * @date   : 2024-02-19 10:02
+     */
+    setSearchParams(StringOrderTab) {
+
+    },
+    /***************************created调用数据接口函数************************************/
+
+  },
+  created() {
+    this.primaryKey = 'purOrderId'  // 设置主键Id
+    this.routeObjName = 'purOrder'  // 设置路由名称
+    // 根据用户敏感信息,设置隐藏列
+    let us = this.$store.state.user.userSensitive.filter(f => f.isCheck && f.docCode == this.$config.docCode.fxPurchaseOrder
+      && f.itemName == this.$config.sensitiveItemName.purchasePrice);
+    if (us.length > 0) {
+      this.visUserSensitive = true;
+    }
+  },
 }
 </script>
 
-<style scoped>
+<style lang="less" scoped>
+.main-div {
+  padding: 0 0 0 1px;
+  min-width: 1050px;
+  height: 80%;
+  overflow-y: auto;
+  position: relative;
+}
+
+.goods-menu::-webkit-scrollbar {
+  /*滚动条整体样式*/
+  width: 0; /*高宽分别对应横竖滚动条的尺寸*/
+  height: 0;
+}
+
+.goods-menu::-webkit-scrollbar-thumb {
+  /*滚动条里面小方块*/
+  border-radius: 10px;
+  box-shadow: inset 0 0 5px #2d8cf0;
+  background: #fff;
+}
+
+.goods-menu::-webkit-scrollbar-track {
+  /*滚动条里面轨道*/
+  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+  border-radius: 10px;
+  background: #ededed;
+}
+
+/deep/ .goods-menu {
+  border: 1px solid #e8eaec;
+  width: fit-content;
+  overflow-y: auto;
+  overflow-x: hidden;
+
+  ul:after {
+    background: #fff;
+  }
+
+  ul {
+    .ivu-menu-item-selected {
+      background: #f0faff !important;
+    }
+
+    li {
+      background-color: #fff !important;
+      text-align: left;
+    }
+  }
+}
+
+/deep/ .tabs {
+  .ivu-tabs-bar {
+    margin-bottom: 0 !important;
+  }
+}
+
+/deep/ .el-tabs__nav {
+  div {
+    font-size: 10px;
+  }
+}
+
+/deep/ .el-tabs__header {
+  margin-bottom: 0 !important;
+}
+
+/deep/ .ivu-menu-horizontal {
+  height: 25px !important;
+  line-height: 10px !important;
+}
+
+.menu:after {
+  background: #fff;
+}
 
+.menu {
+  height: 50px;
+  z-index: 10;
+  background: #fff;
+  margin-bottom: 5px;
+
+  li {
+    background-color: #fff !important;
+    text-align: center;
+  }
+}
+
+.menu-2 {
+  width: 138px;
+  line-height: 20px;
+  text-align: center;
+  background: #f8f8f9;
+  border-bottom: 1px solid #e8eaec;
+  position: absolute;
+  z-index: 11
+}
+
+/deep/ .el-tabs__item {
+  height: 20px;
+}
+
+.main-div::-webkit-scrollbar {
+  /*滚动条整体样式*/
+  width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
+  height: 0;
+}
+
+.main-div::-webkit-scrollbar-thumb:hover {
+  /*滚动条里面小方块*/
+  border-radius: 10px;
+  box-shadow: inset 0 0 5px #2d8cf0;
+  background: #2d8cf0;
+}
+
+.main-div::-webkit-scrollbar-track:hover {
+  /*滚动条里面轨道*/
+  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+  border-radius: 10px;
+  background: #ededed;
+}
+
+.main-div::-webkit-scrollbar-thumb {
+  /*滚动条里面小方块*/
+  border-radius: 10px;
+  box-shadow: inset 0 0 5px #f5f7f9;
+  background: #f5f7f9;
+}
+
+.main-div::-webkit-scrollbar-track {
+  /*滚动条里面轨道*/
+  box-shadow: inset 0 0 5px #f5f7f9;
+  border-radius: 10px;
+  background: #f5f7f9;
+}
+
+.quick-top-div {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+/deep/ .quick-top-div-icon {
+  width: 10%;
+  text-align: right;
+  padding-right: 5px;
+}
+
+.table-full-screen {
+  margin-top: 1px;
+  padding: 0px;
+  position: fixed;
+  top: 0;
+  height: 100vh;
+  width: calc(~'100% - 210px');
+  z-index: 12;
+}
+
+
+//酷家乐弹窗 /deep/
+/deep/ .kjl-modal .ivu-modal {
+  height: 88%;
+  overflow: hidden;
+}
+
+/deep/ .kjl-modal .ivu-modal .ivu-modal-content {
+  height: 115%;
+  overflow: hidden;
+}
+
+/deep/ .kjl-modal .ivu-modal .ivu-modal-content .ivu-modal-body {
+  height: 80%;
+  overflow: auto;
+}
+
+/deep/ .img-column .vxe-cell {
+  height: unset !important;
+  padding: 5px 0;
+}
 </style>