<!-- @desc:销售订单新建  @auth:付斌  @time:2024/02/20 15:15 -->
<template>

  <div class="main-div" style="position: relative;">
    <DkCollapse @on-change="changeCollapse" ref="collapse">
      <DkPanel prop="essentialInformation">
        <!--  单据信息  -->
        <DkForm slot="content" ref="formInline" v-model="formData" style="width:100%">
          <!--订单单号-->
          <DkFormItem prop="orderNo">
            <InputPop ref="orderNo" v-model="formData.orderNo" :readonly="true"/>
          </DkFormItem>
          <!--客户电话-->
          <DkFormItem prop="cusPhone" :required="true">
            <SelectMagnifier v-model="formData.cusPhone"
                             :telephone="true"
                             :other-condition="{flgOrderForm: true}"
                             primary-key="cusId"
                             :input-read-only="customerPhoneReadOnly"
                             ref="cusPhone"
                             :type="this.$config.MagnifierType.customer"
                             :disabled="checkColumnIsEdit('cusPhone')"
                             @on-input-blur="selectCustomer"
                             @ok="selectCustomer"
            >
            </SelectMagnifier>
          </DkFormItem>
          <!--客户名称-->
          <DkFormItem prop="cusName" :required="true">
            <InputPop ref="cusName" :readonly="checkColumnIsEdit('cusName')"
                      v-model="formData.cusName"/>
          </DkFormItem>
          <!--客户区域-->
          <DkFormItem prop="addressName" :required="true">
            <RegionsChoose v-model="addressArea" :options="cityData" :default-value="formData.addressName"
                           :readonly="checkColumnIsEdit('addressArea')" ref="customerDistrict"
                           @on-choose="chooseAddress"></RegionsChoose>
          </DkFormItem>
          <!--门牌号-->
          <DkFormItem prop="addressNo" :required="true">
            <InputPop ref="addressNo" :readonly="checkColumnIsEdit('addressNo')"
                      v-model="formData.addressNo"
                      @input="setAddressFull"/>
          </DkFormItem>
          <!--详细地址-->
          <DkFormItem prop="addressFull" :required="true">
            <InputPop ref="addressFull" v-model="formData.addressFull"/>
          </DkFormItem>
          <!--联系人-->
          <DkFormItem prop="contactName">
            <InputPop ref="contactName" :readonly="checkColumnIsEdit('contactName')"
                      v-model="formData.contactName"/>
          </DkFormItem>
          <!--联系电话-->
          <DkFormItem prop="contactPhone">
            <!--                    <SelectInputPop ref="contactPhone" :disabled="readonlyFlag" v-model="formData.contactPhone"/>-->
            <InputPop :telephone="true" ref="contactPhone" :readonly="checkColumnIsEdit('contactPhone')"
                      v-model="formData.contactPhone"/>
          </DkFormItem>
          <!--业务部门-->
          <DkFormItem prop="orgId" :label="$t('orgId')" :required="true">
            <SelectMagnifier v-model="formData.orgId" :display-text="formData.orgName"
                             :type="this.$config.MagnifierType.org"
                             @ok="orgOk"
                             :initSearchFlag="true"
                             :readonly="checkColumnIsEdit('orgId')"
                             :multiple="false"/>
          </DkFormItem>
          <!--业务员-->
          <DkFormItem prop="staffId" :label="$t('staffId')" :required="true">
            <SelectMagnifier v-model="formData.staffId" :display-text="formData.staffName"
                             :type="this.$config.MagnifierType.staff"
                             @ok="staffOk"
                             :initSearchFlag="true"
                             :readonly="checkColumnIsEdit('staffId')"
                             :multiple="false"/>
          </DkFormItem>
          <!--客户来源-->
          <DkFormItem prop="cusFrom" :required="true">
            <SelectPop v-model="formData.cusFrom" ref="cusFrom" :multiple="false"
                       :options="cusFromList"
                       :disabled="checkColumnIsEdit('cusFrom')"
                       labelKey="dataValue"
                       valueKey=dataId>
            </SelectPop>
          </DkFormItem>
          <!--销售渠道-->
          <DkFormItem prop="salesChannel" :required="true">
            <SelectPop v-model="formData.salesChannel" ref="salesChannel"
                       :options="channelList"
                       :multiple="false"
                       labelKey="channelName"
                       valueKey="channelId">
            </SelectPop>
          </DkFormItem>
          <!--送货时间-->
          <DkFormItem prop="deliveryDate" :data-type="$config.dataType.date">
            <DatePickerPop v-model="formData.deliveryDate"
                           :readonly="checkColumnIsEdit('deliveryDate')"
                           :short-cut-flag="true"/>
          </DkFormItem>
          <!--备注-->
          <DkFormItem prop="remarks">
            <InputPop ref="remarks" v-model="formData.remarks" :readonly="checkColumnIsEdit('remarks')"
                      maxlength=500 textareaFlag/>
          </DkFormItem>
        </DkForm>
      </DkPanel>
      <!--商品信息-->
      <DkPanel prop="goodsInformation">
        <div id="search-cond-div-goods-info" ref="search-cond-div-goods-info" slot="content">
          <EditTable ref="goodsTable" :data="formData.orderItemList" showFooter
                     major-field="itemId"
                     :new-row-flag="true"
                     :readonly="checkColumnIsEdit('goodsTable')"
                     :columns="this.type === this.$config.formMode.add ? addOrderItemColumns: editOrderItemColumns"
                     controlId="skuId"
                     @on-choose="getTotals"
                     @changeValue="getTotals"
          ></EditTable>
          <div>
            <DkForm ref="goodsFootFormData" v-model="goodsFootFormData" :labelMaxWords="5" name="dk-form"
                    class="form-content-class">
              <!--合计数量-->
              <DkFormItem prop="sumQuantity">
                <InputNumberPop ref="sumQuantity" v-model="goodsFootFormData.sumQuantity" :clearable="false"
                                :digits="2" :readonly="true"/>
              </DkFormItem>
              <!--货物金额-->
              <DkFormItem prop="sumAmount">
                <InputNumberPop ref="sumAmount" v-model="goodsFootFormData.sumAmount" :clearable="false"
                                :digits="2" :readonly="true"/>
              </DkFormItem>
              <!--标价总额-->
              <DkFormItem prop="sumStandard">
                <InputNumberPop ref="sumStandard" v-model="goodsFootFormData.sumStandard" :digits="2"
                                :readonly="true"/>
              </DkFormItem>
              <!--销售折扣-->
              <DkFormItem prop="saleDiscount">
                <InputNumberPop ref="saleDiscount" v-model="goodsFootFormData.saleDiscount" :digits="2"
                                :readonly="true" unit="%"/>
              </DkFormItem>
            </DkForm>
          </div>
        </div>
      </DkPanel>
      <!--客户收款-->
      <DkPanel prop="customerAccount">
        <DkForm slot="content" ref="receiptFormData" v-model="receiptFormData" name="dk-form"
                class="form-content-class">
          <!--客户收款-->
          <DkFormItem prop="receiptAmt">
            <ModalReceipt :data="receiptList" :total-amount="receiptFormData.receiptAmt"
                          :usable-prestore="this.receiptFormData.usablePrestore"
                          :height="tableHeight - 25"
                          :annex-paths="this.receiptFormData.annexPaths"
                          :remarks="this.receiptFormData.remarks"
                          ref="amtHandle"
                          :readonly="checkColumnIsEdit('amtHandle')"
                          @on-choose="chooseReceipt"></ModalReceipt>
          </DkFormItem>
        </DkForm>
      </DkPanel>
      <!--附件-->
      <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>
    <!--      下部分按钮区域-->
    <DkSaveButton ref="saveButton" :loading="loading" @save="save(true)" @close="close"/>
  </div>
</template>

<script>
import {formMixin} from '@/mixins/form'

export default {
  components: {},
  mixins: [formMixin],
  data() {
    let self = this
    return {
      //新增省市区
      addressArea: [],
      setCustomerFlag: false,  // 是否是选择客户设置以及编辑时设置
      loading: false,
      //控制客户是否可以输入
      readonlyFlag: true,
      allCanNoEdit: false, //是否所有的都不允许编辑
      customerPhoneReadOnly: false,//电话是否可以只读
      // 画面表单数据
      formData: {
        cpId: self.$store.state.user.cpId,
        orderId: null, //订单Id
        orderNo: null,
        orderStatus: this.$config.orderStatus.done,//订单状态
        cusId: null,//客户Id
        cusName: null,
        cusPhone: null,
        contactName: null,
        contactPhone: null,
        customerDistrict: null,         // 客户区域
        addressArea: null,              // 行政区划
        addressGcj02: null,             // 经纬度
        addressName: null,              // 小区
        addressNo: null,                // 门牌号
        addressFull: null,              // 详细地址
        staffId: null,
        staffName: null,
        staffCode: null,
        orgId: null,
        orgName: null,
        orgCode: null,
        salesChannel: null, //销售渠道
        cusFrom: null,//客户来源
        deliveryDate: new Date().addDays(1),//送货时间
        remarks: null,
        orderItemList: [],
        deleteItemList: [],
        receiptFormData: {},
        files: [],
        // 附件
        annexPaths: null,
        outStatus: this.$config.outStatus.daiChuKu,
        makeStaff: self.$store.state.user.id,
      },
      //商品合计信息
      goodsFootFormData: {
        sumQuantity: 0,
        sumAmount: 0,
        sumStandard: 0,
        saleDiscount: 0,
      },
      //客户收款
      receiptFormData: {
        receiptAmt: 0, //应收金额金额
        remarks: null,
        annexPaths: null,
      },
      cityData: [],
      channelList: [],
      cusFromList: [],//客户来源
      addOrderItemColumns: [
        {
          field: 'skuModel',
          controlId: 'skuId',
          type: 'tableSelect',
          width: 200,
          dataType: self.$config.tableSelectType.goods,
          fieldUpdate: self.$updateColumns.orderChooseGoods,
          searchDetailFlag: true
        },
        {
          field: 'skuName',
          controlId: 'skuId',
          type: 'tableSelect',
          width: 200,
          dataType: self.$config.tableSelectType.goods,
          fieldUpdate: self.$updateColumns.orderChooseGoods,
          searchDetailFlag: true
        },
        {
          field: 'priceSale',
          type: 'number',
          digits: 2,
          formula: {
            itemAmt: ['itemQty*priceSale', 'itemQty', 'priceSale'],
            amtStd: ['itemQty*priceStd', 'itemQty', 'priceStd'],
            priceDiscount: ['priceSale/priceStd*100', 'priceSale', 'priceStd'],
          },
        },//价格(子级放在前面，不然replace就不对)
        {
          field: 'itemQty',
          type: 'number',
          digits: 0,
          sum: true,
          formula: {
            itemAmt: ['itemQty*priceSale', 'itemQty', 'priceSale'],
            amtStd: ['itemQty*priceStd', 'itemQty', 'priceStd'],
            priceDiscount: ['priceSale/priceStd*100', 'priceSale', 'priceStd'],
          },
        },//数量
        {
          field: 'itemAmt',
          type: 'number',
          digits: 2,
          number: true,
          sum: true,
          formula: {
            priceSale: ['itemAmt/itemQty', 'itemAmt', 'itemQty'],
            priceDiscount: ['itemAmt/itemQty/priceStd*100', 'itemAmt', 'itemQty', 'priceStd'],
          },
        },//金额
        {
          field: 'priceStd',
          type: 'disabled',
          number: true,
          digits: 2,
        },//商品标价
        {
          field: 'priceDiscount',
          type: 'disabled',
          number: true,
          digits: 2,
        },//标价折扣
        {
          field: 'nonStdCode', type: 'text', equal: true,
        },//非标号
        {
          field: 'remarks', type: 'text', equal: true,
        },
      ],
      editOrderItemColumns: [
        {
          field: 'skuModel',
          controlId: 'skuId',
          type: 'tableSelect',
          width: 200,
          dataType: self.$config.tableSelectType.goods,
          fieldUpdate: self.$updateColumns.orderChooseGoods,
          searchDetailFlag: true
        },
        {
          field: 'skuName',
          controlId: 'skuId',
          type: 'tableSelect',
          width: 300,
          dataType: self.$config.tableSelectType.goods,
          fieldUpdate: self.$updateColumns.orderChooseGoods,
          searchDetailFlag: true
        },
        {
          field: 'priceSale',
          type: 'number',
          digits: 2,
          formula: {
            itemAmt: ['itemQty*priceSale', 'itemQty', 'priceSale'],
            amtStd: ['itemQty*priceStd', 'itemQty', 'priceStd'],
            priceDiscount: ['priceSale/priceStd*100', 'priceSale', 'priceStd'],
          },
        },//价格(子级放在前面，不然replace就不对)
        {
          field: 'itemQty',
          type: 'number',
          digits: 0,
          sum: true,
          formula: {
            itemAmt: ['itemQty*priceSale', 'itemQty', 'priceSale'],
            amtStd: ['itemQty*priceStd', 'itemQty', 'priceStd'],
            priceDiscount: ['priceSale/priceStd*100', 'priceSale', 'priceStd'],
          },
        },//数量
        {
          field: 'itemAmt',
          type: 'number',
          digits: 2,
          number: true,
          sum: true,
          formula: {
            priceSale: ['itemAmt/itemQty', 'itemAmt', 'itemQty'],
            priceDiscount: ['itemAmt/itemQty/priceStd*100', 'itemAmt', 'itemQty', 'priceStd'],
          },
        },//金额
        {
          field: 'priceStd',
          type: 'disabled',
          number: true,
          digits: 2,
        },//商品标价
        {
          field: 'priceDiscount',
          type: 'disabled',
          number: true,
          digits: 2,
        },//标价折扣
        {
          field: 'nonStdCode', type: 'text', equal: true,
        },//非标号
        {
          field: 'outingQty',
          type: 'disabled',
          number: true,
          digits: 0,
        },//出库中数量
        {
          field: 'outQty',
          type: 'disabled',
          number: true,
          digits: 0,
        },//已出库数量
        {
          field: 'returnQty',
          type: 'disabled',
          number: true,
          digits: 0,
        },//退货数量
        {
          field: 'remarks', type: 'text', equal: true,
        },
      ],
      receiptList: [],//定金
    }
  },

  methods: {
    /**
     * @desc   : 加载数据
     * @author : 付斌
     * @date   : 2024-02-20 15:53
     */
    initData() {
      //获取渠道
      this.getChannel()
      //获取数据字典
      this.getDictionaryData()
    },
    /**
     * @desc   : 获取渠道
     * @author : 付斌
     * @date   : 2024-03-02 10:15
     */
    getChannel() {
      let params = {
        cpId: this.$store.state.user.cpId
      }
      this.excute(this.$service.commonService, this.$service.commonService.getChannel, params, false).then(res => {
        if (res.code === this.$config.SUCCESS_CODE) {
          this.channelList = res.data
        }
      })
    },
    /**
     * @desc   : 获取数据字典
     * @author : 付斌
     * @date   : 2024-03-02 11:15
     */
    getDictionaryData() {
      let params = {
        cpId: this.$store.state.user.cpId,
        dictCode: this.$config.dictCode.cusFrom,
      }
      this.excute(this.$service.commonService, this.$service.commonService.getDictionaryData, params, false).then(res => {
        if (res.code === this.$config.SUCCESS_CODE) {
          this.cusFromList = res.data
        }
      })
    },
    /**
     *   @desc   : 获取业务员相关
     *   @date   : 2022/5/28 10:43
     *   @author : 付斌
     */
    orgOk(val) {
      if (val && val.length > 0) {
        this.formData.orgId = val[0].orgId
        this.formData.orgCode = val[0].orgCode
        this.formData.orgName = val[0].orgName
      }
    },
    /**
     *   @desc   : 获取业务员相关
     *   @date   : 2022/5/28 10:43
     *   @author : 付斌
     */
    staffOk(val) {
      if (val && val.length > 0) {
        this.formData.staffId = val[0].staffId
        this.formData.staffCode = val[0].staffCode
        this.formData.staffName = val[0].staffName
      }
    },
    /**
     *   @desc   : 获取客户资料并且监听每一次的客户修改
     *   @date   : 2022/5/24 15:04
     *   @author : 付斌
     */
    selectCustomer(val) {
      if (val && val.length > 0) {
        this.formData.cusId = val[0].cusId
        this.formData.cusPhone = val[0].cusPhone
        this.formData.cusName = val[0].cusName
        this.formData.contactName = val[0].contactName
        this.formData.contactPhone = val[0].contactPhone

        this.formData.orgId = val[0].orgId
        this.formData.orgName = val[0].orgName
        this.formData.staffId = val[0].staffId
        this.formData.staffName = val[0].staffName
        this.formData.salesChannel = val[0].channelId
        this.formData.cusFrom = val[0].cusFrom

        this.formData.addressArea = val[0].addressArea
        this.formData.addressName = val[0].addressName
        this.formData.addressGcj02 = val[0].addressGcj02
        this.formData.addressFull = val[0].addressFull
        this.formData.addressNo = val[0].addressNo

        this.formData.customerDistrict = {
          "addressArea": val[0].addressArea,
          "addressName": val[0].addressName,
          "addressGcj02": val[0].addressGcj02,
          // 门牌号去掉
          "addressFull": val[0].addressFull.replace(val[0].addressNo, ""),
        }

        // var city = JSON.parse(val[0].addressArea.value).city
        // this.cityData.unshift({key: city, value: city})
      }
    },
    /**
     *   @desc   : 选择地址
     *   @date   : 2022/6/9 19:15
     *   @author : 付斌
     */
    chooseAddress(value) {
      this.formData.customerDistrict = value;
      // 说明是清空
      if (!value) {
        this.formData.addressName = null;
        this.formData.addressArea = {};
        this.formData.addressFull = null;
        this.formData.addressGcj02 = {};
      } else {
        //按照title进行
        this.formData.addressName = value.addressName;
        this.formData.addressArea = value.addressArea;
        this.formData.addressGcj02 = value.addressGcj02;
        this.formData.addressFull = value.addressFull + (this.formData.addressNo ? this.formData.addressNo : '');
      }
    },
    /**
     *   @desc   : 拼写详细地址
     *   @date   : 2022/6/9 10:08
     *   @author : 付斌
     */
    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-27 10:36
     */
    clearCutomer() {
      this.setCustomerFlag = true;
      this.formData.customerDistrict = null;
      this.formData.cusId = null
      this.formData.cusCode = null
      this.formData.cusName = null
      this.formData.contactName = null
      this.formData.contactPhone = null
      this.formData.addressArea = {}
      //新增选择省市区也顺带清空了
      this.addressArea = []
      this.formData.addressName = null
      this.formData.addressNo = null

      this.formData.latitude = null
      this.formData.longitude = null
      this.readonlyFlag = true
      this.formData.cusFrom = null;
      // 清空收款
      if (this.$refs['amtHandle']) {
        this.$refs['amtHandle'].clear();
      }
      // 清空客户区域
      if (this.$refs.customerDistrict) {
        this.$refs.customerDistrict.clear();
      }
      this.formData.addressFull = null;
      this.setCustomerFlag = false;
    },
    /**
     * @desc   : 收款金额
     * @author : 付斌
     * @date   : 2022/6/17 9:10
     */
    chooseReceipt(amount, list, remarks, annexPaths) {

    },
    /**
     *   @desc   : 获取商品表格中数量、金额后计算总单信息
     *   @date   : 2022/5/30 15:31
     *   @author : 付斌
     */
    getTotals(field, row, rowIndex) {
      let table = this.$refs['goodsTable'].getTableDataFilter();
      let sumQuantity = 0;  // 合计数量
      let sumAmount = 0;    // 货物金额
      let sumStandard = 0;  // 标价总额
      if (table && table.length > 0) {
        table.forEach(row => {
          if (row["itemQty"]) {
            sumQuantity += parseFloat(row["itemQty"]);
          }
          if (row["itemAmt"]) {
            sumAmount += parseFloat(row["itemAmt"]);
          }
          this.$set(row, 'amtStd', parseFloat(row["itemQty"]) * parseFloat(row["priceStd"]));
          sumStandard += parseFloat(row["amtStd"]);
        })
        this.goodsFootFormData.sumQuantity = sumQuantity;
        this.goodsFootFormData.sumAmount = sumAmount;
        this.goodsFootFormData.sumStandard = sumStandard;
        this.goodsFootFormData.saleDiscount = sumAmount / sumStandard * 100;
      }
    },
    /**
     * @desc   : 通过id查询
     * @author : 付斌
     * @date   : 2022/03/04 13:17
     */
    detail(id) {
      return this.excuteNoParam(this.$service.orderService, this.$service.orderService.getOrderForUpdate, [id]);
    },
    /**
     * @desc   : 编辑页面赋值
     * @author : 付斌
     * @date   : 2024-03-03 9:33
     */
    setValuesByEdit(data) {
      if (data) {
        this.formData = data["order"];
        this.formData.orderItemList = data["orderItem"];

        this.goodsFootFormData.sumQuantity = this.formData.sumQuantity;
        this.goodsFootFormData.sumAmount = this.formData.sumAmount;
        this.goodsFootFormData.sumStandard = this.formData.sumStandard;
        this.goodsFootFormData.saleDiscount = this.formData.saleDiscount;
      }
    },
    /**
     * @desc   : 给参数赋值
     * @author : 付斌
     * @date   : 2023/6/25 14:31
     */
    setParams(arg) {
      if (this.type === this.$config.formMode.add) {
        let orderItemTable = this.$refs['goodsTable'].getTableDataFilter();
        if (!orderItemTable || orderItemTable.length == 0) {
          this.$Message.warning(this.$t('W_012'))
          return;
        }
        this.formData.orderItemList = orderItemTable;
      } else if (this.type === this.$config.formMode.edit) {
        // 删除的表数据
        let deleteItemTable = this.$refs['goodsTable'].getDeleteData();
        this.formData.deleteItemList = deleteItemTable

        // 修改的表数据 和 新增的表数据
        // let changeItemTable = this.$refs['goodsTable'].getTableChangeData();
        let changeItemTable = this.$refs['goodsTable'].getTableDataFilter();
        changeItemTable.forEach((it, index) => {
          this.$set(it, 'itemIndex', index + 1);
        });
        this.formData.orderItemList = changeItemTable
      }
      Object.assign(this.params, this.formData, this.goodsFootFormData)
      this.params.deliveryDate = new Date(this.formData.deliveryDate).toDateStr();
      // console.log('this.params',this.params)
    },
    /**
     * @desc   : 保存数据
     * @author : 付斌
     * @date   : 2023/6/25 14:31
     */
    saveData() {
      if (this.type === this.$config.formMode.add) {
        return this.excute(this.$service.orderService, this.$service.orderService.insertOrder, this.params);
      } else {
        return this.excute(this.$service.orderService, this.$service.orderService.updateOrder, this.params)
      }
    },
    /**
     * @desc   :新建完毕后清空窗体
     * @author : 付斌
     * @date   : 2024-02-27 10:33
     */
    clearForm() {
      let self = this
      this.setCustomerFlag = true;
      this.formData = {
        cpId: null,//公司ID
        orderId: null, //订单Id
        orderNo: null,
        orderStatus: null,//订单状态
        cusId: null,//客户Id
        cusName: null,
        cusPhone: null,
        contactName: null,
        contactPhone: null,
        customerDistrict: null,         // 客户区域
        addressArea: null,              // 行政区划
        addressGcj02: null,             // 经纬度
        addressName: null,              // 小区
        addressNo: null,                // 门牌号
        addressFull: null,              // 详细地址
        staffId: null,
        staffName: null,
        staffCode: null,
        orgId: null,
        orgName: null,
        orgCode: null,
        salesChannel: null, //销售渠道
        cusFrom: null,//客户来源
        deliveryDate: new Date().addDays(1),//送货时间
        remarks: null,
        orderItemList: [],
        receiptFormData: {},
        files: [],
        annexPaths: null,
      }
      // 清空客户区域
      if (this.$refs.customerDistrict) {
        this.$refs.customerDistrict.clear();
      }
      this.setCustomerFlag = false;
    },
    /**
     * @desc   : 判断列是否可以编辑
     * @author : 付斌
     * @date   : 2022/6/21 16:42
     */
    checkColumnIsEdit(field) {

    },
    // /**
    //  * @desc   : 修改客户电话后，清除当前客户信息
    //  * @author : 付斌
    //  * @date   : 2022-08-01 14:39
    //  */
    // customerPhoneChange(e, change) {
    //   // 文本改变时不清空数据
    //   if (!change && this.formData.cusId) {
    //     this.clearCutomer()
    //   }
    // },
  }
  ,
  /**
   * @desc   : 在实例创建完成后被立即同步调用
   * @author : 付斌
   * @date   : 2022/3/3 10:32
   */
  created() {
    this.focusItem = 'orderId';    // 给第一个组件赋值，可以在混入中自动去聚焦
    this.primaryKey = 'orderId'  // 设置主键Id
  }
}
</script>
