Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/api/pages/common/common.js
#	src/locale/lang/zh-CN.js
zhangxiaomu 2 жил өмнө
parent
commit
657f5451b9
57 өөрчлөгдсөн 2817 нэмэгдсэн , 1466 устгасан
  1. 4 0
      src/api/pages/common/common.js
  2. 4 0
      src/api/pages/fin/money-transfer.js
  3. 1 1
      src/api/pages/ivt/out-handle.js
  4. 2 1
      src/api/pages/mst/cus-follow.js
  5. 4 2
      src/api/pages/mst/customer.js
  6. 1 0
      src/api/pages/mst/goods-series.js
  7. 3 2
      src/api/pages/mst/goods.js
  8. 32 0
      src/api/pages/report/detail-report.js
  9. 3 3
      src/components/business/select-magnifier/setting.js
  10. 1 1
      src/components/business/table-select/table-select.vue
  11. 45 0
      src/config/index.js
  12. 18 0
      src/libs/tools/tools.js
  13. 19 0
      src/libs/update-columns/index.js
  14. 47 0
      src/locale/lang/zh-CN.js
  15. 9 0
      src/store/module/user.js
  16. 11 5
      src/view/fin/money-account/index.vue
  17. 7 6
      src/view/fin/money-transfer/add.vue
  18. 7 6
      src/view/fin/money-transfer/edit.vue
  19. 215 5
      src/view/fin/money-transfer/form.vue
  20. 79 118
      src/view/fin/money-transfer/index.vue
  21. 1 1
      src/view/fin/other-payable/form.vue
  22. 1 1
      src/view/fin/other-receivable/form.vue
  23. 15 6
      src/view/fin/payment/form.vue
  24. 3 0
      src/view/fin/payment/index.vue
  25. 15 6
      src/view/fin/receipt/form.vue
  26. 3 0
      src/view/fin/receipt/index.vue
  27. 3 3
      src/view/ivt/entry-handle/form.vue
  28. 8 0
      src/view/ivt/entry-handle/index.vue
  29. 7 3
      src/view/ivt/ivt-check/form.vue
  30. 1 1
      src/view/ivt/ivt-freeze/form.vue
  31. 119 134
      src/view/ivt/out-handle/form.vue
  32. 16 8
      src/view/ivt/out-handle/index.vue
  33. 1 0
      src/view/mst/basic-data/index.vue
  34. 142 176
      src/view/mst/cus-follow/follow.vue
  35. 375 268
      src/view/mst/cus-follow/index.vue
  36. 185 244
      src/view/mst/customer/form.vue
  37. 46 20
      src/view/mst/customer/index.vue
  38. 0 3
      src/view/mst/goods/add.vue
  39. 1 4
      src/view/mst/goods/edit.vue
  40. 213 173
      src/view/mst/goods/form.vue
  41. 109 88
      src/view/mst/goods/index.vue
  42. 1 1
      src/view/mst/org/index.vue
  43. 16 0
      src/view/mst/role/index.vue
  44. 0 10
      src/view/mst/staff/index.vue
  45. 13 0
      src/view/pur/pur-enter/form.vue
  46. 12 8
      src/view/pur/pur-enter/index.vue
  47. 2 9
      src/view/pur/pur-return/index.vue
  48. 160 0
      src/view/report/detail-report/index.vue
  49. 468 0
      src/view/report/detail-report/setting.js
  50. 0 3
      src/view/sale/cus-receipt/form.vue
  51. 3 3
      src/view/sale/cus-receipt/index.vue
  52. 46 5
      src/view/sale/order-out/form.vue
  53. 48 11
      src/view/sale/order-out/formTogether.vue
  54. 39 3
      src/view/sale/order-return/form.vue
  55. 39 4
      src/view/sale/order-return/formOther.vue
  56. 193 120
      src/view/sale/order/form.vue
  57. 1 0
      src/view/sale/order/index.vue

+ 4 - 0
src/api/pages/common/common.js

@@ -111,6 +111,10 @@ export default {
     getPurviewType:'get_purview_type',
     //查询标签打印项目
     getLabelPrintItem: 'get_label_print_item',
+    //获取基础数据
+    getInitData:'get_init_data',
+    // 获取组织仓库
+    getOrgWh:'get_org_wh',
   },
 }
 

+ 4 - 0
src/api/pages/fin/money-transfer.js

@@ -6,6 +6,8 @@
 export default {
   moneyTransferService:{
     prefix: '/mdm-server/mac/transfer/',
+    selectMacTransferInfoById: 'select_mac_transfer_info_by_id',
+    getMacTransferForUpdate: 'get_mac_transfer_for_update',
   }
 }
 
@@ -16,6 +18,8 @@ export default {
  */
 export const routeUrl = {
   moneyTransfer:{
+    add: {key: 'add', routeName: 'money-transfer-add'},
+    edit: {key: 'edit', routeName: 'money-transfer-edit'},
     invalid: {key: 'invalid', method: 'invalid'},
   }
 }

+ 1 - 1
src/api/pages/ivt/out-handle.js

@@ -11,7 +11,7 @@ export default {
     //其他出库新建
     outboundInsert: 'outbound_insert',
     //其他出库办理
-    handleInbound:'outbound_handle',
+    handleOutbound:'outbound_handle',
     //其他出库根据总单id查询总单和明细  出库办理用
     selectByUpdate: 'select_by_update',
     //出库撤回

+ 2 - 1
src/api/pages/mst/cus-follow.js

@@ -5,7 +5,8 @@
  */
 export default {
   cusFollowService: {
-    prefix: '/mdm-server/core/customerFollow/',
+    prefix: '/mdm-server/mst/cusFollow/',
+    updateMeasure:'update_measure',
   }
 }
 

+ 4 - 2
src/api/pages/mst/customer.js

@@ -5,7 +5,8 @@
  */
 export default {
   customerService: {
-    prefix: '/mdm-server/core/customer/',
+    prefix: '/mdm-server/mst/customer/',
+    selectByCondNoPage:'select_by_cond_no_page',
   }
 }
 
@@ -16,7 +17,8 @@ export default {
  */
 export const routeUrl = {
   customer: {
-    add: {key: 'add', method: 'add'},
+    add: {key: 'add', routeName: 'customer-add'},
+    edit: {key:'edit',routeName:'customer-edit'},
     followTask: {key: 'followTask', method: 'followTask'},
     //add:{key:'add', url:'/core/customer/add'}
   }

+ 1 - 0
src/api/pages/mst/goods-series.js

@@ -6,6 +6,7 @@
 export default {
   goodsSeriesService:{
     prefix: '/mdm-server/mst/goodsSeries/',
+    getGoodsSeriesList: 'list_by_nopage',
   }
 }
 

+ 3 - 2
src/api/pages/mst/goods.js

@@ -5,6 +5,7 @@
  */
 export default {
   goodsService:{
+    prefix: '/mdm-server/mst/goodsSku/',
   }
 }
 
@@ -15,7 +16,7 @@ export default {
  */
 export const routeUrl = {
   goods:{
-    // add: {key: 'add', routeName: 'goods-add'},
-    // edit: {key: 'edit', routeName: 'add'},
+     add: {key: 'add', routeName: 'goods-add'},
+     edit: {key: 'edit', routeName: 'goods-edit'},
   }
 }

+ 32 - 0
src/api/pages/report/detail-report.js

@@ -0,0 +1,32 @@
+/**
+ * @desc   : 服务
+ * @author : 周兴
+ * @date   : 2022年12月13日14:59:59
+ */
+export default {
+  detailReportService: {
+    // 前缀
+    prefix: '/mdm-server/mst/report/',
+    // 采购明细报表
+    getPurDetailReport:'pur_detail_report',
+    // 库存查询
+    getIvtDetailReport: 'get_ivt_detail_report',
+    // 销售明细报表
+    getOrderDetailReport: 'order_detail_report',
+    // 出库明细报表
+    getOutboundDetailReport: 'outbound_detail_report',
+    // 入库明细报表
+    getInboundDetailReport: 'inbound_detail_report',
+
+  }
+}
+
+/**
+ * @desc   : 路由
+ * @author : 周兴
+ * @date   : 2023/3/4 18:28
+ */
+export const routeUrl = {
+  detailReport: {
+  }
+}

+ 3 - 3
src/components/business/select-magnifier/setting.js

@@ -60,7 +60,7 @@ const data = {
       {itemCode: 'staffName'},
     ],
     // 查询条件一行个数
-    colCount: 4,
+    colCount: 2,
     // 弹窗的宽度
     modalWidth: 600,
     // 列表主键Id
@@ -69,8 +69,8 @@ const data = {
     selectLabel: 'staffName',
     // 列表列
     columns: [
-      {field: 'staffCodeName', width: '200', title: $t('staff')},
-      {field: 'orgName', title: $t('orgId')},
+      {field: 'staffCodeName', title: $t('staff'), width: 'auto'},
+      {field: 'orgName', title: $t('orgId'), width: 'auto'},
     ],
   },
   // 责任员工

+ 1 - 1
src/components/business/table-select/table-select.vue

@@ -1257,7 +1257,7 @@ export default {
             valueFormat: {code: 'skuName'},
           },
         ]
-        this.modalWidth = 550
+        this.modalWidth = 900
         this.colCount = 2
         this.selectKey = 'skuId'
         this.selectLabel = 'skuName'

+ 45 - 0
src/config/index.js

@@ -320,6 +320,10 @@ export default {
     income:'t_mac_other_receivable',
     // 其他支出单
     outlay:'t_mac_other_payable',
+    // 冻结单
+    freezed:'t_psi_freeze',
+    // 商品档案
+    sku:'t_mst_goods_sku',
   },
   /**
    *   @desc   : 在产盘点盘点状态
@@ -677,6 +681,8 @@ export default {
     moneyAccount: 'moneyAccount',
     //数据自动
     dictionaryData: 'dictionaryData',
+    // 商品种类
+    goodsCategory:'goodsCategory',
   },
 
   /**
@@ -689,6 +695,8 @@ export default {
     add: 'add',
     //新建其它
     addTogether: 'addTogether',
+    // 新建其它
+    addOther: 'addOther',
     //编辑
     edit: 'edit',
     //复制
@@ -1017,6 +1025,43 @@ export default {
     {value: 'right', name: '居右'}
   ],
 
+  /**
+   * @desc   : 系统字典dataCode
+   * @author : 洪旭东
+   * @date   : 2022-05-25 19:11
+   */
+  basicDataCode: {
+    // 跟进状态
+    followStatus1: '跟进状态-跟进',
+    followStatus2: '跟进状态-邀约',
+    followStatus3: '跟进状态-约尺',
+    followStatus4: '跟进状态-接待',
+    followStatus5: '跟进状态-报备',
+    followStatus6: '跟进状态-量尺',
+    // 跟进状态-报备
+    // 跟进状态-报价
+    // 跟进状态-成交
+
+    // 跟进类型
+    followType1: '跟进方式-进店',
+    followType2: '跟进方式-上门',
+
+    // 审核状态
+    reviewStatus1: '审-待审',
+
+
+    // 邀约结果
+    inviteResult1: '邀约结果-接受',
+    inviteResult2: '邀约结果-拒绝',
+
+    //客意品类
+    customerIntention1: '客意品类-智能',
+    customerIntention2: '客意品类-定制',
+
+    salesStatus1: '客成状态-潜客',
+    salesStatus2: '客成状态-成交',
+  },
+
 }
 
 

+ 18 - 0
src/libs/tools/tools.js

@@ -15,6 +15,24 @@ Number.prototype.toThousandth = function (digits) {
 }
 
 /**
+ * @desc   : 判断实体是否为空
+ * @author : 周兴
+ * @date   : 2024/4/9 10:25
+ */
+Vue.prototype.isEmpty = function (obj){
+  let flag = true;
+  console.log('d',obj)
+  let keys = Object.keys(obj);
+  for (let key of keys){
+    if(obj[key]){
+      flag = false;
+      break;
+    }
+  }
+  return flag;
+}
+
+/**
  * @desc   : 给列表的行设置行错误信息
  * @author : 周兴
  * @param  : row:行 msg:错误信息

+ 19 - 0
src/libs/update-columns/index.js

@@ -174,4 +174,23 @@ export default {
     {updateField: 'WhId', valueFiled: 'whId'},
   ],
 
+  /**
+   *   @desc   : 其他出库
+   *   @date   : 2024/4/8 14:09
+   *   @author : 寇珊珊
+   */
+  outChooseIvt:[
+    {updateField: 'skuModel', valueFiled: 'skuModel'},
+    {updateField: 'skuName', valueFiled: 'skuName'},
+    {updateField: 'invId', valueFiled: 'invId'},
+    {updateField: 'skuId', valueFiled: 'skuId'},
+    {updateField: 'skuCode', valueFiled: 'skuCode'},
+    {updateField: 'whName', valueFiled: 'whName'},
+    {updateField: 'invQty', valueFiled: 'invQty'},
+    {updateField: 'usableQty', valueFiled: 'usableQty'},
+    {updateField: 'priceInto', valueFiled: 'priceInto'},
+    {updateField: 'brandName', valueFiled: 'brandName'},
+    {updateField: 'skuSpec', valueFiled: 'skuSpec'},
+  ],
+
 }

+ 47 - 0
src/locale/lang/zh-CN.js

@@ -539,6 +539,51 @@ export const columns = {
   amtTrf:'转账金额',
   layoutName:'模板名称',
   docName:'业务单据',
+  outReason:'出库原因',
+  autoOutFlag:'自动办理出库',
+  objOutId:'出库对象',
+  outboundObjectName:'出库对象',
+  outQuantity:'出库数量',
+  outAmount:'出库金额',
+  macTransfer:'资金转账',
+  trfTypeName:'转账类型',
+  series:'商品系列',
+  category:'商品种类',
+  unit:'计量单位',
+  goodsAttribute:'商品属性',
+  baseAttribute:'基础属性',
+  conversionFactor:'单位换算',
+  subUnit:'辅助单位',
+  priceItem:'价格信息',
+  priceWholesale:'批发价',
+  priceLimited:'销售限价',
+  transferPrice:'调整单价',
+  transferAmt:'调整金额',
+  invInto:'存货信息',
+  skuImages:'商品图片',
+  intention: '客户意向',
+  stayTimeLen: '留店时长',
+  followData: '跟进内容',
+  nextFollowTime:'提醒时间',
+  allReceipt:'全部接待',
+  followTask2: '跟进任务',
+  flgAgainMeasure:'是否复尺',
+  measureRemarks:'量尺备注',
+  measureTime: '量尺时间',
+  usedLocation2: '空间名称',
+  allCustomers:'全部客户',
+  potentialCus:'潜在客户',
+  seasCus:'公海客户',
+  dealCus:'成交客户',
+  reportStaff:'报备人',
+  saleStatus:'销售状态',
+  intoingQtySum :'入库中总量',
+  intoingAmtSum:'入库中总金额',
+  intoQtySum:'已入库总量',
+  intoAmtSum:'已入库总金额',
+  returnQtySum:'已入库退货总量',
+  returnAmtSum:'已入库退货总金额',
+  sumShouldHandle:'待核销金额',
 }
 
 /**
@@ -633,6 +678,8 @@ export const messages = {
   W_116: '已出库数据不允许进行出库办理',
   W_117: '出库中数据不允许进行出库撤回',
   W_118: '作废单据不允许进行此操作',
+  W_119: '出库数量不能大于库存量',
+  W_120: '预制类角色不允许进行编辑或停用操作',
   E_001: '系统出现异常,请联系管理员。',
   Q_001: '当前页面的数据有过更改,请确认需要保存吗?',
   Q_002: '确定要进行{param}操作吗?',

+ 9 - 0
src/store/module/user.js

@@ -166,6 +166,12 @@ export default {
     setJoinedCpList(state, joinedCpList){
       state.joinedCpList = joinedCpList
     },
+    setDefaultWhId(state, defaultWhId){
+      state.defaultWhId = defaultWhId
+    },
+    setDefaultWhName(state, defaultWhName){
+      state.defaultWhName = defaultWhName
+    },
   },
   getters: {
     messageUnreadCount: state => state.messageUnreadList.length,
@@ -266,6 +272,9 @@ export default {
       // 记录部门信息
       commit('setOrgId', data.staff.orgId)
       commit('setOrgName', data.staff.orgName)
+      // 默认仓库
+      commit('setDefaultWhId', data.staff.defaultWhId)
+      commit('setDefaultWhName', data.staff.defaultWhName)
       // 角色
       commit('setRoleIds',data.staff.roleIds)
       if(data.settingValue && data.settingValue.setting){

+ 11 - 5
src/view/fin/money-account/index.vue

@@ -96,9 +96,9 @@ export default {
         flgNegative: true,
         remarks: null,
         accDate: new Date(),
+        orgId: self.$store.state.user.orgId,
+        staffId: self.$store.state.user.id,
         makeStaff: self.$store.state.user.id,
-        orgId: this.$store.state.user.orgId,
-        staffId: this.$store.state.user.id,
       },
       //查询
       searchContent: [
@@ -175,10 +175,16 @@ export default {
      */
     saveData() {
       this.params.accDate = new Date(this.params.accDate).toDateStr();
-      if (this.modalParams.button === this.$config.formMode.edit) {
-        return this.excute(this.$service.moneyAccountService, this.$service.moneyAccountService.update, this.params);
-      } else {
+      if (this.modalParams.button === this.$config.formMode.add) {
         return this.excute(this.$service.moneyAccountService, this.$service.moneyAccountService.insert, this.params);
+      } else {
+        let otherData = {
+          orgId: this.$store.state.user.orgId,
+          staffId: this.$store.state.user.id,
+          makeStaff: this.$store.state.user.id
+        }
+        Object.assign(this.params, this.params, otherData)
+        return this.excute(this.$service.moneyAccountService, this.$service.moneyAccountService.update, this.params);
       }
     },
   },

+ 7 - 6
src/view/fin/money-transfer/add.vue

@@ -1,13 +1,14 @@
 <template>
-
+  <CommonForm type="add" ></CommonForm>
 </template>
 
 <script>
+import CommonForm from './form'
+
 export default {
-  name: "add"
+  name: 'money-transfer-add',
+  components:{
+    CommonForm
+  },
 }
 </script>
-
-<style scoped>
-
-</style>

+ 7 - 6
src/view/fin/money-transfer/edit.vue

@@ -1,13 +1,14 @@
 <template>
-
+  <CommonForm type="edit" ></CommonForm>
 </template>
 
 <script>
+import CommonForm from './form'
+
 export default {
-  name: "edit"
+  name: 'money-transfer-add',
+  components:{
+    CommonForm
+  }
 }
 </script>
-
-<style scoped>
-
-</style>

+ 215 - 5
src/view/fin/money-transfer/form.vue

@@ -1,13 +1,223 @@
+<!-- @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" :labelMaxWords="6" style="width:100%">
+          <DkFormItem prop="trfNo">
+            <InputPop v-model="formData.trfNo" :readonly="true"/>
+          </DkFormItem>
+          <DkFormItem prop="orgId" :label="$t('orgId')">
+            <SelectMagnifier v-model="formData.orgId" :display-text="formData.orgName"
+                             :type="this.$config.MagnifierType.org" :multiple="false"/>
+          </DkFormItem>
+          <DkFormItem prop="staffId" :label="$t('staffId')">
+            <SelectMagnifier v-model="formData.staffId" :display-text="formData.staffName"
+                             :type="this.$config.MagnifierType.staff" :multiple="false"/>
+          </DkFormItem>
+          <DkFormItem prop="accDate" :label="$t('trfDate')" :data-type="$config.dataType.date">
+            <DatePickerPop v-model="formData.accDate" :short-cut-flag="true"/>
+          </DkFormItem>
+          <DkFormItem prop="remarks">
+            <InputPop v-model="formData.remarks" textareaFlag/>
+          </DkFormItem>
+        </DkForm>
+      </DkPanel>
+      <!--资金转账-->
+      <DkPanel prop="macTransfer">
+        <div id="search-cond-div-transfer-info" ref="search-cond-div-goods-info" slot="content">
+          <EditTable ref="transferTable" :data="formData.itemList" showFooter
+                     major-field="trfId"
+                     :new-row-flag="true"
+                     :columns="transferColumns"/>
+        </div>
+      </DkPanel>
+      <!--附件-->
+      <DkPanel prop="files">
+        <div id="search-cond-div-files-info" ref="search-cond-div-files-info" slot="content">
+          <DkPicWall v-model="formData.annexPaths" :table="$config.tables.macTransfer"
+                     :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 {
-  name: "form"
+  components: {},
+  mixins: [formMixin],
+  data() {
+    let self = this
+    return {
+      loading: false,
+      macList: [],  // 资金账户
+      formData: {
+        trfNo: null,
+        trfInMac: null,
+        trfOutMac: null,
+        amtTrf: null,
+        remarks: null,
+        annexPaths: null,
+        accDate: new Date(),
+        staffId: self.$store.state.user.id,
+        staffName: self.$store.state.user.staffName,
+        orgId: self.$store.state.user.orgId,
+        orgName: self.$store.state.user.orgName,
+        makeStaff: self.$store.state.user.id,
+      },
+      transferColumns: [
+        {
+          field: 'trfOutMac',
+          type: 'select',
+          options: () => self.macList,
+          labelKey: 'macName',
+          valueKey: 'macId',
+          searchDetailFlag: true,
+        },
+        {
+          field: 'trfInMac',
+          type: 'select',
+          options: () => self.macList,
+          labelKey: 'macName',
+          valueKey: 'macId',
+          searchDetailFlag: true,
+        },
+        //转账金额
+        {
+          field: 'amtTrf',
+          type: 'number',
+          digits: 2,
+          sum: true,
+        },
+        {field: 'remarks', type: 'text', equal: true},
+      ],
+    }
+  },
+  methods: {
+    /**
+     * @desc   : 加载数据
+     * @author : 付斌
+     * @date   : 2024-02-20 15:53
+     */
+    initData() {
+      this.getMacData();
+    },
+    /**
+     * @desc   :获取资金账户
+     * @author : 付斌
+     * @date   : 2024-04-01 14:01
+     */
+    getMacData() {
+      let params = {
+        'dictCode': this.$config.kindCode.basicIncome,
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getMac, params, false).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.macList = res.data
+        }
+      })
+    },
+    /**
+     * @desc   : 通过id查询
+     * @author : 付斌
+     * @date   : 2022/03/04 13:17
+     */
+    detail(id) {
+      return this.excuteNoParam(this.$service.moneyTransferService, this.$service.moneyTransferService.getMacTransferForUpdate, [id]);
+    },
+    /**
+     * @desc   : 编辑页面赋值
+     * @author : 付斌
+     * @date   : 2024-03-03 9:33
+     */
+    setValuesByEdit(data) {
+      if (data) {
+        this.formData = data["data"];
+        this.formData.itemList = data["dataItem"];
+      }
+    },
+    /**
+     * @desc   : 校验数据
+     * @author : 付斌
+     * @date   : 2024-03-11 14:37
+     */
+    validData() {
+      let itemTable = this.$refs['transferTable'].getTableDataFilter();
+      if (!itemTable || itemTable.length == 0) {
+        this.$Message.warning(this.$t('W_012'))
+        return false;
+      }
+      for (let it of itemTable) {
+        if (!it.amtTrf || it.amtTrf === '') {
+          this.$Message.warning(this.$t('W_042', {'param': '转账金额不能'}))
+          return false;
+        }
+      }
+      return true;
+    },
+    /**
+     * @desc   : 给参数赋值
+     * @author : 付斌
+     * @date   : 2023/6/25 14:31
+     */
+    setParams(arg) {
+      this.formData.accDate = new Date(this.formData.accDate).toDateStr();
+      // 修改新增的表数据
+      let itemTable = this.$refs['transferTable'].getTableDataFilter();
+      this.formData.itemList = itemTable
+      this.params = {...this.formData}
+    },
+    /**
+     * @desc   : 保存数据
+     * @author : 付斌
+     * @date   : 2023/6/25 14:31
+     */
+    saveData() {
+      if (this.type === this.$config.formMode.add) {
+        return this.excute(this.$service.moneyTransferService, this.$service.moneyTransferService.insert, this.params);
+      } else if (this.type === this.$config.formMode.edit) {
+        return this.excute(this.$service.moneyTransferService, this.$service.moneyTransferService.update, this.params)
+      }
+    },
+    /**
+     * @desc   :新建完毕后清空窗体
+     * @author : 付斌
+     * @date   : 2024-02-27 10:33
+     */
+    clear() {
+      let self = this
+      this.formData = {
+        trfNo: null,
+        trfInMac: null,
+        trfOutMac: null,
+        amtTrf: null,
+        remarks: null,
+        annexPaths: null,
+        accDate: new Date(),
+        staffId: self.$store.state.user.id,
+        staffName: self.$store.state.user.staffName,
+        orgId: self.$store.state.user.orgId,
+        orgName: self.$store.state.user.orgName,
+        makeStaff: self.$store.state.user.id,
+      }
+    },
+  }
+  ,
+  /**
+   * @desc   : 在实例创建完成后被立即同步调用
+   * @author : 付斌
+   * @date   : 2022/3/3 10:32
+   */
+  created() {
+    this.focusItem = 'trfId';    // 给第一个组件赋值,可以在混入中自动去聚焦
+    this.primaryKey = 'trfId'  // 设置主键Id
+  }
 }
 </script>
-
-<style scoped>
-
-</style>

+ 79 - 118
src/view/fin/money-transfer/index.vue

@@ -21,77 +21,39 @@
                   :searchContent="searchContent"
       ></SearchCond>
     </div>
-    <!-- 表格   -->
-    <DkTable ref="table-select" name="table" :data="tableData" primaryKey="macId"
-             @pageChange="pageSizeChange"
-             :page-total="pageInfo.total"
-             :page-size="pageInfo.pageSize"
-             :page-size-opts="pageSizeOpts"
-             :current-page="pageInfo.currentPage"
-             :choose-flag="false"
-             :height="tableHeight" showFooter>
-      <DkTableColumn field="trfNo"></DkTableColumn>
-      <DkTableColumn field="trfInMacName"></DkTableColumn>
-      <DkTableColumn field="trfOutMacName"></DkTableColumn>
-      <DkTableColumn field="amtTrf" data-type="number" :digits="2" sum></DkTableColumn>
-      <DkTableColumn field="accDate" :title="$t('trfDate')" :dataType="$config.columnType.date"></DkTableColumn>
-      <DkTableColumn field="orgName"/>
-      <DkTableColumn field="staffName"/>
-      <DkTableColumn field="makeStaffName"/>
-      <DkTableColumn field="makeTime" data-type="dateTime"/>
-      <DkTableColumn field="flgValid" type="switch"/>
-      <DkTableColumn field="remarks"></DkTableColumn>
-    </DkTable>
-
-    <!--新建编辑-->
-    <DkModal :loading="loading"
-             v-model="editAddModal"
-             ref="modal_editAdd"
-             @on-visible-change="handleVisibleModal"
-             @modalOk="save"
-             @modalCancel="clear"
-             :saveFlag="true"
-             :title="modalTitle">
-      <DkForm ref="formInline" v-model="formData" :col-count="1" :label-max-words="8">
-        <DkFormItem prop="trfNo">
-          <InputPop v-model="formData.trfNo" :readonly="true"/>
-        </DkFormItem>
-        <DkFormItem prop="trfInMac" :required="true">
-          <SelectPop v-model="formData.trfInMac" ref="trfInMac" :options="macList" :multiple="false"
-                     labelKey="macName" valueKey="macId">
-          </SelectPop>
-        </DkFormItem>
-        <DkFormItem prop="trfOutMac" :required="true">
-          <SelectPop v-model="formData.trfOutMac" ref="trfOutMac" :options="macList" :multiple="false"
-                     labelKey="macName" valueKey="macId">
-          </SelectPop>
-        </DkFormItem>
-        <DkFormItem prop="amtTrf">
-          <InputNumberPop v-model="formData.amtTrf" :digits="2"/>
-        </DkFormItem>
-        <!--转账日期-->
-        <DkFormItem prop="accDate" :label="$t('trfDate')" :data-type="$config.dataType.date">
-          <DatePickerPop v-model="formData.accDate" :short-cut-flag="true"/>
-        </DkFormItem>
-        <!--业务部门-->
-        <DkFormItem prop="orgId" :label="$t('orgId')">
-          <SelectMagnifier v-model="formData.orgId" :display-text="formData.orgName"
-                           :type="this.$config.MagnifierType.org" :multiple="false"/>
-        </DkFormItem>
-        <!--业务员-->
-        <DkFormItem prop="staffId" :label="$t('staffId')">
-          <SelectMagnifier v-model="formData.staffId" :display-text="formData.staffName"
-                           :type="this.$config.MagnifierType.staff" :multiple="false"/>
-        </DkFormItem>
-        <DkFormItem prop="remarks">
-          <InputPop v-model="formData.remarks" textareaFlag/>
-        </DkFormItem>
-        <DkFormItem prop="files">
-          <DkPicWall v-model="formData.annexPaths" :table="$config.tables.macTransfer"
-                     :accept="$config.uploadFileConfig.acceptPicType"></DkPicWall>
-        </DkFormItem>
-      </DkForm>
-    </DkModal>
+    <!--  表格部分  -->
+    <DkSplit mode="vertical" v-model="split" :height="tableHeight">
+      <div slot="top" style="margin-left: 5px;">
+        <DkTable ref="table-select" name="table" :data="tableData" primaryKey="trfId"
+                 @pageChange="pageSizeChange"
+                 :page-total="pageInfo.total"
+                 :page-size="pageInfo.pageSize"
+                 :page-size-opts="pageSizeOpts"
+                 :current-page="pageInfo.currentPage"
+                 :choose-flag="false"
+                 @current-change="currentChange($event)"
+                 :height="this.tableHeight * split - 35" showFooter>
+          <DkTableColumn field="trfNo"></DkTableColumn>
+          <DkTableColumn field="trfTypeName"></DkTableColumn>
+          <DkTableColumn field="accDate" :title="$t('trfDate')" :dataType="$config.columnType.date"></DkTableColumn>
+          <DkTableColumn field="orgName"/>
+          <DkTableColumn field="staffName"/>
+          <DkTableColumn field="makeStaffName"/>
+          <DkTableColumn field="makeTime" data-type="dateTime"/>
+          <DkTableColumn field="flgValid" type="switch"/>
+          <DkTableColumn field="remarks"></DkTableColumn>
+        </DkTable>
+      </div>
+      <div slot="bottom">
+        <DkTable :id="'table-'+$options.name" ref="detail-select" :data="tableDataDetail_macTransferItem" showFooter
+                 :height="this.tableHeight * (1-split)" primaryKey="itemId" name="table">
+          <DkTableColumn field="trfInMacName"></DkTableColumn>
+          <DkTableColumn field="trfOutMacName"></DkTableColumn>
+          <DkTableColumn field="amtTrf" data-type="number" :digits="2" sum></DkTableColumn>
+          <DkTableColumn field="remarks"/>
+        </DkTable>
+      </div>
+    </DkSplit>
   </div>
 </template>
 
@@ -104,23 +66,8 @@ export default {
   data() {
     let self = this
     return {
-      // 资金账户
-      macList: [],
-      formData: {
-        trfNo: null,
-        trfInMac: null,
-        trfOutMac: null,
-        amtTrf: null,
-        remarks: null,
-        annexPaths: null,
-        accDate: new Date(),
-        staffId: self.$store.state.user.id,
-        staffName: self.$store.state.user.staffName,
-        orgId: self.$store.state.user.orgId,
-        orgName: self.$store.state.user.orgName,
-        makeStaff: self.$store.state.user.id,
-      },
-      //查询
+      tableData: [],
+      tableDataDetail_macTransferItem: [],
       searchContent: [
         {
           itemCode: '转账单号-文本',
@@ -209,46 +156,29 @@ export default {
       })
     },
     /**
-     * @desc   :获取资金账户
-     * @author : 付斌
-     * @date   : 2024-04-05 10:26
-     */
-    getMac() {
-      this.excute(this.$service.commonService, this.$service.commonService.getMac, {}).then(res => {
-        if (res.code === this.$config.SUCCESS_CODE) {
-          let list = this.searchContent.filter(it => it.valueFormat.code == 'staffIdList')
-          this.macList = res.data
-        }
-      })
-    },
-    /**
      * @desc   : 查询数据
      * @author : 付斌
      * @date   : 2024-02-20 15:53
      */
     getData(params) {
+      this.tableData = null;
+      this.tableDataDetail_macTransferItem = null;
       return this.excute(this.$service.moneyTransferService, this.$service.moneyTransferService.selectByCond, params)
     },
     /**
-     * @desc   : 根据ID查询数据
-     * @author : 付斌
-     * @date   : 2024/3/1 15:43
-     */
-    detail(id) {
-      return this.excuteNoParam(this.$service.moneyTransferService, this.$service.moneyTransferService.selectById, [id], false)
-    },
-    /**
-     * @desc   : 保存或编辑
+     * @desc   : 行改变事件
      * @author : 付斌
-     * @date   : 2024/3/4 17:12
+     * @date   : 2024-02-28 11:06
      */
-    saveData() {
-      this.params.accDate = new Date(this.params.accDate).toDateStr();
-      if (this.modalParams.button === this.$config.formMode.add) {
-        return this.excute(this.$service.moneyTransferService, this.$service.moneyTransferService.insert, this.params);
-      } else {
-        return this.excute(this.$service.moneyTransferService, this.$service.moneyTransferService.update, this.params);
-      }
+    currentChange({row}) {
+      this.loading = true
+      this.tableDataDetail_macTransferItem = null;
+      this.excuteNoParam(this.$service.moneyTransferService, this.$service.moneyTransferService.selectMacTransferInfoById, [row.trfId], false).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.tableDataDetail_macTransferItem = res.data.macTransferItem;
+        }
+        this.loading = false
+      })
     },
     /**
      * @desc   : 作废
@@ -274,6 +204,37 @@ export default {
       }
     },
     /**
+     * @desc   :校验按钮
+     * @author : 付斌
+     * @date   : 2024-03-09 16:58
+     */
+    openValidData(btnName, rows) {
+      if (btnName === 'edit') {
+        if (rows && rows.length > 0) {
+          if (rows[0].trfType === 0) {
+            this.$Message.warning(this.$t('W_007', {'param': '期初转账不允许编辑'}));
+            return false;
+          }
+          if (!rows[0].flgValid) {
+            this.$Message.warning(this.$t('W_007', {'param': '当前单据已作废'}));
+            return false;
+          }
+        }
+      } else if (btnName === 'invalid') {
+        if (rows && rows.length > 0) {
+          if (rows[0].trfType === 0) {
+            this.$Message.warning(this.$t('W_007', {'param': '期初转账不允许作废'}));
+            return false;
+          }
+          if (!rows[0].flgValid) {
+            this.$Message.warning(this.$t('W_007', {'param': '当前单据已作废'}));
+            return false;
+          }
+        }
+      }
+      return true;
+    },
+    /**
      * @desc   :清空窗体
      * @author : 付斌
      * @date   : 2024-02-27 10:33

+ 1 - 1
src/view/fin/other-payable/form.vue

@@ -182,7 +182,7 @@ export default {
       this.formData.orgName = this.$store.state.user.orgName
     },
     /**
-     * @desc   :
+     * @desc   :获取支出类别
      * @author : 付斌
      * @date   : 2024-04-01 14:01
      */

+ 1 - 1
src/view/fin/other-receivable/form.vue

@@ -186,7 +186,7 @@ export default {
       this.getDictionaryData();
     },
     /**
-     * @desc   :
+     * @desc   :获取收入类别
      * @author : 付斌
      * @date   : 2024-04-01 14:01
      */

+ 15 - 6
src/view/fin/payment/form.vue

@@ -64,6 +64,11 @@
       </BaseIndexButtonGroup>
       <DkForm ref="payableFootFormData" v-model="payableFootFormData" :labelMaxWords="6" name="dk-form"
               class="form-content-class">
+        <!-- 待核销金额 -->
+        <DkFormItem prop="sumShouldHandle">
+          <InputNumberPop ref="sumShouldHandle" v-model="payableFootFormData.sumShouldHandle" :digits="2"
+                          :disabled="true"/>
+        </DkFormItem>
         <!-- 本次核销金额 -->
         <DkFormItem prop="sumAmtPayableHandle">
           <InputNumberPop ref="sumAmtPayableHandle" v-model="payableFootFormData.sumAmtPayableHandle"
@@ -123,7 +128,7 @@
 
     <!-- DkModal应付款单 -->
     <DkModal :loading="loading" v-model="payableModal" ref="modal_payable"
-             @modalOk="payableOk" :title='this.$t("应付款单")' :height="900" :width="1200">
+             @modalOk="payableOk" :title='this.$t("应付款单")' :height="900" :width="1500">
       <BaseIndexButtonGroup ref="BaseIndexButtonGroup2" id="BaseIndexButtonGroup2">
         <template #left>
           <BaseIndexButton ref="search" name="search" @click="getPayableInvoice"></BaseIndexButton>
@@ -162,9 +167,6 @@ export default {
       tableData_payable: null,
       negativeFlag: false,
       showEditTable: true,
-      //控制客户是否可以输入
-      readonlyFlag: true,
-      allCanNoEdit: false, //是否所有的都不允许编辑
       // 画面表单数据
       formData: {
         accDate: new Date(),
@@ -189,6 +191,7 @@ export default {
       },
       // 应付合计信息
       payableFootFormData: {
+        sumShouldHandle: 0,
         sumAmtPayableHandle: 0,
         sumAmtWaiveHandle: 0,
         sumUsePaymentResidue: 0,
@@ -308,6 +311,7 @@ export default {
      */
     delPayableTable() {
       this.getPayableTotals();
+      this.payableFootFormData.sumShouldHandle = this.$refs['payableTable'].tableData?.sum('amtNotHandle')
     },
     /**
      * @desc   : 应付计算合计
@@ -320,9 +324,13 @@ export default {
         this.payableFootFormData.sumAmtPayableHandle = payableTable.sum('amtPayableHandle')
         this.payableFootFormData.sumAmtWaiveHandle = payableTable.sum('amtWaiveHandle')
         this.payableFootFormData2.sumAmtPayableHandle2 = this.payableFootFormData.sumAmtPayableHandle
-        // 设置预收抵扣
-        this.setPaymentResidue();
+      } else {
+        this.payableFootFormData.sumAmtPayableHandle = 0
+        this.payableFootFormData.sumAmtWaiveHandle = 0
+        this.payableFootFormData2.sumAmtPayableHandle2 = 0
       }
+      // 设置预收抵扣
+      this.setPaymentResidue();
     },
     /**
      * @desc   : 打开选择应付单据的Modal
@@ -366,6 +374,7 @@ export default {
       })
       let sumAmtPayableHandle = this.formData.payableList.sum('amtPayableHandle');
       this.payableFootFormData.sumAmtPayableHandle = sumAmtPayableHandle
+      this.payableFootFormData.sumShouldHandle = sumAmtPayableHandle
       this.payableFootFormData2.sumAmtPayableHandle2 = sumAmtPayableHandle
       this.payableModal = false
       // 设置预收抵扣

+ 3 - 0
src/view/fin/payment/index.vue

@@ -44,6 +44,9 @@
           <DkTableColumn field="rpTypeName" :title="$t('paymentTypeName')"/>
           <DkTableColumn field="supName"/>
           <DkTableColumn field="sumAmtPay" :digits="2" dataType="number" sum/>
+          <DkTableColumn field="sumShouldHandle" :digits="2" dataType="number" sum/>
+          <DkTableColumn field="sumUsePaymentResidue":digits="2" dataType="number" sum/>
+          <DkTableColumn field="sumAmtPayableHandle" :digits="2" dataType="number" sum/>
           <DkTableColumn field="accDate" :title="$t('paymentDate')"/>
           <DkTableColumn field="orgName"/>
           <DkTableColumn field="staffName"/>

+ 15 - 6
src/view/fin/receipt/form.vue

@@ -70,6 +70,11 @@
       </BaseIndexButtonGroup>
       <DkForm ref="receivableFootFormData" v-model="receivableFootFormData" :labelMaxWords="6" name="dk-form"
               class="form-content-class">
+        <!-- 待核销金额 -->
+        <DkFormItem prop="sumShouldHandle">
+          <InputNumberPop ref="sumShouldHandle" v-model="receivableFootFormData.sumShouldHandle" :digits="2"
+                          :disabled="true"/>
+        </DkFormItem>
         <!-- 本次核销金额 -->
         <DkFormItem prop="sumAmtReceivableHandle">
           <InputNumberPop ref="sumAmtReceivableHandle" v-model="receivableFootFormData.sumAmtReceivableHandle"
@@ -129,7 +134,7 @@
 
     <!-- DkModal应收款单 -->
     <DkModal :loading="loading" v-model="receivableModal" ref="modal_receivable"
-             @modalOk="receivableOk" :title='this.$t("应收款单")' :height="900" :width="1200">
+             @modalOk="receivableOk" :title='this.$t("应收款单")' :height="900" :width="1500">
       <BaseIndexButtonGroup ref="BaseIndexButtonGroup2" id="BaseIndexButtonGroup2">
         <template #left>
           <BaseIndexButton ref="search" name="search" @click="getReceivableInvoice"></BaseIndexButton>
@@ -168,9 +173,6 @@ export default {
       tableData_receivable: null,
       negativeFlag: false,
       showEditTable: true,
-      //控制客户是否可以输入
-      readonlyFlag: true,
-      allCanNoEdit: false, //是否所有的都不允许编辑
       // 画面表单数据
       formData: {
         accDate: new Date(),
@@ -195,6 +197,7 @@ export default {
       },
       // 应收合计信息
       receivableFootFormData: {
+        sumShouldHandle: 0,
         sumAmtReceivableHandle: 0,
         sumAmtWaiveHandle: 0,
         sumUseReceiptResidue: 0,
@@ -316,6 +319,7 @@ export default {
      */
     delReceivableTable() {
       this.getReceivableTotals();
+      this.receivableFootFormData.sumShouldHandle = this.$refs['receivableTable'].tableData?.sum('amtNotHandle')
     },
     /**
      * @desc   : 应收计算合计
@@ -328,9 +332,13 @@ export default {
         this.receivableFootFormData.sumAmtReceivableHandle = receivableTable.sum('amtReceivableHandle')
         this.receivableFootFormData.sumAmtWaiveHandle = receivableTable.sum('amtWaiveHandle')
         this.receivableFootFormData2.sumAmtReceivableHandle2 = this.receivableFootFormData.sumAmtReceivableHandle
-        // 设置预收抵扣
-        this.setReceiptResidue();
+      } else {
+        this.receivableFootFormData.sumAmtReceivableHandle = 0
+        this.receivableFootFormData.sumAmtWaiveHandle = 0
+        this.receivableFootFormData2.sumAmtReceivableHandle2 = 0
       }
+      // 设置预收抵扣
+      this.setReceiptResidue();
     },
     /**
      * @desc   : 打开选择应收单据的Modal
@@ -374,6 +382,7 @@ export default {
       })
       let sumAmtReceivableHandle = this.formData.receivableList.sum('amtReceivableHandle');
       this.receivableFootFormData.sumAmtReceivableHandle = sumAmtReceivableHandle
+      this.receivableFootFormData.sumShouldHandle = sumAmtReceivableHandle
       this.receivableFootFormData2.sumAmtReceivableHandle2 = sumAmtReceivableHandle
       this.receivableModal = false
       // 设置预收抵扣

+ 3 - 0
src/view/fin/receipt/index.vue

@@ -46,6 +46,9 @@
           <DkTableColumn field="cusPhone"/>
           <DkTableColumn field="addressFull"/>
           <DkTableColumn field="sumAmtRec" :digits="2" dataType="number" sum/>
+          <DkTableColumn field="sumShouldHandle" :digits="2" dataType="number" sum/>
+          <DkTableColumn field="sumUseReceiptResidue" :digits="2" dataType="number" sum/>
+          <DkTableColumn field="sumAmtReceivableHandle" :digits="2" dataType="number" sum/>
           <DkTableColumn field="accDate" :title="$t('receiptDate')"/>
           <DkTableColumn field="orgName"/>
           <DkTableColumn field="staffName"/>

+ 3 - 3
src/view/ivt/entry-handle/form.vue

@@ -273,9 +273,9 @@
         }
       },
       /**
-       * @desc   : 自动入库标识变更
-       * @author : 夏常明
-       * @date   : 2023/9/1 16:34
+       *   @desc   : 自动入库标识变更
+       *   @date   : 2024/4/8 15:32
+       *   @author : 寇珊珊
        */
       changeIntoStatus() {
         if (this.type === this.$config.formMode.add) {

+ 8 - 0
src/view/ivt/entry-handle/index.vue

@@ -84,6 +84,8 @@
           <DkTableColumn field="cusFrom" :title="$t('takeOverAddress')"></DkTableColumn>
           <!--制单人-->
           <DkTableColumn field="makeStaffName" :filter="false"></DkTableColumn>
+          <!-- 有效标识-->
+          <DkTableColumn field="flgValid" type="switch"/>
           <!--入库办理人-->
           <!--          <DkTableColumn field="doneUserName" :title="$t('entryHandleUser')"></DkTableColumn>-->
           <!-- 备注-->
@@ -140,6 +142,8 @@
           <DkTableColumn field="cusFrom" :title="$t('takeOverAddress')"></DkTableColumn>
           <!--制单人-->
           <DkTableColumn field="makeStaffName" :filter="false"></DkTableColumn>
+          <!-- 有效标识-->
+          <DkTableColumn field="flgValid" type="switch"/>
           <!--入库办理人-->
           <!--          <DkTableColumn field="doneUserName" :title="$t('entryHandleUser')"></DkTableColumn>-->
           <!-- 备注-->
@@ -598,6 +602,7 @@
           //作废单据不允许进行此操作
           if(!rows[0].flgValid){
             this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
+            return false;
           }
           //已入库不允许进行入库办理
           if (this.tableModel == 'ingIn') {
@@ -610,6 +615,7 @@
           //作废单据不允许进行此操作
           if(!rows[0].flgValid){
             this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
+            return false;
           }
           //入库中不允许进行入库撤回
           if (this.tableModel == 'waitIn') {
@@ -622,6 +628,7 @@
           //作废单据不允许进行此操作
           if(!rows[0].flgValid){
             this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
+            return false;
           }
         }
         //作废
@@ -629,6 +636,7 @@
           //作废单据不允许进行此操作
           if(!rows[0].flgValid){
             this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
+            return false;
           }
         }
         return true;

+ 7 - 3
src/view/ivt/ivt-check/form.vue

@@ -22,7 +22,6 @@
             <SelectMagnifier v-model="formData.orgId" :display-text="formData.checkOrg"
                              :type="this.$config.MagnifierType.org"
                              @ok="orgOk"
-                             :disabled="checkColumnIsEdit('orgId')"
                              :multiple="false"/>
           </DkFormItem>
           <!--业务员-->
@@ -30,7 +29,6 @@
             <SelectMagnifier v-model="formData.staffId" :display-text="formData.checkStaff"
                              :type="this.$config.MagnifierType.staff"
                              @ok="staffOk"
-                             :disabled="checkColumnIsEdit('staffId')"
                              :multiple="false"/>
           </DkFormItem>
           <!--备注-->
@@ -302,7 +300,13 @@ export default {
      * @date   : 2024/3/21 16:25
      */
     checkColumnIsEdit(field) {
-      return false;
+      if(this.type === this.$config.formMode.edit){
+        return true;
+      }
+      else
+      {
+        return false;
+      }
     },
 
     /**

+ 1 - 1
src/view/ivt/ivt-freeze/form.vue

@@ -254,7 +254,7 @@ export default {
     },
 
     /**
-     * @desc   : desc
+     * @desc   : 获取总冻结量
      * @author : 宋扬
      * @date   : 2024/3/14 16:36
      */

+ 119 - 134
src/view/ivt/out-handle/form.vue

@@ -1,4 +1,4 @@
-<!-- @desc:其它库新建 @auth:常皓宁 @time : 2024/2/19 9:38 -->
+<!-- @desc:其它库新建 @auth:常皓宁 @time : 2024/2/19 9:38 -->
 <template>
   <div class="main-div">
     <!--加载中-->
@@ -8,27 +8,27 @@
       <DkPanel prop="essentialInformation">
         <div id="search-cond-div" ref="search-cond-div" slot="content" class="form-content-class">
           <DkForm slot="content" ref="formInline" v-model="formData" style="width:100%" :label-max-words="6">
-            <!--库单号-->
-            <DkFormItem prop="intoNo">
-              <InputPop ref="intoNo" v-model="formData.intoNo"
+            <!--库单号-->
+            <DkFormItem prop="outNo">
+              <InputPop ref="outNo" v-model="formData.outNo"
                         :readonly="true"/>
             </DkFormItem>
-            <!-- 库对象 -->
-            <DkFormItem prop="objId" >
+            <!-- 库对象 -->
+            <DkFormItem prop="objId"  :label="$t('objOutId')" >
               <SelectMagnifier v-model="formData.objId"
                                ref="objId"
                                primary-key="objId"
-                               :display-text="formData.inboundObjectName"
+                               :display-text="formData.outboundObjectName"
                                :multiple=false
                                :disabled="canEditFlag"
                                @ok="inboundObjectChange"
                                :type="this.$config.MagnifierType.supplierAndCustomer">
               </SelectMagnifier>
             </DkFormItem>
-            <!-- 库原因 -->
-            <DkFormItem prop="intoReason" :required="true" >
-              <SelectPop v-model="formData.intoReason" :multiple="false" :options="inboundReasonList"
-                         ref="intoReason"
+            <!-- 库原因 -->
+            <DkFormItem prop="outReason" :required="true" >
+              <SelectPop v-model="formData.outReason" :multiple="false" :options="inboundReasonList"
+                         ref="outReason"
                          :labelInValue="true"
                          :disabled="canEditFlag"
                          labelKey="dataValue"
@@ -60,8 +60,8 @@
                                ref="orgId"
                                :type="this.$config.MagnifierType.organization"></SelectMagnifier>
             </DkFormItem>
-            <!--自动库标识-->
-            <DkFormItem prop="autoFlag" v-show="showAutoFlag">
+            <!--自动库标识-->
+            <DkFormItem prop="autoOutFlag" v-show="showAutoFlag">
               <template>
                 <i-switch v-model="formData.flgAutoHandle" @on-change="changeIntoStatus"
                           :disabled="type === $config.formMode.handle">
@@ -70,10 +70,10 @@
                 </i-switch>
               </template>
             </DkFormItem>
-            <!--库日期-->
-            <DkFormItem prop="intoDate"  v-show="showIntoDate">
-              <DatePickerPop v-model="formData.intoDate"
-                             :placeholder="$t('inputWords',{'search-name':$t('intoDate')})"
+            <!--库日期-->
+            <DkFormItem prop="outDate"  v-show="showoutDate">
+              <DatePickerPop v-model="formData.outDate"
+                             :placeholder="$t('inputWords',{'search-name':$t('outDate')})"
                              type="date" :short-cut-flag="true" :readonly="true"/>
             </DkFormItem>
             <!--备注-->
@@ -94,7 +94,7 @@
                      controlId="skuId"
                      @on-choose="getTotals"
                      @changeValue="changeValue"
-                     @onBatchChoose="batchChoose"
+                     @cell-click="handleClickTable"
                      :add-flag="this.addFlag"
                      :delete-flag="this.deleteFlag"
           ></EditTable>
@@ -136,20 +136,20 @@
       return {
         //画面模式选项角标
         bottomList: ['1', '2', '3', '5'],
-        //库原因
+        //库原因
         inboundReasonList: [],
-        //是否显示自动办理库标识
+        //是否显示自动办理库标识
         showAutoFlag: true,
-        //库日期是否显示
-        showIntoDate: false,
+        //库日期是否显示
+        showoutDate: false,
         // 画面表单数据
         formData: {
-          intoId: null,//入库单Id
-          objId: null,//库对象id
-          intoNo: null,//入库单号
-          intoDate:null,//入库日期
-          intoReason: null,//入库原因
-          flgAutoHandle: false,//自动库标识
+          outId: null,//出库单Id
+          objId: null,//库对象id
+          outNo: null,//出库单号
+          outDate:null,//出库日期
+          outReason: null,//出库原因
+          flgAutoHandle: false,//自动库标识
           cusId: null,//客户id
           cusName: null,//客户名称
           cusPhone: null,//客户电话
@@ -158,7 +158,6 @@
           makeTime:new Date().format(),//制单日期
           supId: null,//供应商id
           remarks: null,//备注
-          defWhId: null,//部门默认仓库ID
           // 附件
           annexPaths: [],
           staffId:null,
@@ -175,8 +174,8 @@
             controlId: 'skuId',
             type: 'tableSelect',
             width: 200,
-            dataType: self.$config.tableSelectType.goodsForOrder,
-            fieldUpdate: self.$updateColumns.orderChooseGoods,
+            dataType: self.$config.tableSelectType.inventory,
+            fieldUpdate: self.$updateColumns.outChooseIvt,
             searchDetailFlag: true
           },
           // 商品名称
@@ -185,55 +184,68 @@
             controlId: 'skuId',
             type: 'tableSelect',
             width: 200,
-            dataType: self.$config.tableSelectType.goods,
-            fieldUpdate: self.$updateColumns.orderChooseGoods,
+            dataType: self.$config.tableSelectType.inventory,
+            fieldUpdate: self.$updateColumns.outChooseIvt,
             searchDetailFlag: true
           },
-          // 入库数量
+          //库存数量
+          {
+            field: 'invQty',
+            type: 'disabled',
+          },
+          // 出库数量
           {
             field: 'outingQty',
-            title: self.$t('entryQty'),
+            title: self.$t('outQuantity'),
             type: 'number',
             digits: 0,
             sum: true,
             formula: {
-              outingAmt: ['priceOut*outingQty', 'priceOut', 'outingQty'],
+              outingAmt: ['priceInto*outingQty', 'priceInto', 'outingQty'],
             },
           },
-          //库单价
+          //库单价
           {
-            field: 'priceOut',
-            type: 'number',
+            field: 'priceInto',
+            title: self.$t('priceOut'),
+            type: 'disabled',
             digits: 2,
-            flgUserSensitive: true,
             formula: {
-              outingAmt: ['priceOut*outingQty', 'priceOut', 'outingQty'],
+              outingAmt: ['priceInto*outingQty', 'priceInto', 'outingQty'],
             },
           },
-          //库金额
+          //库金额
           {
             field: 'outingAmt',
-            title: self.$t('entryAmt'),
+            title: self.$t('outAmount'),
             type: 'disabled',
             digits: 2,
             sum: true,
             formula: {
-              priceOut: ['outingAmt/outingQty', 'outingAmt', 'outingQty'],
+              priceInto: ['outingAmt/outingQty', 'outingAmt', 'outingQty'],
             },
           },
           //仓库名称
           {
-            field: 'whId',
-            type: 'select',
-            options: () => self.warehouseList,
-            labelKey: 'whName',
-            valueKey: 'whId',
-            dataType: self.$config.tableSelectType.warehouse,
+            field: 'whName',
+            type: 'tableSelect',
+            multiple: false,
+            sortBoolean: false,
+            dataType: self.$config.tableSelectType.inventory,
+            otherSearchParam: () => {
+              return {
+                skuId: self.currentRow?.skuId,
+                nonStdCode: self.currentRow?.nonStdCode,
+              }
+            },
             fieldUpdate: [
-              {updateField: 'whName', valueFiled: 'whName'},
+              {updateField: 'invQty', valueFiled: 'invQty'},
+              {updateField: 'usableQty', valueFiled: 'usableQty'},
+              {updateField: 'invId', valueFiled: 'invId'},
               {updateField: 'whId', valueFiled: 'whId'},
+              {updateField: 'whName', valueFiled: 'whName'},
             ],
-            searchDataFlag: false,
+            searchDetailFlag: true
           },
           {field: 'brandName', type: 'disabled'},//商品品牌
           {field: 'skuSpec', type: 'disabled'}, //规格
@@ -243,10 +255,6 @@
         goodsFootFormData: {
           sumGoodsAmount: 0,
         },
-        //仓库
-        warehouseList: [],
-        whId:null,
-        whName:null,
         //可以编辑标识
         canEditFlag:false,
         addFlag: true ,//商品信息新增
@@ -256,7 +264,7 @@
 
     methods: {
       /**
-       *   @desc   : 库对象改变事件
+       *   @desc   : 库对象改变事件
        *   @date   : 2024/3/13 10:55
        *   @author : 寇珊珊
        */
@@ -273,21 +281,31 @@
         }
       },
       /**
-       * @desc   : 自动入库标识变更
-       * @author : 夏常明
-       * @date   : 2023/9/1 16:34
+       *   @desc   : 自动出库标识变更
+       *   @date   : 2024/4/8 15:31
+       *   @author : 寇珊珊
        */
       changeIntoStatus() {
         if (this.type === this.$config.formMode.add) {
           if (this.formData.flgAutoHandle) {
-            this.formData.intoDate = new Date().format("yyyy-MM-dd")
-            this.showIntoDate = true
+            this.formData.outDate = new Date().format("yyyy-MM-dd")
+            this.showoutDate = true
           }else{
-            this.formData.intoDate = null
-            this.showIntoDate = false
+            this.formData.outDate = null
+            this.showoutDate = false
           }
         }else {
-          this.formData.intoDate = new Date().format("yyyy-MM-dd")
+          this.formData.outDate = new Date().format("yyyy-MM-dd")
+        }
+      },
+      /**
+       *   @desc   : 表格点击事件
+       *   @date   : 2024/4/8 14:35
+       *   @author : 寇珊珊
+       */
+      handleClickTable(e) {
+        if (e) {
+          this.currentRow = e.row
         }
       },
       /**
@@ -326,45 +344,6 @@
         this.goodsFootFormData.sumGoodsAmount = itemAmount;
         this.formData.outingAmt = outingAmt;
         this.formData.outingQty = outingQty;
-        //选择数据带出默认仓库
-        if (!row.whId || row.whId === 0 || row.whId === null) {
-          this.$set(row, 'whId', this.whId);
-          this.$set(row, 'whId_Name', this.whName);
-        }
-      },
-      /**
-       *   @desc   : 批量选择
-       *   @date   : 2024/3/14 10:04
-       *   @author : 寇珊珊
-       */
-      batchChoose(batchRows,rowIndex){
-        console.log("batchRows",batchRows)
-        batchRows.forEach(it=> {
-          if(!it.whId || it.whId === 0 || it.whId === null){
-            this.$set(it,'whId',this.whId);
-            this.$set(it,'whId_Name',this.whName);
-          }
-        })
-      },
-      /**
-       *   @desc   : 查询仓库
-       *   @date   : 2024/3/14 8:45
-       *   @author : 寇珊珊
-       */
-      getWarehouse() {
-        let params = {
-          'cpId': this.$store.state.user.cpId,
-          'flgValid': true
-        }
-        this.excute(this.$service.commonService, this.$service.commonService.getWarehouse, params, false).then(res => {
-          if (res.code === this.$config.SUCCESS_CODE) {
-            this.warehouseList = res.data
-            //赋值默认仓库 组件需要
-            let newList = res.data.filter(it=>it.flgDefault)
-            this.whId = newList[0].whId
-            this.whName = newList[0].whName
-          }
-        })
       },
       /**
        *   @desc   : 获取数据字典
@@ -374,7 +353,7 @@
       getDictionaryData() {
         let params = {
           'cpId': this.$store.state.user.cpId,
-          'dictCode': this.$config.kindCode.basicEnter,
+          'dictCode': this.$config.kindCode.basicOut,
           'flgValid': true
         }
         this.excute(this.$service.commonService, this.$service.commonService.getDictionaryData, params, false).then(res => {
@@ -389,8 +368,6 @@
        *   @author : 寇珊珊
        */
       initData() {
-        //获取仓库
-        this.getWarehouse()
         //获取数据字典
         this.getDictionaryData()
       },
@@ -410,10 +387,15 @@
             this.$message.warning(this.$t('W_041', {'param': this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('outingQty')}))
             return false;
           }
-          if (!itemTable[i].priceOut || itemTable[i].priceOut === '') {
+          if (!itemTable[i].priceInto || itemTable[i].priceInto === '') {
             this.$message.warning(this.$t('W_041', {'param': this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('priceOut')}))
             return false;
           }
+          if (itemTable[i].outingQty > itemTable[i].usableQty) {
+            this.$message.warning(this.$t('sequence') + (i + 1) + this.$t('rowNo') + this.$t('W_119'))
+            // this.$Message.warning(this.$t('W_007', {'param': '本次出库数量不能大于库存量'}))
+            return false;
+          }
         }
         return true;
       },
@@ -430,14 +412,15 @@
           this.formData.outingQty =null
           this.formData.outingAmt = null
         }
-        //库时间
-        if(this.formData.intoDate){
-          this.formData.intoDate  = new Date(this.formData.intoDate).format('yyyy-MM-dd')
+        //库时间
+        if(this.formData.outDate){
+          this.formData.outDate  = new Date(this.formData.outDate).format('yyyy-MM-dd')
         }
         // 修改新增的表数据
         let itemTable = this.$refs['goodsTable'].getTableDataFilter();
-        if(itemTable.filter(it=>it.whId).length==itemTable.length){
-          this.params.whId =itemTable[0].whId
+        //出库价赋值
+        for(let i=0;i<itemTable.length;i++){
+          itemTable[i].priceOut = itemTable[i].priceInto
         }
         this.formData.staffId = this.formData.makeStaff
         this.formData.itemList = itemTable;
@@ -452,15 +435,15 @@
       saveData() {
         //新建
         if (this.type === this.$config.formMode.add) {
-          return this.excute(this.$service.otherInboundService, this.$service.otherInboundService.inboundInsert, this.params)
+          return this.excute(this.$service.otherOutboundService, this.$service.otherOutboundService.outboundInsert, this.params)
         }
-        //库办理
+        //库办理
         else if(this.type === this.$config.formMode.handle) {
-          return this.excute(this.$service.otherInboundService, this.$service.otherInboundService.handleInbound, this.params)
+          return this.excute(this.$service.otherOutboundService, this.$service.otherOutboundService.handleOutbound, this.params)
         }
         //编辑
         else if(this.type === this.$config.formMode.edit){
-          return this.excute(this.$service.otherInboundService, this.$service.otherInboundService.inboundUpdate, this.params)
+          return this.excute(this.$service.otherOutboundService, this.$service.otherOutboundService.outboundUpdate, this.params)
         }
       },
       /**
@@ -470,12 +453,12 @@
        */
       clear() {
         this.formData = {
-          intoId: null,//入库单Id
-          inboundObject: null,//库对象id
-          intoNo: null,//入库单号
-          intoDate: null,//入库日期
-          intoReason: null,//入库原因
-          flgAutoHandle: false,//自动库标识
+          outId: null,//出库单Id
+          inboundObject: null,//库对象id
+          outNo: null,//出库单号
+          outDate: null,//出库日期
+          outReason: null,//出库原因
+          flgAutoHandle: false,//自动库标识
           cusId: null,//客户id
           cusName: null,//客户名称
           cusPhone: null,//客户电话
@@ -484,7 +467,6 @@
           makeTime:new Date().format(),//制单日期
           supId: null,//供应商id
           remarks: null,//备注
-          defWhId: null,//部门默认仓库ID
           // 附件
           annexPaths: [],
           staffId:null,
@@ -498,7 +480,7 @@
        *   @author : 寇珊珊
        */
       detail(id) {
-        return this.excuteNoParam(this.$service.otherInboundService, this.$service.otherInboundService.selectByUpdate, [id]);
+        return this.excuteNoParam(this.$service.otherOutboundService, this.$service.otherOutboundService.selectByUpdate, [id]);
       },
       /**
        *   @desc   : 编辑页面赋值
@@ -510,16 +492,19 @@
         if (data) {
           this.formData = data["data"];
           this.formData.limitEdit= true
-          this.formData.intoDate = new Date().format("yyyy-MM-dd")
-          //库对象赋值
+          this.formData.outDate = new Date().format("yyyy-MM-dd")
+          //库对象赋值
           if(data['data'].supId && data["data"].supId!=null){
             this.formData.objId = data["data"].supId
-            this.formData.inboundObjectName = data["data"].supplierName
+            this.formData.outboundObjectName = data["data"].supplierName
           }else if(data['data'].cusId && data["data"].cusId!=null){
             this.formData.objId = data["data"].cusId
-            this.formData.inboundObjectName = data["data"].cusName
+            this.formData.outboundObjectName = data["data"].cusName
           }
           //明细赋值
+          for(let i=0;i<data["dataItem"].length;i++){
+            data["dataItem"][i].priceInto = data["dataItem"][i].priceOut
+          }
           this.formData.itemList = data["dataItem"];
           this.goodsFootFormData.sumGoodsAmount = this.formData.outingAmt;
           //办理
@@ -546,7 +531,7 @@
             dataItem.map(row => {
               let item = row
               // 不可查询
-              this.$set(item, 'readOnly', ['skuModel','skuName','outingQty','outingAmt','priceOut','whId'])
+              this.$set(item, 'readOnly', ['skuModel','skuName','outingQty','whId'])
               return item
             })
             this.formData.itemList = dataItem;
@@ -555,14 +540,14 @@
       },
     },
     created() {
-      this.focusItem = 'intoId';    // 给第一个组件赋值,可以在混入中自动去聚焦
-      this.primaryKey = 'intoId'  // 设置主键Id
+      this.focusItem = 'outId';    // 给第一个组件赋值,可以在混入中自动去聚焦
+      this.primaryKey = 'outId'  // 设置主键Id
       //设置默认值
       if (this.$route.params.id){
-        // 库办理
+        // 库办理
         if (this.type === this.$config.formMode.handle) {
           this.showAutoFlag = false;
-          this.showIntoDate = true;
+          this.showoutDate = true;
         }
       }
     }

+ 16 - 8
src/view/ivt/out-handle/index.vue

@@ -83,6 +83,8 @@
           <DkTableColumn field="cusFrom" :title="$t('takeOverAddress')"></DkTableColumn>
           <!--制单人-->
           <DkTableColumn field="makeStaffName" :filter="false"></DkTableColumn>
+          <!-- 有效标识-->
+          <DkTableColumn field="flgValid" type="switch"/>
           <!--出库办理人-->
           <!--          <DkTableColumn field="doneUserName" :title="$t('entryHandleUser')"></DkTableColumn>-->
           <!-- 备注-->
@@ -137,6 +139,8 @@
           <DkTableColumn field="cusFrom" :title="$t('takeOverAddress')"></DkTableColumn>
           <!--制单人-->
           <DkTableColumn field="makeStaffName" :filter="false"></DkTableColumn>
+          <!-- 有效标识-->
+          <DkTableColumn field="flgValid" type="switch"/>
           <!--出库办理人-->
           <!--          <DkTableColumn field="doneUserName" :title="$t('entryHandleUser')"></DkTableColumn>-->
           <!-- 备注-->
@@ -496,12 +500,12 @@ export default {
                 let method = null
                 let service = null
                 //其他出库
-                if (row[0].intoType === this.$config.outTypeBySql.other) {
+                if (row[0].outType === this.$config.outTypeBySql.other) {
                   method = 'inboundCancel'
                   service = 'otherOutboundService'
                 }
                 //销售出库
-                else if (row[0].intoType === this.$config.outTypeBySql.order) {
+                else if (row[0].outType === this.$config.outTypeBySql.order) {
                   //todo
                   method = 'purchaseInboundCancel'
                   service = 'orderOutService'
@@ -553,12 +557,12 @@ export default {
                 let method = null
                 let service = null
                 //其他出库
-                if (row[0].intoType === this.$config.outTypeBySql.other) {
+                if (row[0].outType === this.$config.outTypeBySql.other) {
                   method = 'outboundRepeal'
                   service = 'otherOutboundService'
                 }
                 //销售出库
-                else if (row[0].intoType === this.$config.outTypeBySql.order) {
+                else if (row[0].outType === this.$config.outTypeBySql.order) {
                   method = 'purchaseInboundRepeal'
                   service = 'orderOutService'
                 }
@@ -595,6 +599,7 @@ export default {
         //作废单据不允许进行此操作
         if(!rows[0].flgValid){
           this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
+          return false;
         }
         //已出库不允许进行出库办理
         if (this.tableModel == 'ingIn') {
@@ -607,6 +612,7 @@ export default {
         //作废单据不允许进行此操作
         if(!rows[0].flgValid){
           this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
+          return false;
         }
         //出库中不允许进行出库撤回
         if (this.tableModel == 'waitIn') {
@@ -619,6 +625,7 @@ export default {
         //作废单据不允许进行此操作
         if(!rows[0].flgValid){
           this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
+          return false;
         }
       }
       //作废
@@ -626,6 +633,7 @@ export default {
         //作废单据不允许进行此操作
         if(!rows[0].flgValid){
           this.$Message.error(this.$t('W_007', {'param': this.$t('W_118')}))
+          return false;
         }
       }
       return true;
@@ -638,11 +646,11 @@ export default {
     outHandle(row) {
       let name = ''
       //其他出库
-      if (row[0].intoType === this.$config.outTypeBySql.other) {
+      if (row[0].outType === this.$config.outTypeBySql.other) {
         name = 'outHandleOther'
       }
       //销售出库
-      else if (row[0].intoType === this.$config.outTypeBySql.purchaseReturn) {
+      else if (row[0].outType === this.$config.outTypeBySql.purchaseReturn) {
         name = 'outHandleOrder'
       }
       //销售退货出库
@@ -660,11 +668,11 @@ export default {
     edit(row) {
       let name = ''
       //其他出库
-      if (row[0].intoType === this.$config.outTypeBySql.other) {
+      if (row[0].outType === this.$config.outTypeBySql.other) {
         name = 'updateOther'
       }
       //销售出库
-      else if (row[0].intoType === this.$config.outTypeBySql.order) {
+      else if (row[0].outType === this.$config.outTypeBySql.order) {
         name = 'updateOrder'
       }
       //采购退货出库

+ 1 - 0
src/view/mst/basic-data/index.vue

@@ -375,6 +375,7 @@ export default {
       }
       this.excute(this.$service.commonService, this.$service.commonService.getDataKind, params).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
+          console.log('1111111',res.data,res.data.list)
           this.leftData = res.data
           if (this.leftData.size() > 0) {
             this.kindCode = this.leftData[0].kindCode

+ 142 - 176
src/view/mst/cus-follow/follow.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!--    跟进-->
-    <DkModal v-model="visible" :title="$t('follow2')" width="1000px" ref="modal_follow"
+    <DkModal v-model="visible" :title="$t('follow2')" width="1400px" ref="modal_follow"
              :loading="loading"
              @on-cancel="cancelFollow"
              @modalOk="submitFollow"
@@ -13,28 +13,27 @@
           <DkPanel prop="customerInfo">
             <DkForm slot="content" style="width:100%;" v-model="customerInfo" name="dk-form" ref="customerInfo">
               <!--客户名称-->
-              <DkFormItem prop="customerName" :errorMessage="getErrMessage('customerName')" required>
-                <InputPop v-model="customerInfo.customerName"/>
+              <DkFormItem prop="cusName" :required="true">
+                <InputPop v-model="customerInfo.cusName"/>
               </DkFormItem>
               <!--客户电话-->
-              <DkFormItem prop="customerPhone" :errorMessage="getErrMessage('customerPhone')"
+              <DkFormItem prop="cusPhone"
                           :required="!customerInfo.qvExternalUserid">
-                <InputPop :telephone="true" v-model="customerInfo.customerPhone"/>
+                <InputPop :telephone="true" v-model="customerInfo.cusPhone"/>
               </DkFormItem>
               <!--行政区划-->
-              <!--                <DkFormItem prop="customerDistrict" :errorMessage="getErrMessage('customerDistrict')" >-->
-              <!--                  &lt;!&ndash; 高德 &ndash;&gt;-->
-              <!--                  <RegionsChooseAmap v-model="regionData" :options="cityData"-->
-              <!--                                 :default-value="customerInfo.addressName" ref="customerDistrict"-->
-              <!--                                 @on-choose="chooseAddress"></RegionsChooseAmap>-->
-              <!--                </DkFormItem>-->
+              <DkFormItem prop="addressName" required>
+                <RegionsChoose v-model="regionData" :options="cityData" :default-value="customerInfo.addressName"
+                               ref="customerDistrict"
+                               @on-choose="chooseAddress"></RegionsChoose>
+              </DkFormItem>
               <!--门牌号-->
-              <DkFormItem :label="$t('addressNo')" prop="addressNo" :errorMessage="getErrMessage('addressNo')">
+              <DkFormItem :label="$t('addressNo')" prop="addressNo">
                 <InputPop v-model="customerInfo.addressNo" @input="setAddressFull"/>
               </DkFormItem>
               <!--详细地址-->
-              <DkFormItem :label="$t('addressFull2')" prop="addressFull" :errorMessage="getErrMessage('addressFull')">
-                <InputPop v-model="customerInfo.addressFull" readonly/>
+              <DkFormItem prop="addressFull" :required="true">
+                <InputPop ref="addressCustomerFull" :readonly="true" v-model="customerInfo.addressFull" maxlength="50"/>
               </DkFormItem>
             </DkForm>
           </DkPanel>
@@ -43,179 +42,119 @@
             <p slot="title">
               {{ $t('followInfo') }}
             </p>
-            <DkTabs v-model="followTab" :options="[
-            { label: $t('followDaily'), name: '1' },
-            { label: $t('followToStore'), name: '2' },
-            { label: $t('followReserve'), name: '3' }
-          ]">
+            <DkTabs v-model="followTab" :options="tabsOptions">
               <template slot="1">
-                <DkForm ref="formFollow1" style="width:100%;" name="dk-form" v-model="customerInfo1" :rules="rule1"
+                <DkForm ref="formFollow1" style="width:100%;margin-top: 10px;" name="dk-form" v-model="customerInfo1" :rules="rule1"
                         @onValidate="onValidate" :label-max-words="6">
-                  <!--                客户意向-->
-                  <DkFormItem prop="intention" :errorMessage="getErrMessage('intention')" required>
+                  <!--客户意向-->
+                  <DkFormItem prop="intention" :required="true">
                     <SelectPop v-model="customerInfo1.intention" :options="intentionList" :multiple="false"
                                :clearable="false"
-                               label-key="dataName" value-key="dataCode" transfer
+                               label-key="kindName" value-key="kindCode" transfer
                                @on-change="(val)=>cleanCompetitiveBrands(val, '1')"/>
                   </DkFormItem>
-                  <!--                竞品品牌-->
-                  <DkFormItem prop="competitiveBrands" :errorMessage="getErrMessage('competitiveBrands')">
-                    <InputPop v-model="customerInfo1.competitiveBrands" maxlength="100"/>
+                  <!--下次邀约时间(提醒时间)-->
+                  <DkFormItem prop="nextFollowTime" :required="true" :data-type="$config.dataType.date">
+                    <DatePickerPop v-model="customerInfo1.nextFollowTime"
+                                   :placeholder="$t('inputWords',{'search-name':$t('DeliveryDate')})"
+                                   type="datetime" :short-cut-flag="true"/>
                   </DkFormItem>
-                  <!--流失原因-->
-                  <DkFormItem prop="loseReasonIds" :errorMessage="getErrMessage('loseReasonIds')" required>
-                    <SelectPop v-model="customerInfo1.loseReasonIds" :options="loseReasonList" multiple
+                  <!--留店时长-->
+                  <DkFormItem prop="stayTimeLen" :required="true">
+                    <SelectPop v-model="customerInfo1.stayTimeLen" :options="stayTimeLen" :multiple="false"
                                :clearable="false"
-                               label-key="dataValue" value-key="dataId" transfer @on-change="changeInviteResult"/>
+                               label-key="kindName" value-key="kindCode" transfer/>
                   </DkFormItem>
-                  <!--                意向品类-->
-                  <!--                    <DkFormItem prop="intentionInfo" :errorMessage="getErrMessage('intentionInfo')">-->
-                  <!--                          <div>-->
-                  <!--                              <Checkbox v-model="customerInfo1.intentionInfo[index].value" @on-change="selectIntentionInfo(customerInfo1.intentionInfo[index])"-->
-                  <!--                              >{{ item.specsName }}</Checkbox>-->
-                  <!--                              <InputNumberPop v-model="customerInfo1.intentionInfo[index].count" style="width: 100px"/>-->
-                  <!--                          </div>-->
-                  <!--                          <div>-->
-                  <!--                              <Checkbox v-model="customerInfo1.intentionInfo[index].value" :disabled="!customerInfo1.intentionInfo[index].other">-->
-                  <!--                              </Checkbox>-->
-                  <!--                              <Poptip transfer width="500" placement="left">-->
-                  <!--                                <a>{{item.specsName}}</a>-->
-                  <!--                                <div slot="content">-->
-                  <!--                                  <RadioGroup v-model="otherIntentionInfo" @on-change="radioChange('1')">-->
-                  <!--                                      <radio :label="item2.specsId">{{item2.specsName}}</radio>-->
-                  <!--                                  </RadioGroup>-->
-                  <!--                                </div>-->
-                  <!--                              </Poptip>-->
-                  <!--                              <InputNumberPop v-model="customerInfo1.intentionInfo[index].count" style="width: 100px"/>-->
-                  <!--                          </div>-->
-                  <!--                    </DkFormItem>-->
                   <!--跟进内容-->
-                  <DkFormItem prop="followData" :errorMessage="getErrMessage('followData')" required>
+                  <DkFormItem prop="followData" :required="true">
                     <InputPop textarea-flag v-model="customerInfo1.followData" maxlength="100"/>
                   </DkFormItem>
-                  <!--下次跟进计划-->
-                  <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
-                    <InputPop textarea-flag v-model="customerInfo1.nextFollowPlan" maxlength="100"/>
-                  </DkFormItem>
-                  <!--跟进方式-->
-                  <DkFormItem prop="followType" :errorMessage="getErrMessage('followType')" required>
-                    <SelectPop v-model="customerInfo1.followType" :options="followTypeList" :multiple="false"
-                               :clearable="false"
-                               label-key="dataName" value-key="dataCode" transfer/>
-                  </DkFormItem>
-                  <!--下次邀约时间(提醒时间)-->
-                  <DkFormItem prop="nextFollowTime" :errorMessage="getErrMessage('nextFollowTime')">
-                    <DatePickerPop type="datetime" v-model="customerInfo1.nextFollowTime" transfer
-                                   format="yyyy-MM-dd HH:mm:ss"/>
-                  </DkFormItem>
                 </DkForm>
                 <Card class="follow-card">
                   <p slot="title">
                     {{ $t('appendix') }}
                   </p>
-                  <DkPicWall v-model="customerInfo1.annexPaths.annexPaths"
+                  <DkPicWall v-model="customerInfo1.annexPaths"
                              folder="t_csm_follow/annex_paths"></DkPicWall>
                 </Card>
               </template>
               <template slot="2">
-                <DkForm ref="formFollow2" style="width:100%;" name="dk-form" v-model="customerInfo2" :rules="rule2"
+                <DkForm ref="formFollow2" style="width:100%; margin-top: 10px;" name="dk-form" v-model="customerInfo2" :rules="rule2"
                         @onValidate="onValidate" :label-max-words="6">
-                  <!--                客户意向-->
-                  <DkFormItem prop="intention" :errorMessage="getErrMessage('intention')" required>
+                  <!-- 客户意向-->
+                  <DkFormItem prop="intention" :required="true">
                     <SelectPop v-model="customerInfo2.intention" :options="intentionList" :multiple="false"
                                :clearable="false"
-                               label-key="dataName" value-key="dataCode" transfer
+                               label-key="kindName" value-key="kindCode" transfer
                                @on-change="(val)=>cleanCompetitiveBrands(val, '2')"/>
                   </DkFormItem>
-                  <!--                竞品品牌-->
-                  <DkFormItem prop="competitiveBrands" :errorMessage="getErrMessage('competitiveBrands')">
-                    <InputPop v-model="customerInfo2.competitiveBrands" maxlength="100"/>
-                  </DkFormItem>
-                  <!--流失原因-->
-                  <DkFormItem prop="loseReasonIds" :errorMessage="getErrMessage('loseReasonIds')" required>
-                    <SelectPop v-model="customerInfo2.loseReasonIds" :options="loseReasonList" multiple
-                               :clearable="false"
-                               label-key="dataValue" value-key="dataId" transfer @on-change="changeInviteResult"/>
-                  </DkFormItem>
                   <!--邀约结果-->
-                  <DkFormItem prop="inviteResult" :errorMessage="getErrMessage('inviteResult')" required>
+                  <DkFormItem prop="inviteResult" :required="true">
                     <SelectPop v-model="customerInfo2.inviteResult" :options="inviteResultList" :multiple="false"
                                :clearable="false"
-                               label-key="dataName" value-key="dataCode" transfer @on-change="changeInviteResult"/>
+                               label-key="kindName" value-key="kindCode" transfer @on-change="changeInviteResult"/>
                   </DkFormItem>
                   <!--邀约时间-->
-                  <DkFormItem ref="formFollow2_inviteTime" :label="$t('inviteTime2')" prop="inviteTime"
-                              :errorMessage="getErrMessage('inviteTime')"
-                  >
+                  <DkFormItem :label="$t('inviteTime2')" prop="inviteTime"  :data-type="$config.dataType.date">
                     <DatePickerPop type="datetime" v-model="customerInfo2.inviteTime" transfer
-                                   format="yyyy-MM-dd HH:mm:ss"/>
-                  </DkFormItem>
-                  <!--跟进内容-->
-                  <DkFormItem ref="formFollow2_followData" prop="followData"
-                              :errorMessage="getErrMessage('followData')">
-                    <InputPop textarea-flag v-model="customerInfo2.followData" maxlength="100"/>
-                  </DkFormItem>
-                  <!--下次跟进计划-->
-                  <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
-                    <InputPop textarea-flag v-model="customerInfo2.nextFollowPlan" maxlength="100"/>
+                                   :placeholder="$t('inputWords',{'search-name':$t('inviteTime')})"
+                                   :short-cut-flag="true"/>
                   </DkFormItem>
                   <!--下次邀约时间(提醒时间)-->
-                  <DkFormItem :label="$t('nextFollowTime2')" prop="nextFollowTime"
-                              :errorMessage="getErrMessage('nextFollowTime')">
+                  <DkFormItem :label="$t('nextFollowTime2')" prop="nextFollowTime">
                     <DatePickerPop type="datetime" v-model="customerInfo2.nextFollowTime" transfer
                                    format="yyyy-MM-dd HH:mm:ss"/>
                   </DkFormItem>
+                  <!--跟进内容-->
+                  <DkFormItem ref="formFollow2_followData" prop="followData">
+                    <InputPop textarea-flag v-model="customerInfo2.followData" maxlength="100"/>
+                  </DkFormItem>
                 </DkForm>
                 <Card class="follow-card">
                   <p slot="title">
                     {{ $t('appendix') }}
                   </p>
-                  <DkPicWall v-model="customerInfo2.annexPaths.annexPaths"
+                  <DkPicWall v-model="customerInfo2.annexPaths"
                              folder="t_csm_follow/annex_paths"></DkPicWall>
                 </Card>
               </template>
               <template slot="3">
-                <DkForm ref="formFollow3" style="width:100%;" name="dk-form" v-model="customerInfo3" :rules="rule3"
+                <DkForm ref="formFollow3" style="width:100%; margin-top: 10px;" name="dk-form" v-model="customerInfo3" :rules="rule3"
                         @onValidate="onValidate" :label-max-words="6">
                   <!--设计师-->
-                  <DkFormItem prop="designUser" :errorMessage="getErrMessage('designUser')">
-                    <SelectMagnifier v-model="customerInfo3.designUser" searchType="S"
-                                     :other-condition="{jobIds: [-101, -102]}"
-                                     :type="this.$config.MagnifierType.user"></SelectMagnifier>
+                  <DkFormItem prop="designUser" :required="true">
+                    <SelectMagnifier v-model="customerInfo3.designUser"
+                                     :multiple="false"
+                                     :type="this.$config.MagnifierType.staff"
+                                     :display-text="customerInfo3.staffName"/>
                   </DkFormItem>
                   <!--邀约结果-->
-                  <DkFormItem prop="inviteResult" :errorMessage="getErrMessage('inviteResult')" required>
+                  <DkFormItem prop="inviteResult" :required="true">
                     <SelectPop v-model="customerInfo3.inviteResult" :options="inviteResultList" :multiple="false"
                                :clearable="false"
-                               label-key="dataName" value-key="dataCode" transfer/>
+                               label-key="kindName" value-key="kindCode" transfer/>
                   </DkFormItem>
                   <!--邀约时间-->
-                  <DkFormItem :label="$t('inviteTime3')" prop="inviteTime"
-                              :errorMessage="getErrMessage('inviteTime')">
+                  <DkFormItem :label="$t('inviteTime3')" prop="inviteTime">
                     <DatePickerPop type="datetime" v-model="customerInfo3.inviteTime" transfer
                                    format="yyyy-MM-dd HH:mm:ss"
                                    :readonly="!customerInfo3.inviteResult || customerInfo3.inviteResult == $config.basicDataCode.inviteResult2"/>
                   </DkFormItem>
-                  <!--跟进内容-->
-                  <DkFormItem prop="followData" :errorMessage="getErrMessage('followData')">
-                    <InputPop textarea-flag v-model="customerInfo3.followData" maxlength="100"/>
-                  </DkFormItem>
-                  <!--下次跟进计划-->
-                  <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
-                    <InputPop textarea-flag v-model="customerInfo3.nextFollowPlan" maxlength="100"/>
-                  </DkFormItem>
                   <!--下次邀约时间(提醒时间)-->
-                  <DkFormItem :label="$t('nextFollowTime2')" prop="nextFollowTime"
-                              :errorMessage="getErrMessage('nextFollowTime')">
+                  <DkFormItem :label="$t('nextFollowTime2')" prop="nextFollowTime">
                     <DatePickerPop type="datetime" v-model="customerInfo3.nextFollowTime" transfer
                                    format="yyyy-MM-dd HH:mm:ss"/>
                   </DkFormItem>
+                  <!--跟进内容-->
+                  <DkFormItem prop="followData">
+                    <InputPop textarea-flag v-model="customerInfo3.followData" maxlength="100"/>
+                  </DkFormItem>
                 </DkForm>
                 <Card class="follow-card">
                   <p slot="title">
                     {{ $t('appendix') }}
                   </p>
-                  <DkPicWall v-model="customerInfo3.annexPaths.annexPaths"
+                  <DkPicWall v-model="customerInfo3.annexPaths"
                              folder="t_csm_follow/annex_paths"></DkPicWall>
                 </Card>
               </template>
@@ -233,7 +172,7 @@ import {formMixin} from '@/mixins/form'
 export default {
   components: {},
   mixins: [formMixin],
-  name: 'customer-follow',
+  name: 'cus-follow',
   model: {
     prop: 'value',
     event: 'close'
@@ -277,79 +216,50 @@ export default {
     inviteResultList: {
       type: Array
     },
-    followTypeList: {
+    stayTimeLen: {
       type: Array
     }
   },
   data() {
     let self = this
     return {
+      tabsOptions: [
+        { label: self.$t('followDaily'), name: '1' },
+        { label: self.$t('followToStore'), name: '2' },
+        { label: self.$t('followReserve'), name: '3' }
+      ],
       cityData: [],
       customerInfo: self.customerData,
       // 客户信息 日常跟进
       customerInfo1: {
-        followData: null,
-        nextFollowPlan: null,
-        followType: null,
-        nextFollowTime: null,
-        intention: null,
-        competitiveBrands: null,
-        intentionInfo: [],
-        loseReasonIds: [],
-        annexPaths: {
-          annexPaths: []
-        },
+        intention: null,//客户意向
+        followData: null,//跟进内容
+        nextFollowTime: null,//提醒时间
+        stayTimeLen:null,//留店时长
+        annexPaths: null,
       },
       // 客户信息 邀约进店
       customerInfo2: {
-        inviteResult: null,
-        inviteTime: null,
-        followData: null,
-        nextFollowPlan: null,
-        followType: null,
-        nextFollowTime: null,
-        intention: null,
-        competitiveBrands: null,
-        loseReasonIds: [],
-        annexPaths: {
-          annexPaths: []
-        },
+        intention: null,//客户意向
+        inviteResult: null,//邀约结果
+        inviteTime: null,//邀约时间
+        followData: null,//跟进内容
+        nextFollowTime: null,//提醒时间
+        annexPaths: null,
       },
       // 客户信息 预约量尺
       customerInfo3: {
-        designUser: null,
-        inviteResult: null,
-        followData: null,
-        nextFollowPlan: null,
-        followType: null,
-        nextFollowTime: null,
-        annexPaths: {
-          annexPaths: []
-        },
-      },
-      custRules: {
-        customerName: [
-          {required: true, trigger: 'none'},
-        ],
-      },
-      phoneRules: {
-        customerPhone: [
-          {required: true, trigger: 'none'},
-          {
-            required: true,
-            trigger: 'none',
-            max: 11,
-            min: 11,
-            message: self.$t('W_071', {'param': self.$t('customerPhone')})
-          },
-        ],
+        designUser: null,//设计师
+        inviteResult: null,//邀约结果
+        inviteTime: null,//邀约时间
+        followData: null,//跟进内容
+        nextFollowTime: null,//提醒时间
+        annexPaths: null,
       },
       // 错误信息
       errMessage: {},
       // 跟进的tab切换
       followTab: '1',
-      goodsSpecsList: [],
-      loseReasonList: [],
       otherIntentionInfo: null,
       regionData: [],
       // 日常跟进校验
@@ -429,7 +339,7 @@ export default {
       this.visible = false
       this.$refs['formFollow' + this.followTab].$refs['dk-form'].resetFields()
       this.$refs.customerInfo.$refs['dk-form'].resetFields()
-      this['customerInfo' + this.followTab].annexPaths.annexPaths = null
+      this['customerInfo' + this.followTab].annexPaths = null
       // 清空客户区域
       if (this.$refs.customerDistrict) {
         this.$refs.customerDistrict.clear();
@@ -447,7 +357,6 @@ export default {
      */
     changeInviteResult(val) {
       if (val == this.$config.basicDataCode.inviteResult1) {
-        this.customerInfo2.nextFollowPlan = null
         this.customerInfo2.nextFollowTime = null
         this.customerInfo2.followData = ''
         this.$set(this, 'rule2', {
@@ -580,7 +489,64 @@ export default {
      * @date   : 2024-02-01 14:34
      */
     submitFollow() {
+      this.$refs['formFollow' + this.followTab].validate().then(valid => {
+        // 校验
+        if (!valid) {
+          return
+        }
+        this.$refs.customerInfo.validate().then(valid2=>{
+          // 校验
+          if (!valid2) {
+            return
+          }
+
+          let param = Object.assign({
+            cusId: this.customerInfo.cusId,
+            followOrg:this.$store.state.user.orgId,
+            followStatus: this.$config.basicDataCode['followStatus' + this.followTab],
+          }, this['customerInfo' + this.followTab])
+
+          param = Object.assign(param, {
+            cusName: this.customerInfo.cusName,
+            cusPhone:this.customerInfo.cusPhone,
+            addressFull: this.customerInfo.addressFull,
+            addressNo: this.customerInfo.addressNo,
+            addressArea: this.customerInfo.addressArea,
+            addressGcj02: this.customerInfo.addressGcj02,
+            addressName: this.customerInfo.addressName,
+          })
 
+          // 下次邀约时间
+          if (param.nextFollowTime && param.nextFollowTime instanceof Date) {
+            param.nextFollowTime = param.nextFollowTime.format()
+          }
+          // 邀约时间
+          if (param.inviteTime) {
+            param.inviteTime = param.inviteTime.format()
+          }
+
+          /* 沈博 2022年10月12日10:20:57 */
+          let requestBody = {...param}
+
+          //附件
+          if (requestBody.annexPaths) {
+            requestBody.annexPaths = requestBody.annexPaths.map(m => m.path)
+          }
+          this.loading = true
+          //保存
+          this.excute(this.$service.cusFollowService, this.$service.cusFollowService.insert, param).then(res => {
+            this.loading = false
+            if (res.code === this.$config.SUCCESS_CODE) {
+              this.$Message.success(res.message)
+              //关闭跟进弹窗
+              this.cancelFollow()
+            } else {
+              this.$Message.error(res.message)
+            }
+          })
+
+        })
+      })
     },
     /**
      * @desc   : 上传文件
@@ -603,7 +569,7 @@ export default {
       // console.log('ttt',this.customerInfo)
       // 设置地址(不包括门牌号)
       this.customerInfo.customerDistrict = {}
-      this.customerInfo.customerDistrict.addressFull = this.customerInfo.addressFull.replace(this.customerInfo.addressNo, '')
+      this.customerInfo.addressFull = this.customerInfo.addressFull.replace(this.customerInfo.addressNo, '')
     }
     //设置意向
     this.setGoodsSpecs()

+ 375 - 268
src/view/mst/cus-follow/index.vue

@@ -24,15 +24,17 @@
     <card style="padding: 0">
       <DkTabs ref="tab" v-model="tabsModel" :options="tabsOptions" @on-click="clickTab"></DkTabs>
       <DkTable :id="'table-'+$options.name" ref="table-select" :data="tableData"
-               :height="this.tableHeight-50" :primaryKey="tabsModel===$t('followTask2')?'planId':'followId'"
-               @pageChange="pageSizeChange"
+               :height="this.tableHeight-50"
+               primaryKey="followId"
+               :page-size-opts="pageSizeOpts"
                :page-size="pageInfo.pageSize"
+               :choose-flag="false"
                name="table">
-        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="customerCode"
+        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="cusCode"
                        @on-link="openCustomerMessage"></DkTableColumn>
-        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="customerName"
+        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="cusName"
                        @on-link="openCustomerMessage"></DkTableColumn>
-        <DkTableColumn field="customerPhone"></DkTableColumn>
+        <DkTableColumn field="cusPhone"></DkTableColumn>
         <DkTableColumn field="addressFull"></DkTableColumn>
         <DkTableColumn field="contactName"></DkTableColumn>
         <DkTableColumn field="contactPhones"></DkTableColumn>
@@ -85,103 +87,77 @@
         <Radio label="2">{{ $t('receptionNew') }}</Radio>
         <Radio label="1">{{ $t('receptionOld') }}</Radio>
       </RadioGroup>
-      <DkCollapse ref="collapse">
+      <DkCollapse ref="collapse" v-if="receptionType=='1'">
         <DkPanel prop="customerInfo">
-          <DkForm slot="content" ref="formReception" style="width:100%;" :label-max-words="6">
+          <DkForm slot="content" ref="formReception" v-model="customerInfo4" style="width:100%;">
             <!--客户名称-->
-            <DkFormItem prop="customerName" :errorMessage="getErrMessage('customerName')" required>
-              <InputPop v-model="customerInfo4.customerName"/>
+            <DkFormItem prop="cusName" :required="true">
+              <InputPop v-model="customerInfo4.cusName"/>
             </DkFormItem>
             <!--客户电话-->
-            <DkFormItem prop="customerPhone" :errorMessage="getErrMessage('customerPhone')" required>
-              <InputPop :telephone="true" v-model="customerInfo4.customerPhone" @on-change="changeTel"/>
+            <DkFormItem prop="cusPhone" :required="true">
+              <InputPop :telephone="true" v-model="customerInfo4.cusPhone" @on-change="changeTel"/>
+            </DkFormItem>
+            <!--客户区域-->
+            <DkFormItem prop="addressName" :required="true">
+              <RegionsChoose v-model="addressArea" :options="cityData" :default-value="customerInfo4.addressName"
+                             ref="customerDistrict"
+                             @on-choose="chooseAddress"></RegionsChoose>
             </DkFormItem>
-            <!--行政区划-->
-            <!--              <DkFormItem prop="customerDistrict" :errorMessage="getErrMessage('customerDistrict')">-->
-            <!--                &lt;!&ndash; 高德 &ndash;&gt;-->
-            <!--                <RegionsChooseAmap v-model="regionData" :options="cityData" ref="RegionsChoose"-->
-            <!--                                   :default-value="customerInfo4.addressName"-->
-            <!--                                   @on-choose="chooseAddress"></RegionsChooseAmap>-->
-            <!--              </DkFormItem>-->
             <!--门牌号-->
-            <DkFormItem :label="$t('addressNo')" prop="addressNo" :errorMessage="getErrMessage('addressNo')">
+            <DkFormItem :label="$t('addressNo')" prop="addressNo">
               <InputPop v-model="customerInfo4.addressNo" @input="setAddressFull"/>
             </DkFormItem>
             <!--详细地址-->
-            <DkFormItem :label="$t('addressFull2')" prop="addressFull" :errorMessage="getErrMessage('addressFull')">
+            <DkFormItem :label="$t('addressFull')" prop="addressFull">
               <InputPop v-model="customerInfo4.addressFull" readonly/>
             </DkFormItem>
           </DkForm>
         </DkPanel>
-        <DkPanel prop="receptionNew">
-          <DkForm slot="content" ref="formReceptionNew" style="width:100%;" :label-max-words="6">
-            <!--                客户意向-->
-            <DkFormItem prop="intention" :errorMessage="getErrMessage('intention')" required>
-              <SelectPop v-model="customerInfo4.intention" :options="intentionList.filter((it)=>it.dataName!=='已流失')"
+        <DkPanel prop="receptionOld" v-if="receptionType=='1'">
+          <DkForm slot="content" ref="formReceptionNew" style="width:100%;">
+            <!-- 客户意向-->
+            <DkFormItem prop="intention" :required="true">
+              <SelectPop v-model="customerInfo4.intention" :options="intentionList"
                          :multiple="false" :clearable="false"
-                         label-key="dataName" value-key="dataCode" transfer
-                         @on-change="(val)=>cleanCompetitiveBrands(val, 'customerInfo4')"/>
-            </DkFormItem>
-            <!--                竞品品牌-->
-            <DkFormItem prop="competitiveBrands" :errorMessage="getErrMessage('competitiveBrands')" required>
-              <InputPop v-model="customerInfo4.competitiveBrands" maxlength="100"/>
-            </DkFormItem>
-            <!--                意向品类-->
-            <DkFormItem prop="intentionInfo" :errorMessage="getErrMessage('intentionInfo')">
-              <DkRow>
-                <Col span="8" v-for="(item, index) of goodsSpecsList" :key="index">
-                  <div v-if="!item.otherFlag">
-                    <Col span="12">
-                      <Checkbox v-model="customerInfo4.intentionInfo[index].value"
-                                @on-change="selectIntentionInfo(customerInfo4.intentionInfo[index])"
-                      >{{ item.specsName }}
-                      </Checkbox>
-                    </Col>
-                    <Col span="12">
-                      <InputNumberPop v-model="customerInfo4.intentionInfo[index].count" style="width: 100px"/>
-                    </Col>
-                  </div>
-                  <div v-else>
-                    <Col span="12">
-                      <Checkbox v-model="customerInfo4.intentionInfo[index].value"
-                                :disabled="!customerInfo4.intentionInfo[index].other">
-                      </Checkbox>
-                      <Poptip transfer width="500" placement="left">
-                        <a>{{ item.specsName }}</a>
-                        <div slot="content">
-                          <RadioGroup v-model="otherIntentionInfo" @on-change="radioChange('4')">
-                            <Col span="6" v-for="(item2, index2) of item.children" :key="index2">
-                              <radio :label="item2.specsId">{{ item2.specsName }}</radio>
-                            </Col>
-                          </RadioGroup>
-                        </div>
-                      </Poptip>
-                    </Col>
-                    <Col span="12">
-                      <InputNumberPop v-model="customerInfo4.intentionInfo[index].count" style="width: 100px"/>
-                    </Col>
-                  </div>
-                </Col>
-              </DkRow>
+                         label-key="kindName" value-key="kindCode" transfer/>
             </DkFormItem>
             <!--留店时长-->
-            <DkFormItem prop="stayTimeLen" :errorMessage="getErrMessage('stayTimeLen')">
+            <DkFormItem prop="stayTimeLen">
               <SelectPop v-model="customerInfo4.stayTimeLen" :options="stayTimeLenList" :multiple="false"
                          :clearable="false"
-                         label-key="dataName" value-key="dataCode" transfer/>
+                         label-key="kindName" value-key="kindCode" transfer/>
             </DkFormItem>
             <!--下次邀约时间(提醒时间)-->
-            <DkFormItem prop="nextFollowTime" :errorMessage="getErrMessage('nextFollowTime')">
+            <DkFormItem prop="nextFollowTime">
               <DatePickerPop type="datetime" v-model="customerInfo4.nextFollowTime" transfer
                              format="yyyy-MM-dd HH:mm:ss"/>
             </DkFormItem>
             <!--跟进内容-->
-            <DkFormItem prop="followData" :errorMessage="getErrMessage('followData')" required>
+            <DkFormItem prop="followData" :required="true">
               <InputPop textarea-flag v-model="customerInfo4.followData" maxlength="100"/>
             </DkFormItem>
-            <!--下次跟进计划-->
-            <DkFormItem prop="nextFollowPlan" :errorMessage="getErrMessage('nextFollowPlan')">
-              <InputPop textarea-flag v-model="customerInfo4.nextFollowPlan" maxlength="100"/>
+          </DkForm>
+        </DkPanel>
+      </DkCollapse>
+      <DkCollapse ref="collapse" v-if="receptionType=='2'">
+        <DkPanel prop="receptionNew">
+          <DkForm slot="content" ref="formReceptionNew" style="width:100%;">
+            <!-- 客户意向-->
+            <DkFormItem prop="intention" :required="true">
+              <SelectPop v-model="customerInfo4.intention" :options="intentionList"
+                         :multiple="false" :clearable="false"
+                         label-key="kindName" value-key="kindCode" transfer/>
+            </DkFormItem>
+            <!--留店时长-->
+            <DkFormItem prop="stayTimeLen">
+              <SelectPop v-model="customerInfo4.stayTimeLen" :options="stayTimeLenList" :multiple="false"
+                         :clearable="false"
+                         label-key="kindName" value-key="kindCode" transfer/>
+            </DkFormItem>
+            <!--跟进内容-->
+            <DkFormItem prop="followData" :required="true">
+              <InputPop v-model="customerInfo4.followData" maxlength="100"/>
             </DkFormItem>
           </DkForm>
         </DkPanel>
@@ -190,7 +166,7 @@
         <p slot="title">
           {{ $t('appendix') }}
         </p>
-        <DkPicWall v-model="customerInfo4.annexPaths.annexPaths" folder="t_csm_follow/annex_paths"></DkPicWall>
+        <DkPicWall v-model="customerInfo4.annexPaths" folder="t_csm_follow/annex_paths"></DkPicWall>
       </Card>
 
 
@@ -204,69 +180,70 @@
         <DkPanel prop="customerInfo">
           <DkForm slot="content" ref="formMeasure" style="width:100%;" name="dk-form" v-model="customerInfo5">
             <!--客户名称-->
-            <DkFormItem prop="customerId" :errorMessage="getErrMessage('customerId')">
-              <span>{{ customerInfo.customerName }}</span>
+            <DkFormItem prop="cusName">
+              <InputPop v-model="customerInfo.cusName" :readonly="true"/>
             </DkFormItem>
             <!--客户电话-->
-            <DkFormItem prop="customerPhone" :errorMessage="getErrMessage('customerPhone')">
-              <span>{{ customerInfo.customerPhone }}</span>
+            <DkFormItem prop="cusPhone">
+              <InputPop v-model="customerInfo.cusPhone" :readonly="true"/>
             </DkFormItem>
             <!--详细地址-->
-            <DkFormItem :label="$t('addressFull2')" prop="addressFull" :errorMessage="getErrMessage('addressFull')">
-              <span>{{ customerInfo.addressFull }}</span>
+            <DkFormItem :label="$t('addressFull')" prop="addressFull">
+              <InputPop v-model="customerInfo.addressFull" :readonly="true"/>
             </DkFormItem>
             <!--门牌号-->
-            <DkFormItem :label="$t('addressNo')" prop="addressNo" :errorMessage="getErrMessage('addressNo')">
-              <span>{{ customerInfo.addressNo }}</span>
+            <DkFormItem :label="$t('addressNo')" prop="addressNo">
+              <InputPop v-model="customerInfo.addressNo" :readonly="true"/>
             </DkFormItem>
             <!--导购员-->
-            <DkFormItem :label="$t('shoppingGuide')" required>
-              {{ $store.state.user.userName }}
+            <DkFormItem :label="$t('staffName')">
+              <InputPop v-model="customerInfo.staffName" :readonly="true"/>
             </DkFormItem>
             <!--是否复尺-->
-            <DkFormItem prop="flgAgainMeasure" :errorMessage="getErrMessage('flgAgainMeasure')" required>
+            <DkFormItem prop="flgAgainMeasure" :required="true">
               <RadioGroup v-model="customerInfo5.flgAgainMeasure">
                 <Radio label="true">{{ $t('yes') }}</Radio>
                 <Radio label="false">{{ $t('no') }}</Radio>
               </RadioGroup>
             </DkFormItem>
             <!--量尺备注-->
-            <DkFormItem prop="measureRemarks" :errorMessage="getErrMessage('measureRemarks')">
+            <DkFormItem prop="measureRemarks">
               <InputPop textarea-flag v-model="customerInfo5.measureRemarks" maxlength="100"/>
             </DkFormItem>
             <!--量尺时间-->
-            <DkFormItem prop="measureTime" :errorMessage="getErrMessage('measureTime')" required>
+            <DkFormItem prop="measureTime" :required="true">
               <DatePickerPop type="datetime" v-model="customerInfo5.measureTime" transfer/>
             </DkFormItem>
           </DkForm>
         </DkPanel>
         <DkPanel prop="appendix">
           <!--  下拉区域  -->
-          <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%" :labelMaxWords="7">
-            <div v-for="(item,index) of customerInfo5.measureAnnex" :key="index">
-              <DkFormItem :label="$t('usedLocation2')" prop="usedLocation"
-                          :errorMessage="getErrMessage('usedLocation')"
-                          required>
-                <InputPop v-model="item.usedLocation" maxlength="100"/>
+          <DkForm slot="content" ref="formInline" v-model="customerInfo5" style="width: 100%" :labelMaxWords="7"
+                  :col-count="1">
+            <div v-for="(item,index) of customerInfo5.measureRoomList" :key="index" style="width: 100%;margin:25px 35px">
+              <DkFormItem :label="$t('usedLocation2')" prop="roomName"  :required="true">
+                <InputPop v-model="item.roomName" maxlength="100"/>
               </DkFormItem>
-              <DkPicWall v-model="item.annexPaths" folder="t_csm_follow/measure_annex"></DkPicWall>
-              <Button @click="removeNewMeasureAnnex(index)" icon="md-close" long type="error"></Button>
+              <div style="display: flex;justify-content: space-between;align-items: center">
+                <DkPicWall v-model="item.measureAnnex"></DkPicWall>
+                <Button @click="removeNewMeasureAnnex(index)" icon="md-close" long type="error" style="width: 30px"></Button>
+              </div>
             </div>
-            <Button @click="addNewMeasureAnnex" icon="md-add" long style="margin-top: 10px"></Button>
+            <Button @click="addNewMeasureAnnex" icon="md-add" long style="margin-top: 10px;margin-left: 20px"></Button>
           </DkForm>
         </DkPanel>
       </DkCollapse>
     </DkModal>
 
     <!--    跟进任务-->
-    <FollowTask v-model="followTaskModal" :customer-names="customerInfo6.customerNames"
+    <FollowTask v-model="followTaskModal" :customer-names="customerInfo6.cusNames"
                 :customer-ids="customerInfo6.customerIds" @ok="initData(1)"/>
 
     <!--    跟进-->
     <Follow v-model="followModal" :goods-specs="goodsSpecsList" :customer-data="customerInfo"
             :goods-specs-list-back-up="goodsSpecsListBackUp" ref="modal_inner_follow"
             :intention-list="intentionList" :invite-result-list="inviteResultList"
-            :follow-type-list="followTypeList"></Follow>
+            :follow-type-list="followTypeList" :stay-time-len="stayTimeLenList"></Follow>
 
     <Modal v-model="filesShow" :title="$t('files')" @on-cancel="currentRow={}">
 
@@ -279,13 +256,13 @@
       </div>
 
       <divider v-if="currentRow && currentRow.annexPaths && currentRow.annexPaths.annexPaths &&
-        currentRow.annexPaths.annexPaths.length>0 && currentRow.measureAnnex"/>
+        currentRow.annexPaths.annexPaths.length>0 && currentRow.measureRoomList"/>
 
-      <div v-if="currentRow.measureAnnex">
-        <span v-if="currentRow.measureAnnex">{{ $t('measureAnnex') }}</span>
-        <div v-for="(item, index) of currentRow.measureAnnex" :key="index">
-          <Tag style="margin-left: 5px">{{ item.usedLocation }}</Tag>
-          <DkPicWall v-model="item.annexPaths" only-show></DkPicWall>
+      <div v-if="currentRow.measureRoomList">
+        <span v-if="currentRow.measureRoomList">{{ $t('measureRoomList') }}</span>
+        <div v-for="(item, index) of currentRow.measureRoomList" :key="index">
+          <Tag style="margin-left: 5px">{{ item.roomName }}</Tag>
+          <DkPicWall v-model="item.measureAnnex" only-show></DkPicWall>
         </div>
       </div>
     </Modal>
@@ -294,19 +271,18 @@
 
 <script>
 import {indexMixin} from '@/mixins'
-import FollowTask from './follow-task'
 import Follow from './follow'
 
 export default {
-  name: 'customer-follow',
+  name: 'cus-follow',
   mixins: [indexMixin],
   components: {
-    FollowTask,
     Follow
   },
   data() {
     let self = this
     return {
+      addressArea: [],
       cityData: [],
       //当前展示行附件
       currentRow: {},
@@ -315,35 +291,36 @@ export default {
       customerReadOnly: false,
       // 客户信息 接待
       customerInfo4: {
-        customerId: null,
-        customerName: '',
-        customerPhone: null,
-        addressFull: null,
-        addressNo: null,
+        cusId: null,
+        cusName: '',
+        cusPhone: null,
         followData: null,
-        nextFollowPlan: null,
         followType: null,
         stayTimeLen: 1,
         nextFollowTime: null,
         intention: null,
         competitiveBrands: null,
         intentionInfo: [],
-        annexPaths: {
-          annexPaths: []
-        },
+        addressArea: null,              // 行政区划
+        addressGcj02: null,             // 经纬度
+        addressName: null,              // 小区
+        addressNo: null,                // 门牌号
+        addressFull: null,              // 详细地址
+        annexPaths: null,
       },
       // 客户信息 量尺回执
       customerInfo5: {
+        cusId:null,
         followId: null,
         flgAgainMeasure: 'false',
         measureRemarks: null,
-        measureTime: new Date(),
-        measureAnnex: [{usedLocation: null, annexPaths: []}],
+        measureTime: new Date().format(),
+        measureRoomList: [{roomName: null, measureAnnex: null,displayNo:null,}],
       },
       // 客户信息 跟进任务
       customerInfo6: {
         customerIds: [],
-        customerNames: [],
+        cusNames: [],
         followUsers: []
       },
       // 错误信息
@@ -371,56 +348,21 @@ export default {
       receptionModal: false,
       // 接待类型 1 留资 2 陌生
       receptionType: '2',
-      regionData: [],
-      // 接待校验
-      rule4: {
-        customerName: [
-          {required: true, trigger: 'none'},
-        ],
-        customerPhone: [
-          {required: true, trigger: 'none'},
-          {
-            required: true,
-            trigger: 'none',
-            max: 11,
-            min: 11,
-            message: self.$t('W_071', {'param': self.$t('customerPhone')})
-          },
-        ],
-        followData: [
-          {required: true, trigger: 'none'},
-        ],
-        intention: [
-          {required: true, trigger: 'none'},
-        ],
-      },
-      // 回执校验
-      rule5: {
-        flgAgainMeasure: [
-          {required: true, trigger: 'none'},
-        ],
-        measureTime: [
-          {required: true, trigger: 'none', type: 'date'},
-        ],
-      },
-      // 客成状态list
-      saleStatusList: [],
       // 留店时长list
       stayTimeLenList: [],
       // 查询条件
       searchCond: {},
-      //TODO 以后会是动态的所以先做个查询的例子
       searchContent: [
         {
-          valueFormat: {code: 'customerCode'},
+          valueFormat: {code: 'cusCode'},
           valueKind: 'STR'
         },
         {
-          valueFormat: {code: 'customerName'},
+          valueFormat: {code: 'cusName'},
           valueKind: 'STR'
         },
         {
-          valueFormat: {code: 'customerPhone'},
+          valueFormat: {code: 'cusPhone'},
           valueKind: 'STR'
         },
         {
@@ -484,6 +426,8 @@ export default {
       tabsOptions: [
         {label: self.$t('allReceipt'), name: self.$t('allReceipt')},
         {label: self.$t('followTask2'), name: self.$t('followTask2')},
+        {label: self.$t('followToStore'), name: self.$t('followToStore')},
+        {label: self.$t('followReserve'), name: self.$t('followReserve')}
       ],
       pageInfo: {
         total: 0,
@@ -499,8 +443,8 @@ export default {
      * @date   : 2024-02-01 14:23
      */
     openCustomerMessage(row) {
-      if (row['customerId']) {
-        this.$router.push('/sale/customer/detail/' + row['customerId'])
+      if (row['cusId']) {
+        this.$router.push('/sale/customer/detail/' + row['cusId'])
       }
     },
     /**
@@ -509,7 +453,7 @@ export default {
      * @date   : 2024-02-01 14:23
      */
     addNewMeasureAnnex() {
-      this.customerInfo5.measureAnnex.push({"usedLocation": null, "annexPaths": null})
+      this.customerInfo5.measureRoomList.push({"roomName": null, "measureAnnex": null, "displayNo": null})
     },
     /**
      * @desc   : 关闭接待弹窗
@@ -518,18 +462,18 @@ export default {
      */
     cancelReception() {
       this.receptionModal = false
-    },
-    /**
-     * @desc   : checkBox修改意向品类
-     * @author : 付斌
-     * @date   : 2024-02-01 14:23
-     */
-    selectIntentionInfo(val) {
-      if (val.value) {
-        val.count = 1
-      } else {
-        val.count = 0
-      }
+      this.customerInfo4.cusId = null
+      this.customerInfo4.cusName = null
+      this.customerInfo4.cusPhone = null
+      this.customerInfo4.addressFull = null
+      this.customerInfo4.addressNo = null
+      this.customerInfo4.addressName = null
+      this.customerInfo4.addressArea = null
+      this.customerInfo4.addressGcj02 = null
+      this.customerInfo4.followData = null
+      this.customerInfo4.intention = null
+      this.customerInfo4.nextFollowTime = null
+      this.customerInfo4.stayTimeLen = null
     },
     /**
      * @desc   : 取消量尺回执
@@ -539,7 +483,7 @@ export default {
     cancelMeasure() {
       this.measureModal = false
       this.$refs['formMeasure'].$refs['dk-form'].resetFields()
-      this.customerInfo5.measureAnnex = [{usedLocation: null, annexPaths: null}]
+      this.customerInfo5.measureRoomList = [{roomName: null, annexPaths: null}]
     },
     /**
      * @desc   : 接待输入电话
@@ -547,7 +491,32 @@ export default {
      * @date   : 2024-02-01 14:23
      */
     changeTel() {
-
+      this.$nextTick(() => {
+        if (this.customerInfo4.cusPhone == null || this.customerInfo4.cusPhone == '') {
+          return
+        }
+        let params = {
+          cusPhone: this.customerInfo4.cusPhone
+        }
+        this.excute(this.$service.customerService, this.$service.customerService.selectByCondNoPage, params).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            if (res.data) {
+              this.customerInfo4.cusId = res.data[0].cusId
+              this.customerInfo4.cusName = res.data[0].cusName
+              this.customerInfo4.cusPhone = res.data[0].cusPhone
+              this.customerInfo4.addressFull = res.data[0].addressFull
+              this.customerInfo4.addressNo = res.data[0].addressNo
+              this.customerInfo4.addressName = res.data[0].addressName
+              this.customerInfo4.addressArea = res.data[0].addressArea
+              this.customerInfo4.addressGcj02 = res.data[0].addressGcj02
+            } else {
+              this.customerInfo4.cusId = null
+            }
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
+      })
     },
     /**
      * @desc   : 选择地址
@@ -555,45 +524,34 @@ export default {
      * @date   : 2024-02-01 14:23
      */
     chooseAddress(value) {
-    },
-    /**
-     * @desc   : 清除竞争品牌
-     * @author : 付斌
-     * @date   : 2024-02-01 14:23
-     */
-    cleanCompetitiveBrands(val, col) {
-
+      this.customerInfo4.customerDistrict = value;
+      // 说明是清空
+      if (!value) {
+        this.customerInfo4.addressName = null;
+        this.customerInfo4.addressArea = {};
+        this.customerInfo4.addressFull = null;
+        this.customerInfo4.addressGcj02 = {};
+      } else {
+        //按照title进行
+        this.customerInfo4.addressName = value.addressName;
+        this.customerInfo4.addressArea = value.addressArea;
+        this.customerInfo4.addressGcj02 = value.addressGcj02;
+        this.customerInfo4.addressFull = value.addressFull + (this.customerInfo4.addressNo ? this.customerInfo4.addressNo : '');
+      }
     },
     /**
      * @desc   : 点击tab
      * @author : 付斌
      * @date   : 2024-02-01 14:24
      */
-    clickTab(val) {
-      if (val == this.$t('followTask2')) {
-        // 仅在跟进任务添加此查询条件
-        this.searchContent.push(
-          {
-            valueFormat: {
-              code: 'finishStatus',
-              data: [
-                {id: 1, name: '完结'},
-                {id: 2, name: '逾期'},
-                {id: 3, name: '未逾期'},
-              ],
-              valueKey: 'id',
-              labelKey: 'name',
-              default: [3]
-            },
-            valueKind: 'M-CHOICE'
-          },
-        )
-        this.$refs.searchCond.setForm()
-      } else {
-        this.searchContent.splice(this.searchContent.length - 1, 1)
-      }
-      this.tabsModel = val
-      this.initData(1)
+    clickTab() {
+      this.$nextTick(() => {
+        //查询条件
+        this.loading = true
+        this.tableData = []
+        this.pageInfo.currentPage = 1
+        this.searchData()
+      })
     },
     /**
      * @desc   : 跟进任务完成
@@ -612,37 +570,22 @@ export default {
 
     },
     /**
-     * @desc   : 查询客户来源
-     * @author : 付斌
-     * @date   : 2024-02-01 14:24
-     */
-    getCustomerFrom() {
-
-    },
-    /**
-     * @desc   : 分页
-     * @author : 付斌
-     * @date   : 2024-02-01 14:24
-     */
-    pageSizeChange(pageInfo) {
-
-    },
-    /**
-     * @desc   : 查询事件
-     * @author : 付斌
-     * @date   : 2024-02-01 14:24
-     */
-    initData(currentPage) {
-
-    },
-    /**
      * @desc   : 打开跟进弹窗
      * @author : 付斌
      * @date   : 2024-02-01 14:24
      */
     follow() {
-      this.followModal = true
-
+      if (this.$refs['table-select'].batchKeys.length == 1) {
+        if (!this.$refs['table-select'].batchRows[0].cusId) {
+          this.$Message.error(this.$t('W_068'))
+          return
+        }
+        this.followModal = true
+        // 查询客户信息
+        this.getCustomerInfo()
+      } else {
+        this.$Message.error(this.$t('W_013'))
+      }
     },
     /**
      * @desc   : 跟进任务
@@ -652,21 +595,37 @@ export default {
     followTask() {
       this.followTaskModal = true
     },
+
     /**
-     * @desc   : 查询数据
-     * @author : 付斌
-     * @date   : 2024-02-01 14:24
+     * @desc   : 查询参数设定
+     * @author : 常皓宁
+     * @date   : 2024/4/7 11:22
      */
-    getData() {
-
+    setSearchParams(params) {
+      params.flgValid = true
+      if (this.tabsModel === this.$t('allReceipt')) {
+        params.followStatus = ''
+      } else if (this.tabsModel === this.$t('followTask2')) {
+        params.followStatus = '跟进状态-跟进'
+      } else if (this.tabsModel === this.$t('followToStore')) {
+        params.followStatus = '跟进状态-邀约'
+      } else if (this.tabsModel === this.$t('followReserve')) {
+        params.followStatus = '跟进状态-约尺'
+      }
+      return params
     },
     /**
-     * @desc   : 校验
+     * @desc   : 查询数据
      * @author : 付斌
-     * @date   : 2024-02-01 14:25
+     * @date   : 2024-02-01 14:24
      */
-    getErrMessage(prop) {
-      return this.errMessage[prop]
+    getData(params) {
+      // 查询数据
+      this.excute(this.$service.cusFollowService, this.$service.cusFollowService.selectByCond, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.tableData = res.data.list
+        }
+      })
     },
     /**
      * @desc   : 量尺回执
@@ -674,30 +633,34 @@ export default {
      * @date   : 2024-02-01 14:25
      */
     measuringStickReceipt() {
-      this.measureModal = true
+      if (this.$refs['table-select'].batchKeys.length == 1 &&
+        this.$refs['table-select'].batchRows[0].followStatus == '跟进状态-约尺') {
+        if (!this.$refs['table-select'].batchRows[0].cusId) {
+          this.$Message.error(this.$t('W_068'))
+          return
+        }
+        this.measureModal = true
+        this.customerInfo5.followId = this.$refs['table-select'].batchRows[0].followId
+        this.customerInfo5.cusId = this.$refs['table-select'].batchRows[0].cusId
+        this.getCustomerInfo()
+      } else {
+        this.$Message.error(this.$t('W_040'))
+      }
     },
-    /**
-     * @desc   : 量尺回执客户选中
-     * @author : 付斌
-     * @date   : 2024-02-01 14:25
-     */
-    measureCusOk(val) {
 
-    },
     /**
-     * @desc   : 意向 其他分类选中事件
-     * @author : 付斌
-     * @date   : 2024-02-01 14:26
+     * @desc   : 查询客户信息
+     * @author : 常皓宁
+     * @date   : 2024/4/8 13:00
      */
-    radioChange(val) {
-      let other = this.goodsSpecsList.filter(f => f.otherFlag)
-      if (other && other.length > 0) {
-        other[0].specsId = this.otherIntentionInfo
-        other[0].specsName = other[0].children.filter(f => f.specsId == this.otherIntentionInfo)[0].specsName
-      }
-      this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].specsId = this.otherIntentionInfo
-      this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].other = true
-      this['customerInfo' + val].intentionInfo[this['customerInfo' + val].intentionInfo.length - 1].value = true
+    getCustomerInfo() {
+      this.excuteNoParam(this.$service.customerService, this.$service.customerService.selectById, [this.$refs['table-select'].batchRows[0].cusId], false).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.customerInfo = res.data
+        } else {
+          this.$Message.error(res.message)
+        }
+      })
     },
     /**
      * @desc   : 打开接待弹窗
@@ -721,7 +684,10 @@ export default {
      * @date   : 2024-02-01 14:26
      */
     setAddressFull(e) {
-
+      // 客户区域有值才会拼接详细地址
+      if (!this.setCustomerFlag && this.customerInfo4.customerDistrict && this.customerInfo4.customerDistrict.addressFull) {
+        this.customerInfo4.addressFull = this.customerInfo4.customerDistrict.addressFull + (this.customerInfo4.addressNo ? this.customerInfo4.addressNo : '')
+      }
     },
     /**
      * @desc   : 展示附件
@@ -737,6 +703,52 @@ export default {
      * @date   : 2024-02-01 14:26
      */
     submitReception() {
+      this.$refs['formReception'].validate().then(valid => {
+        // 校验
+        if (!valid) {
+          return
+        }
+        let param
+        // 1 留资 建客户是报备,旧客户是接待 2 陌生
+        if (this.receptionType == 1) {
+          param = Object.assign({
+            followStatus: (this.customerInfo4.cusId ? '跟进状态-接待' : '跟进状态-报备')
+          }, this.customerInfo4)
+        } else {
+          param = Object.assign({
+            followStatus: '跟进状态-报备'
+          }, {
+            stayTimeLen: this.customerInfo4.stayTimeLen,
+            followData: this.customerInfo4.followData,
+            annexPaths: this.customerInfo4.annexPaths,
+            followType: this.customerInfo4.followType,
+          })
+        }
+
+        // 下次邀约时间
+        if (param.nextFollowTime) {
+          param.nextFollowTime = param.nextFollowTime.format()
+        }
+
+        //附件
+        if (param.annexPaths && param.annexPaths.annexPaths) {
+          param.annexPaths.annexPaths = param.annexPaths.annexPaths.map(m => m.path)
+        }
+        param.followOrg = this.$store.state.user.orgId
+        this.loading = true
+        // 保存
+        this.excute(this.$service.cusFollowService, this.$service.cusFollowService.insert, param).then(res => {
+          this.loading = false
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.$Message.success(res.message)
+            //关闭接待弹窗
+            this.cancelReception()
+            this.initData(1)
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
+      })
 
     },
     /**
@@ -745,7 +757,45 @@ export default {
      * @date   : 2024-02-01 14:26
      */
     submitMeasure() {
+      this.$refs['formMeasure'].validate().then(valid => {
+        // 校验
+        if (!valid) {
+          return
+        }
+        let param = Object.assign({}, this.customerInfo5)
+
+        //量尺附件
+        if (param.measureRoomList) {
+          for (let it of param.measureRoomList) {
+            let i = 1
+            it.displayNo = i
+            i++
+            if (it.measureAnnex) {
+              it.measureAnnex = it.measureAnnex.map(m => {
+                return {
+                  name: m.name,
+                  url: m.path,
+                  type: m.type,
+                  createTime: m.createTime
+                }
+              })
+            }
+          }
+        }
+        this.loading = true
+        //保存
+        this.excute(this.$service.cusFollowService,this.$service.cusFollowService.updateMeasure,param).then(res => {
+          this.loading = false
+          if (res.code === 200) {
+            this.$Message.success(res.message)
+            //关闭接待弹窗
+            this.cancelMeasure()
+          } else {
+            this.$Message.error(res.message)
+          }
+        })
 
+      })
     },
     /**
      * @desc   : 上传文件
@@ -755,10 +805,67 @@ export default {
     uploadFile(response, file, fileList) {
 
     },
+    /**
+     * @desc   : 获取客户意向
+     * @author : 常皓宁
+     * @date   : 2024/4/7 13:30
+     */
+    getIntention() {
+      let params = {
+        dataSourceCode: 'customerIntention'
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.intentionList = res.data
+        }
+      })
+    },
+    /**
+     * @desc   : 获取留店时长
+     * @author : 常皓宁
+     * @date   : 2024/4/7 13:31
+     */
+    getStayTimeLen() {
+      let params = {
+        dataSourceCode: 'storeRetentionTime'
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.stayTimeLenList = res.data
+        }
+      })
+    },
+
+    /**
+     * @desc   : 获取邀约结果
+     * @author : 常皓宁
+     * @date   : 2024/4/7 13:31
+     */
+    getInviteResult() {
+      let params = {
+        dataSourceCode: 'inviteResult'
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.inviteResultList = res.data
+        }
+      })
+    },
+
+    /**
+     * @desc   : 查询事件
+     * @author : 付斌
+     * @date   : 2024-02-01 14:24
+     */
+    initData() {
+      this.getStayTimeLen()
+      this.getIntention()
+      this.getInviteResult()
+    },
   },
   created() {
-    this.primaryKey = 'customerFollowId'  // 设置主键Id
-    this.routeObjName = 'customerFollow'  // 设置路由名称
+    this.primaryKey = 'followId'  // 设置主键Id
+    this.routeObjName = 'cusFollow'  // 设置路由名称
   }
 }
 </script>

+ 185 - 244
src/view/mst/customer/form.vue

@@ -4,35 +4,35 @@
     <DkCollapse @on-change="changeCollapse" ref="collapse">
       <DkPanel prop="essentialInformation">
         <!--  下拉区域  -->
-        <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%" :labelMaxWords="7">
-          <!--客户名称-->
-          <DkFormItem prop="customerName" :required="true">
-            <InputPop v-model="formData.customerName"/>
-          </DkFormItem>
+        <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%">
           <!--客户编码-->
-          <DkFormItem prop="customerCode" :required="true">
-            <InputPop v-model="formData.customerCode"/>
+          <DkFormItem prop="cusCode">
+            <InputPop v-model="formData.cusCode" :readonly="true"/>
+          </DkFormItem>
+          <!--客户名称-->
+          <DkFormItem prop="cusName" :required="true">
+            <InputPop v-model="formData.cusName"/>
           </DkFormItem>
-          <!--客户电话-->
-          <DkFormItem prop="customerPhone" :required="true">
-            <InputPop :telephone="true" v-model="formData.customerPhone" maxlength="11"/>
+
+          <DkFormItem prop="cusPhone" :required="true">
+            <InputPop :telephone="true" v-model="formData.cusPhone" maxlength="11"/>
           </DkFormItem>
           <!--联系人-->
           <DkFormItem prop="contactName">
             <InputPop v-model="formData.contactName"/>
           </DkFormItem>
           <!--联系电话-->
-          <DkFormItem prop="contactPhones">
-            <InputPop :telephone="true" v-model="formData.contactPhones" maxlength="11"/>
+          <DkFormItem prop="contactPhone">
+            <InputPop :telephone="true" v-model="formData.contactPhone" maxlength="11"/>
           </DkFormItem>
           <!--行政区划-->
-          <!--              <Col span="6">-->
-          <!--                <DkFormItem prop="customerDistrict" required>-->
-          <!--                  <RegionsChooseAmap v-model="regionData" :options="cityData" :default-value="formData.addressName"-->
-          <!--                                     ref="customerDistrict" @on-choose="chooseAddress"></RegionsChooseAmap>-->
-
-          <!--                </DkFormItem>-->
-          <!--              </Col>-->
+          <Col span="6">
+            <DkFormItem prop="addressName" required>
+              <RegionsChoose v-model="regionData" :options="cityData" :default-value="formData.addressName"
+                             ref="customerDistrict"
+                             @on-choose="chooseAddress"></RegionsChoose>
+            </DkFormItem>
+          </Col>
           <!--门牌号-->
           <DkFormItem :label="$t('addressNo')" prop="addressNo" required>
             <InputPop v-model="formData.addressNo" @input="setAddressFull"/>
@@ -41,116 +41,49 @@
           <DkFormItem prop="addressFull" :required="true">
             <InputPop ref="addressCustomerFull" :readonly="true" v-model="formData.addressFull"/>
           </DkFormItem>
-          <!--              &lt;!&ndash;小区档案&ndash;&gt;-->
-          <!--                <DkFormItem prop="estateId">-->
-          <!--                  <SelectMagnifier v-model="formData.estateId" :type="this.$config.MagnifierType.estate"-->
-          <!--                                   searchType="S" :display-text="formData.estateName"/>-->
-          <!--                </DkFormItem>-->
-          <!--              &lt;!&ndash;业务员&ndash;&gt;-->
-          <!--                <DkFormItem prop="reportUser" :required="true">-->
-          <!--                  <SelectMagnifier v-model="formData.reportUser" searchType="S" @ok="changeReportUser"-->
-          <!--                                   :type="this.$config.MagnifierType.user" :display-text="formData.reportUserName"/>-->
-          <!--                </DkFormItem>-->
+          <!--业务员-->
+          <DkFormItem prop="staffId" :required="true">
+            <SelectMagnifier v-model="formData.staffId"
+                             :multiple="false"
+                             :type="this.$config.MagnifierType.staff"
+                             :display-text="formData.staffName"/>
+          </DkFormItem>
           <!--部门-->
           <DkFormItem prop="orgId" :required="true">
-            <InputPop v-model="formData.orgName" readonly/>
-          </DkFormItem>
-          <!-- 分销商 -->
-          <DkFormItem prop="fenXiaoShang">
-            <InputPop v-model="formData.fenXiaoShangName" readonly/>
+            <SelectMagnifier v-model="formData.orgId"
+                             :multiple="false"
+                             :type="this.$config.MagnifierType.org"
+                             :display-text="formData.orgName"/>
           </DkFormItem>
           <!-- 渠道 -->
-          <DkFormItem prop="channel">
-            <InputPop v-model="formData.channelName" readonly/>
-          </DkFormItem>
-          <!--客户分类-->
-          <DkFormItem prop="customerClassified">
-            <SelectPop v-model="formData.customerClassified" :options="customerClassifiedList" :multiple="false"
-                       label-key="dataValue" value-key="dataId"/>
-          </DkFormItem>
-          <!--客成状态-->
-          <DkFormItem prop="saleStatus" :required="true">
-            <SelectPop v-model="formData.saleStatus" :options="saleStatusList" :multiple="false"
+          <DkFormItem prop="channelId" :required="true">
+            <SelectPop v-model="formData.channelId" :options="channelList" :multiple="false"
                        :clearable="false"
-                       label-key="dataName" value-key="dataCode" :disabled="type == 'edit'"/>
+                       label-key="channelName" value-key="channelId"/>
           </DkFormItem>
-          <!--性别-->
-          <DkFormItem prop="gender" required>
-            <SelectPop v-model="formData.gender" :options="genderList" :multiple="false" :clearable="false"
-                       label-key="dataName" value-key="dataCode"/>
+          <!--客成状态-->
+          <DkFormItem prop="saleStatus" v-if="type != 'add'">
+<!--            <SelectPop v-model="formData.saleStatusName" :options="saleStatusList" :multiple="false"-->
+<!--                       :clearable="false"-->
+<!--                       label-key="dataName" value-key="dataCode" :disabled="type == 'edit'"/>-->
+            <InputPop v-model="formData.saleStatusName" :readonly="true"/>
           </DkFormItem>
           <!--客户来源-->
-          <DkFormItem prop="customerFrom" required>
-            <SelectPop v-model="formData.customerFrom" :options="customerFromList" :multiple="false"
+          <DkFormItem prop="cusFrom">
+            <SelectPop v-model="formData.cusFrom" :options="customerFromList" :multiple="false"
                        :clearable="false"
-                       label-key="fromName" value-key="fromId"/>
-          </DkFormItem>
-          <!--装修户型数-->
-          <DkFormItem prop="toiletCount" required>
-            <SelectPop v-model="formData.toiletCount" :options="toiletList" :multiple="false"
-                       label-key="toiletsName" value-key="toiletsId"/>
-          </DkFormItem>
-          <!--装修类型-->
-          <DkFormItem prop="fitupType" required>
-            <SelectPop v-model="formData.fitupType" :options="fitupTypeList" :multiple="false"
-                       label-key="dataValue" value-key="dataId"/>
-          </DkFormItem>
-          <!--房屋类型-->
-          <DkFormItem prop="houseType">
-            <SelectPop v-model="formData.houseType" :options="houseTypeList" :multiple="false"
-                       label-key="dataValue" value-key="dataId"/>
-          </DkFormItem>
-          <!--装修风格-->
-          <DkFormItem prop="fitupStyle">
-            <SelectPop v-model="formData.fitupStyle" :options="fitupStyleList" :multiple="false"
-                       label-key="dataValue" value-key="dataId"/>
-          </DkFormItem>
-          <!--年龄构成-->
-          <DkFormItem prop="ageComposition">
-            <SelectPop v-model="formData.ageComposition" :options="ageCompositionList" :multiple="false"
-                       label-key="dataValue" value-key="dataId"/>
-          </DkFormItem>
-          <!--决策者-->
-          <DkFormItem prop="decisionMaker">
-            <SelectPop v-model="formData.decisionMaker" :options="decisionMakerList" :multiple="false"
                        label-key="dataValue" value-key="dataId"/>
           </DkFormItem>
           <!--备注-->
           <DkFormItem prop="remarks">
             <InputPop v-model="formData.remarks"/>
           </DkFormItem>
-          <!--客户标签-->
-          <DkFormItem prop="customerTags">
-            <Tag v-for="(item, index) of formData.customerTagNames" :key="index">{{ item }}</Tag>
-            <Button icon="ios-add" circle size="small" @click="customTagModal=true"></Button>
-          </DkFormItem>
-        </DkForm>
-      </DkPanel>
-      <DkPanel prop="invoiceInfo">
-        <!--  下拉区域  -->
-        <DkForm slot="content" ref="formInline" v-model="formData" style="width: 95%" :labelMaxWords="7">
-          <!--开户账号-->
-          <DkFormItem prop="bankAccount">
-            <InputPop v-model="formData.bankAccount"/>
-          </DkFormItem>
         </DkForm>
       </DkPanel>
     </DkCollapse>
 
     <!--  下部分按钮区域  -->
-    <DkSaveButton ref="saveButton" :loading="loading" @save="submitForm" @close="btnGroupClick"></DkSaveButton>
-
-    <!--    选择客户标签-->
-    <Modal v-model="customTagModal" :title="$t('customerTags')">
-      <Card v-for="(item, index) of customerTagList" :key="index" style="margin-bottom: 10px">
-        <p slot="title">{{ item.tagName }}</p>
-        <Tag v-for="(item2, index2) of item.tableTag" :key="index2" size="medium" :checked="item2.checked"
-             color="primary" checkable @on-change="(checked)=>selectTag(checked, item2)">{{ item2.tagName }}
-        </Tag>
-      </Card>
-      <div slot="footer">
-      </div>
-    </Modal>
+    <DkSaveButton ref="saveButton" :loading="loading" @save="save" @close="btnGroupClick"></DkSaveButton>
   </div>
 </template>
 
@@ -163,166 +96,67 @@ export default {
   data() {
     let self = this
     return {
-      // 是否是选择客户设置以及编辑时设置
-      setCustomerFlag: false,
-      //年龄构成list
-      ageCompositionList: [],
-      // 省市区list
-      areaTreeList: [],
-      // 客户标签list
-      customerTagList: [],
-      // 自定义标签弹窗
-      customTagModal: false,
       // 客户来源list
       customerFromList: [],
-      //决策者list
-      decisionMakerList: [],
-      // 装修类型list
-      fitupTypeList: [],
-      // 装修风格list
-      fitupStyleList: [],
-      // 性别list
-      genderList: [],
-      // 房屋类型
-      houseTypeList: [],
-      // 发票类型
-      invoiceTypeList: [],
+      // 渠道list
+      channelList:[],
       // 客成状态list
       saleStatusList: [],
-      // 装修户型数list
-      toiletList: [],
       loading: false,
-      errMessage: {},
-      customerClassifiedList: [],
       formData: {
-        customerId: null,
-        customerName: null,
-        customerCode: null,
-        customerPhone: null,
+        cusId: null,
+        cusName: null,
+        cusCode: null,
+        cusPhone: null,
         contactName: null,
-        contactPhones: null,
-        saleStatus: null,
-        reportUser: self.$store.state.user.id,
-        reportUserName: self.$store.state.user.userName,
+        contactPhone: null,
+        saleStatusName: null,
+        staffId:null,
+        staffName:null,
+        reportStaff: self.$store.state.user.id,
+        reportStaffName: self.$store.state.user.userName,
         addressArea: null,
         addressName: null,
         addressNo: null,
         addressFull: null,
         customerDistrict: null,
-        customerTags: [],
-        customerTagNames: [],
+        cusFrom:null,
+        cusFromName:null,
         bankAccount: null,
         remarks: '',
         cpId: self.$store.state.user.cpId,
-        orgId: self.$store.state.user.orgId,
-        orgName: self.$store.state.user.orgName,
-        gender: null,
-        toiletCount: null,
-        fitupType: null,
-        houseType: null,
-        fitupStyle: null,
-        ageComposition: null,
-        decisionMaker: null,
-        customerClassified: null,
-        fenXiaoShangName: self.$store.state.user.sale2Name,
+        orgId: null,
+        orgName: null,
         channelName: null
       },
-      ruleInline: {
-        customerName: [
-          {required: true, trigger: 'none'},
-        ],
-        customerPhone: [
-          {required: true, trigger: 'none'},
-          {
-            required: true,
-            trigger: 'none',
-            max: 11,
-            min: 11,
-            message: self.$t('W_071', {'param': self.$t('customerPhone')})
-          },
-        ],
-        // 客户区域
-        customerDistrict: [
-          {required: true, trigger: 'none', type: 'object'}
-        ],
-        contactPhones: [
-          {
-            required: false,
-            trigger: 'none',
-            max: 11,
-            min: 11,
-            message: self.$t('W_071', {'param': self.$t('contactPhones')})
-          },
-        ],
-        reportUser: [
-          {required: true, trigger: 'none', type: 'number'}
-        ],
-        saleStatus: [
-          {required: true, trigger: 'none'}
-        ],
-        addressName: [
-          {required: true, trigger: 'none'},
-        ],
-        gender: [
-          {required: true, trigger: 'none'},
-        ],
-        customerFrom: [
-          {required: true, trigger: 'none', type: 'number'}
-        ],
-        toiletCount: [
-          {required: true, trigger: 'none', type: 'number'}
-        ],
-        fitupType: [
-          {required: true, trigger: 'none', type: 'number'}
-        ],
-        addressNo: [
-          {required: true, trigger: 'none'},
-        ],
-      },
-      //商品属性
-      attributeList: [],
-      //流通方式集合
-      salesModeList: [],
-      //计量标识
-      flgEstimateList: [],
-      //种类放大镜数据体
-      valData: [],
-      //计量单位
-      goodsUnitList: [],
-      //商品规格
-      specificationList: [],
-      //商品品牌
-      goodsBrandList: [],
-      //商品品种
-      goodsVarietyList: [],
-      //商品系列
-      goodsSeriesList: [],
-      //商品种类
-      goodsCategoryList: [],
       //cpIds
       cpIds: [],
 
-      estateData: [],//小区档案数据源
       regionData: [],
       cityData: [],
     }
   },
   methods: {
     /**
-     * @desc   : 改变报备人事件
-     * @author : 付斌
-     * @date   : 2024-02-01 14:30
-     */
-    changeReportUser(val) {
-
-    },
-    /**
      * @desc   : 选择地址
      * @author : 付斌
      * @date   : 2024-02-01 14:30
      */
     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   : 拼写详细地址
@@ -330,7 +164,10 @@ export default {
      * @date   : 2024-02-01 14:30
      */
     setAddressFull(e) {
-
+      // 客户区域有值才会拼接详细地址
+      if (this.formData.customerDistrict && this.formData.customerDistrict.addressFull) {
+        this.formData.addressFull = this.formData.customerDistrict.addressFull + (this.formData.addressNo ? this.formData.addressNo : '')
+      }
     },
     /**
      * @desc   : 保存的提交事件
@@ -345,8 +182,31 @@ export default {
      * @author : 付斌
      * @date   : 2024-02-01 14:30
      */
-    clearForm() {
+    clear() {
+      this.formData.cusId = null
+      this.formData.cusName = null
+      this.formData.cusCode = null
+      this.formData.cusPhone = null
+      this.formData.contactName = null
+      this.formData.contactPhone = null
+      this.formData.addressFull = null
+      this.formData.addressNo = null
+      this.formData.addressName = null
+      this.formData.cusFrom = null
+      this.formData.cusFromName = null
+      this.formData.channelId = null
+      this.formData.channelName = null
+      this.formData.saleStatusName = null
+      this.formData.remarks = null
+    },
 
+    /**
+    * @desc   : 给参数赋值
+    * @author : 常皓宁
+    * @date   : 2024/4/9 13:44
+    */
+    setParams(){
+      this.params = {...this.formData}
     },
 
     /**
@@ -354,8 +214,11 @@ export default {
      * @author : 付斌
      * @date   : 2024-02-01 14:30
      */
-    saveGoods(params) {
-
+    saveData() {
+      console.log('this.params', this.params)
+      return this.type === this.$config.formMode.add ?
+        this.excute(this.$service.customerService, this.$service.customerService.insert, this.params)
+        : this.excute(this.$service.customerService, this.$service.customerService.update, this.params)
     },
     /**
      * @desc   : 通过id查询
@@ -363,8 +226,45 @@ export default {
      * @date   : 2024-02-01 14:30
      */
     detail(id) {
+      return this.excuteNoParam(this.$service.customerService, this.$service.customerService.selectByUpdate, [id])
+    },
 
+    /**
+     * @desc   : 编辑页面赋值
+     * @author : 常皓宁
+     * @date   : 2024/2/29 9:49
+     */
+    setValuesByEdit(data) {
+      console.log('data',data)
+      this.formData.cusId = data.cusId
+      this.formData.cusName = data.cusName
+      this.formData.cusCode = data.cusCode
+      this.formData.cusPhone = data.cusPhone
+      this.formData.contactName = data.contactName
+      this.formData.contactPhone = data.contactPhone
+      this.formData.addressFull = data.addressFull
+      this.formData.addressNo = data.addressNo
+      this.formData.addressName = data.addressName
+      this.formData.cusFrom = data.cusFrom
+      this.formData.cusFromName = data.cusFromName
+      this.formData.channelId = data.channelId
+      this.formData.channelName = data.channelName
+      this.formData.saleStatusName = data.saleStatusName
+      this.formData.staffId = data.staffId
+      this.formData.staffName = data.staffName
+      this.formData.orgId = data.orgId
+      this.formData.orgName = data.orgName
+      this.formData.remarks = data.remarks
+      // 设置地址(不包括门牌号)
+      this.formData.customerDistrict = {}
+      if (data.addressFull) {
+        this.formData.customerDistrict.addressFull = data.addressFull.replace(data.addressNo, '')
+      }
+      console.log('this,',this.formData)
+      this.formData.annexPaths = data.annexPaths
     },
+
+
     /**
      * @desc   : 返回一览页面
      * @author : 付斌
@@ -398,10 +298,51 @@ export default {
     selectTag(checked, item) {
 
     },
+    /**
+    * @desc   : 获取客户来源
+    * @author : 常皓宁
+    * @date   : 2024/4/9 10:06
+    */
+    getCusFrom(){
+      let params = {
+        dataSourceCode: 'customerFrom'
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.customerFromList = res.data
+        }
+      })
+    },
+
+    /**
+     * @desc   : 获取客户渠道
+     * @author : 常皓宁
+     * @date   : 2024/4/9 10:06
+     */
+    getChannel(){
+      let params = {
+        dataSourceCode: 'saleChannel'
+      }
+      this.excute(this.$service.commonService, this.$service.commonService.getInitData, params, false).then(res => {//调用api查询方法
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.channelList = res.data
+        }
+      })
+    },
+
+    /**
+     * @desc   : 查询事件
+     * @author : 付斌
+     * @date   : 2024-02-01 14:24
+     */
+    initData() {
+      this.getCusFrom()
+      this.getChannel()
+    },
   },
   created() {
-    this.focusItem = 'customerName';    // 给第一个组件赋值,可以在混入中自动去聚焦
-    this.primaryKey = 'customerId'  // 设置主键Id
+    this.focusItem = 'cusName';    // 给第一个组件赋值,可以在混入中自动去聚焦
+    this.primaryKey = 'cusId'  // 设置主键Id
     // 查询集团字典
     this.getDictionaryData()
   },

+ 46 - 20
src/view/mst/customer/index.vue

@@ -10,8 +10,6 @@
         <BaseIndexButton ref="edit" name="edit"></BaseIndexButton>
         <BaseIndexButton ref="check" name="check" :isMustChooseFlag="false"></BaseIndexButton>
         <BaseIndexButton ref="followTask" name="followTask" :isMustChooseFlag="false"></BaseIndexButton>
-        <BaseIndexButton ref="downloadTemplate" name="downloadTemplate"></BaseIndexButton>
-        <BaseIndexButton ref="import" name="import"></BaseIndexButton>
       </template>
       <template #right>
         <BaseIndexButton ref="add" name="add"></BaseIndexButton>
@@ -28,15 +26,16 @@
     <card style="padding: 0">
       <DkTabs ref="tab" v-model="tabsModel" :options="tabsOptions" @on-click="clickTab"></DkTabs>
       <DkTable :id="'table-'+$options.name" ref="table-select" :data="tableData"
-               :height="this.tableHeight-50" primaryKey="customerId"
+               :height="this.tableHeight-50" primaryKey="cusId"
+               :page-size-opts="pageSizeOpts"
                :page-size="pageInfo.pageSize"
-               @pageChange="pageSizeChange"
+               :choose-flag="false"
                name="table">
-        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="customerCode"
+        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="cusCode"
                        fixed="left" @on-link="openCustomerMessage"></DkTableColumn>
-        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="customerName"
+        <DkTableColumn :type="$libaray.checkButtonHasRight('customer-detail')?'link':''" field="cusName"
                        fixed="left" @on-link="openCustomerMessage"></DkTableColumn>
-        <DkTableColumn field="customerPhone"></DkTableColumn>
+        <DkTableColumn field="cusPhone"></DkTableColumn>
         <DkTableColumn field="channelName"></DkTableColumn>
         <DkTableColumn field="addressFull"></DkTableColumn>
         <DkTableColumn field="contactName"></DkTableColumn>
@@ -71,7 +70,7 @@
     </card>
 
     <!--    跟进任务-->
-    <FollowTask v-model="followTaskModal" :customer-names="customerInfo6.customerNames"
+    <FollowTask v-model="followTaskModal" :customer-names="customerInfo6.cusNames"
                 :customer-ids="customerInfo6.customerIds" @ok="initData(1)"
                 ref="modal_follow_task"
     />
@@ -99,16 +98,10 @@
 
 <script>
 import {indexMixin} from '@/mixins'
-import FollowTask from '../cus-follow/follow-task'
-import Follow from "../cus-follow/follow";
 
 export default {
   name: 'customer',
   mixins: [indexMixin],
-  components: {
-    FollowTask,
-    Follow
-  },
   data() {
     let self = this
     return {
@@ -121,7 +114,7 @@ export default {
       // 客户信息 跟进任务
       customerInfo6: {
         customerIds: [],
-        customerNames: [],
+        cusNames: [],
         followUsers: []
       },
       // 错误信息
@@ -154,11 +147,11 @@ export default {
       searchCond: {},
       searchContent: [
         {
-          valueFormat: {code: 'customerName'},
+          valueFormat: {code: 'cusName'},
           valueKind: 'STR'
         },
         {
-          valueFormat: {code: 'customerPhone'},
+          valueFormat: {code: 'cusPhone'},
           valueKind: 'STR'
         },
         {
@@ -250,8 +243,11 @@ export default {
         },
       ],
       tableData: [],
-      tabsModel: null,
+      tabsModel: self.$t('potentialCus'),
       tabsOptions: [
+        {label: self.$t('potentialCus'), name: self.$t('potentialCus'), index: 0},
+        {label: self.$t('seasCus'), name: self.$t('seasCus'), index: 1},
+        {label: self.$t('dealCus'), name: self.$t('dealCus'), index: 2},
         {label: self.$t('allCustomers'), name: self.$t('allCustomers'), index: 3},
       ],
       //业务部门list
@@ -305,6 +301,13 @@ export default {
      * @date   : 2024-02-01 14:20
      */
     clickTab(val) {
+      this.$nextTick(() => {
+        //查询条件
+        this.loading = true
+        this.tableData = []
+        this.pageInfo.currentPage = 1
+        this.searchData()
+      })
     },
     /**
      * @desc   : 下载模板
@@ -364,12 +367,35 @@ export default {
 
     },
     /**
+     * @desc   : 查询参数设定
+     * @author : 常皓宁
+     * @date   : 2024/4/7 11:22
+     */
+    setSearchParams(params) {
+      params.flgValid = true
+      if (this.tabsModel === this.$t('allReceipt')) {
+        params.saleStatus = ''
+      } else if (this.tabsModel === this.$t('potentialCus')) {
+        params.saleStatus = '销售状态-潜客'
+      } else if (this.tabsModel === this.$t('seasCus')) {
+        params.saleStatus = '销售状态-公海'
+      } else if (this.tabsModel === this.$t('dealCus')) {
+        params.saleStatus = '销售状态-成交'
+      }
+      return params
+    },
+    /**
      * @desc   : 查询数据
      * @author : 付斌
      * @date   : 2024-02-01 14:22
      */
-    getData() {
-
+    getData(params) {
+      // 查询数据
+      this.excute(this.$service.customerService, this.$service.customerService.selectByCond, params).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.tableData = res.data.list
+        }
+      })
     },
   },
   created() {

+ 0 - 3
src/view/mst/goods/add.vue

@@ -13,6 +13,3 @@ export default {
 }
 </script>
 
-<style scoped>
-
-</style>

+ 1 - 4
src/view/mst/goods/edit.vue

@@ -6,13 +6,10 @@
 import CommonForm from "./form";
 
 export default {
-  name: 'edit',
+  name: 'goods-edit',
   components: {
     CommonForm
   },
 }
 </script>
 
-<style scoped>
-
-</style>

+ 213 - 173
src/view/mst/goods/form.vue

@@ -7,114 +7,120 @@
                   v-if="editKeys && editKeys.length > 1"
                   @pageChange="editPageChange"></DkPageButton>
     <DkCollapse @on-change="changeCollapse" ref="collapse">
-      <DkPanel prop="基本信息">
-        <!--  下拉区域  -->
-        <DkForm slot="content" ref="formInline" v-model="formData"  :labelMaxWords=5>
-          <!--唯一编码-->
-          <DkFormItem :required="true" prop="唯一编码">
-            <InputPop ref="唯一编码" v-model="formData.唯一编码" :readonly="type == $config.formMode.edit"/>
+      <DkPanel prop="baseAttribute">
+        <!--  基础属性  -->
+        <DkForm slot="content" ref="formInline" v-model="formData" :labelMaxWords=5>
+          <!--商品编码-->
+          <DkFormItem prop="skuCode">
+            <InputPop ref="skuCode" v-model="formData.skuCode" :readonly="true"/>
           </DkFormItem>
           <!--商品型号-->
-          <DkFormItem :required="true" prop="商品型号">
-            <InputPop ref="商品型号" v-model="formData.商品型号" :readonly="type == $config.formMode.edit"/>
+          <DkFormItem prop="skuModel" :required="true">
+            <InputPop ref="skuModel" v-model="formData.skuModel" />
           </DkFormItem>
           <!--商品名称-->
-          <DkFormItem :required="true" prop="商品名称">
-            <InputPop ref="商品名称" v-model="formData.商品名称"/>
-          </DkFormItem>
-          <DkFormItem prop="remarks">
-            <InputPop v-model="formData.remarks" maxlength="255"/>
+          <DkFormItem prop="skuName" :required="true">
+            <InputPop ref="skuName" v-model="formData.skuName"/>
           </DkFormItem>
         </DkForm>
       </DkPanel>
-      <DkPanel prop="商品属性">
-        <!--  下拉区域  -->
+      <DkPanel prop="goodsAttribute">
+        <!--  商品属性  -->
         <DkForm slot="content" ref="formInline" v-model="formData" :labelMaxWords=5>
-          <!--商品品牌-->
-          <DkFormItem prop="商品品牌" :required="true" :data-type="this.$config.dataType.array" :label="'商品品牌'">
-            <SelectPop v-model="formData.商品品牌" :multiple="false" :options="List1" ref="roleIds"
-                       labelKey="roleName"
-                       valueKey=roleId>
-            </SelectPop>
+          <!--  品牌  -->
+          <DkFormItem prop="brandId" :label="$t('brandIds')" :required="true">
+            <SelectMagnifier v-model="formData.brandId" :display-text="formData.brandName"
+                             :type="this.$config.MagnifierType.brand"
+                             :multiple="false"></SelectMagnifier>
           </DkFormItem>
           <!--商品种类-->
-          <DkFormItem prop="商品种类" :required="true" :data-type="this.$config.dataType.array" :label="'商品种类'">
-            <SelectPop v-model="formData.商品种类" :multiple="false" :options="List2" ref="roleIds"
-                       labelKey="roleName"
-                       valueKey=roleId>
-            </SelectPop>
-          </DkFormItem>
-          <!--计量单位-->
-          <DkFormItem prop="计量单位" :required="true" :data-type="this.$config.dataType.array" :label="'计量单位'">
-            <SelectPop v-model="formData.计量单位" :multiple="false" :options="List4" ref="roleIds"
-                       labelKey="roleName"
-                       valueKey=roleId>
+          <DkFormItem prop="categoryId" :label="$t('category')" :required="true">
+            <SelectPop v-model="formData.categoryId" :multiple="false"
+                       :options="categoryList"
+                       labelKey="catName"
+                       valueKey=catId>
             </SelectPop>
           </DkFormItem>
           <!--商品系列-->
-          <DkFormItem prop="商品系列" :data-type="this.$config.dataType.array" :label="'商品系列'">
-            <SelectPop v-model="formData.商品系列" :multiple="false" :options="List3" ref="roleIds"
-                       labelKey="roleName"
-                       valueKey=roleId>
+          <DkFormItem prop="seriesId" :label="$t('series')" :required="true">
+            <SelectPop v-model="formData.seriesId" :multiple="false" :options="seriesList"
+                       labelKey="seriesName"
+                       valueKey=seriesId>
             </SelectPop>
           </DkFormItem>
-          <!--商品规格-->
-          <DkFormItem prop="商品规格" :data-type="this.$config.dataType.array" :label="'商品规格'">
-            <SelectPop v-model="formData.商品规格" :multiple="false" :options="List5" ref="roleIds"
-                       labelKey="roleName"
-                       valueKey=roleId>
+          <!--计量单位-->
+          <DkFormItem prop="unitId" :label="$t('unit')" :required="true">
+            <SelectPop v-model="formData.unitId" :multiple="false" :options="unitList"
+                       labelKey="unitName"
+                       valueKey="unitId">
             </SelectPop>
           </DkFormItem>
-          <!--辅助计量单位-->
-          <DkFormItem prop="辅助计量单位">
-            <InputPop ref="辅助计量单位" v-model="formData.辅助计量单位"/>
-          </DkFormItem>
-        </DkForm>
-      </DkPanel>
-      <DkPanel prop="仓库信息">
-        <DkForm slot="content" ref="formInline" v-model="formData" :labelMaxWords=5>
-          <!--初期仓库-->
-          <DkFormItem :required="true" prop="orgId" :data-type="$config.dataType.number" :label="'初期仓库'">
-            <SelectMagnifier v-model="formData.初期仓库" :display-text="formData.levelName"
-                             :type="this.$config.MagnifierType.初期仓库"
-                             :multiple="false"
-                             title="初期仓库"
-                             @ok="chooseHouse"></SelectMagnifier>
-          </DkFormItem>
-          <!--库存色号-->
-          <DkFormItem prop="库存色号">
-            <InputPop ref="库存色号" v-model="formData.库存色号"/>
+          <!--辅助单位-->
+          <DkFormItem prop="subUnitId" :label="$t('subUnit')">
+            <SelectPop v-model="formData.subUnitId" :multiple="false" :options="subUnitList"
+                       labelKey="unitName"
+                       valueKey="unitId">
+            </SelectPop>
           </DkFormItem>
-          <!--期初数量-->
-          <DkFormItem prop="期初数量">
-            <InputPop ref="期初数量" v-model="formData.期初数量"/>
+          <!--商品规格-->
+          <DkFormItem prop="skuSpec">
+            <InputPop ref="skuSpec" v-model="formData.skuSpec"/>
           </DkFormItem>
-          <!--期初成本价-->
-          <DkFormItem prop="期初成本价">
-            <InputPop ref="期初成本价" v-model="formData.期初成本价"/>
+          <!--单位换算-->
+          <DkFormItem prop="conversionFactor">
+            <InputNumberPop ref="conversionFactor" v-model="formData.conversionFactor"/>
           </DkFormItem>
         </DkForm>
       </DkPanel>
-      <DkPanel prop="价格明细">
-        <DkForm slot="content" ref="formInline" v-model="formData" :labelMaxWords=5>
+      <DkPanel prop="priceItem">
+        <DkForm slot="content" ref="formInline" v-model="formData">
           <!--采购价-->
-          <DkFormItem prop="采购价">
-            <InputPop ref="采购价" v-model="formData.采购价"/>
+          <DkFormItem prop="pricePurchase">
+            <InputNumberPop ref="pricePurchase" v-model="formData.pricePurchase" />
           </DkFormItem>
           <!--零售价-->
-          <DkFormItem prop="零售价">
-            <InputPop ref="零售价" v-model="formData.零售价"/>
+          <DkFormItem prop="priceStandard">
+            <InputNumberPop ref="priceStandard" v-model="formData.priceStandard" />
           </DkFormItem>
           <!--批发价-->
-          <DkFormItem prop="批发价">
-            <InputPop ref="批发价" v-model="formData.批发价"/>
+          <DkFormItem prop="priceWholesale">
+            <InputNumberPop ref="priceWholesale" v-model="formData.priceWholesale"/>
           </DkFormItem>
           <!--销售售价-->
-          <DkFormItem prop="销售售价">
-            <InputPop ref="销售售价" v-model="formData.销售售价"/>
+          <DkFormItem prop="priceLimited">
+            <InputNumberPop ref="priceLimited" v-model="formData.priceLimited"/>
+          </DkFormItem>
+        </DkForm>
+      </DkPanel>
+      <DkPanel prop="invInto" v-show="false">
+        <DkForm slot="content" ref="formInline" v-model="formData">
+        <!--  仓库名称  -->
+        <DkFormItem prop="whId">
+          <SelectMagnifier v-model="formData.whId" :display-text="formData.whName"
+                           :type="this.$config.MagnifierType.warehouse"
+                           :multiple="false"></SelectMagnifier>
+        </DkFormItem>
+        <!--非标号-->
+        <DkFormItem prop="nonStdCode">
+          <InputPop ref="nonStdCode" v-model="formData.nonStdCode"/>
+        </DkFormItem>
+        </DkForm>
+      </DkPanel>
+      <DkPanel prop="remarks">
+        <DkForm slot="content" ref="formInline" v-model="formData">
+          <DkFormItem prop="remarks" :span="12">
+            <InputPop ref="remarks" v-model="formData.remarks"
+                      maxlength=500 textareaFlag/>
           </DkFormItem>
         </DkForm>
       </DkPanel>
+      <DkPanel prop="skuImages">
+        <div id="search-cond-div-files-info" ref="search-cond-div-files-info" slot="content">
+          <DkPicWall v-model="formData.skuImages"
+                     :table="$config.tables.sku" :accept="$config.uploadFileConfig.acceptPicType"></DkPicWall>
+        </div>
+      </DkPanel>
+
     </DkCollapse>
 
     <!--      下部分按钮区域-->
@@ -125,115 +131,149 @@
 
 <script>
 import {formMixin} from "@/mixins/form";
+import {button, columns, formTitle, loginTitle, messages, others} from "@/locale/lang/zh-CN";
 
 export default {
   components: {},
   mixins: [formMixin],
-
   data() {
     return {
-      List1: [
-        {
-          roleId: 1,
-          roleName: '蒙娜丽莎瓷砖'
-        },
-        {
-          roleId: 2,
-          roleName: '箭牌卫浴'
-        },
-        {
-          roleId: 3,
-          roleName: '恒洁位于'
-        },
-      ],
-      List2: [
-        {
-          roleId: 1,
-          roleName: '陶瓷类'
-        },
-        {
-          roleId: 2,
-          roleName: '浴室柜类'
-        },
-      ],
-      List3: [
-        {
-          roleId: 1,
-          roleName: '原木系列'
-        },
-        {
-          roleId: 2,
-          roleName: '金属系列'
-        },
-        {
-          roleId: 3,
-          roleName: '古典系列'
-        },
-        {
-          roleId: 4,
-          roleName: '沐浴系列'
-        },
-      ],
-      List4: [
-        {
-          roleId: 1,
-          roleName: '米'
-        },
-        {
-          roleId: 2,
-          roleName: '箱'
-        },
-        {
-          roleId: 3,
-          roleName: '平方米'
-        },
-        {
-          roleId: 4,
-          roleName: '个'
-        },
-      ],
-      List5:[
-        {
-          roleId: 1,
-          roleName: '800*800'
-        },
-        {
-          roleId: 2,
-          roleName: '300*800'
-        },
-        {
-          roleId: 3,
-          roleName: '600*600'
-        },
-      ],
-      formData: {
-        唯一编码: null,
-        商品型号: null,
-        商品名称: null,
-        商品品牌: null,
-        商品种类: null,
-        商品系列: null,
-        计量单位: null,
-        商品规格: null,
-        辅助计量单位: null,
-        初期仓库: null,
-        库存色号: null,
-        期初数量: null,
-        期初成本价: null,
-        采购价: null,
-        零售价: null,
-        批发价: null,
-        销售售价: null,
+      categoryList:[],
+      seriesList:[],
+      unitList:[],
+      subUnitList:[],
+      formData:{
+        skuCode: null,
+        skuModel: null,
+        skuName: null,
+        brandId: null,//商品品牌
+        brandName:null,
+        categoryId: null,//商品种类
+        seriesId: null,//商品系列
+        unitId: null,//计量单位
+        skuSpec: null,//商品规格
+        subUnitId: null,//辅助计量单位
+        conversionFactor: null, //单位换算
+        nonStdCode:null,
+        whId:null,
+        whName:null,
+        pricePurchase : null, //采购价
+        priceStandard : null, //零售价
+        priceWholesale : null,//批发价
+        priceLimited : null, //销售售价
         remarks: null,
       },
     }
   },
   methods: {
 
+    /**
+     * @desc   : 加载数据
+     * @author : 宋扬
+     * @date   : 2024/4/8 15:12
+     */
+    initData() {
+      // 获取商品种类
+      this.getGoodsCategory();
+      // 获取商品系列
+      this.getGoodsSeries();
+      // 获取计量单位
+      this.getGoodsUnit();
+    },
+
+    /**
+     * @desc   : 获取商品种类
+     * @author : 宋扬
+     * @date   : 2024/4/8 15:13
+     */
+    getGoodsCategory() {
+      this.excute(this.$service.goodsCategoryService, this.$service.goodsCategoryService.selectByCond, {}).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.categoryList = res.data.list;
+        }
+      })
+    },
+
+    /**
+     * @desc   : 获取商品系列
+     * @author : 宋扬
+     * @date   : 2024/4/8 15:18
+     */
+    getGoodsSeries() {
+      this.excute(this.$service.goodsSeriesService, this.$service.goodsSeriesService.selectByCond, {}).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.seriesList = res.data.list;
+        }
+      })
+    },
+
+    /**
+     * @desc   : 获取计量单位
+     * @author : 宋扬
+     * @date   : 2024/4/8 15:20
+     */
+    getGoodsUnit() {
+      this.excute(this.$service.unitService, this.$service.unitService.selectByCond, {}).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.unitList = res.data.list;
+          this.subUnitList=this.unitList.copy();
+        }
+      })
+    },
+
+    /**
+     * @desc   : 赋值信息
+     * @author : 宋扬
+     * @date   : 2024/4/8 16:41
+     */
+    setParams(){
+      this.params = {...this.formData}
+    },
+
+    /**
+     * @desc   : desc
+     * @author : 宋扬
+     * @date   : 2024/4/9 15:29
+     */
+    setValuesByEdit(data) {
+      if (data) {
+        this.formData = data;
+      }
+    },
+
+    /**
+     * @desc   : 通过id查询
+     * @author : 宋扬
+     * @date   : 2024/4/9 15:31
+     */
+    detail(id) {
+      return this.excuteNoParam(this.$service.goodsService, this.$service.goodsService.selectById, [id], false);
+    },
+
+    /**
+     * @desc   : 保存数据
+     * @author : 宋扬
+     * @date   : 2024/4/8 16:30
+     */
+    saveData() {
+      if (this.type === this.$config.formMode.add) {
+        return this.excute(this.$service.goodsService, this.$service.goodsService.insert, this.params);
+      } else if (this.type === this.$config.formMode.edit) {
+        console.log('22222',this.params)
+        return this.excute(this.$service.goodsService, this.$service.goodsService.update, this.params);
+      }
+    },
+
+  },
+
+  /**
+   * @desc   : 在实例创建完成后被立即同步调用
+   * @author : 宋扬
+   * @date   : 2024/4/9 15:30
+   */
+  created() {
+    this.focusItem = 'skuId';    // 给第一个组件赋值,可以在混入中自动去聚焦
+    this.primaryKey = 'skuId'  // 设置主键Id
   },
 }
 </script>
-
-<style scoped>
-
-</style>

+ 109 - 88
src/view/mst/goods/index.vue

@@ -11,9 +11,9 @@
         <!--    编辑    -->
         <BaseIndexButton ref="edit" name="edit"></BaseIndexButton>
         <!--    启用    -->
-        <BaseIndexButton ref="enable" name="enable"></BaseIndexButton>
+        <BaseIndexButton  ref="enable" name="enable"></BaseIndexButton>
         <!--    停用    -->
-        <BaseIndexButton ref="disable" name="disable"></BaseIndexButton>
+        <BaseIndexButton  ref="disable" name="disable"></BaseIndexButton>
       </template>
       <template #right>
         <!--   新建     -->
@@ -28,22 +28,32 @@
                   :searchContent="searchContent"
       ></SearchCond>
     </div>
-
     <!--  表格部分  -->
     <div :style="'height: ' + (tableHeight + 30) + 'px'" class="split-div-class">
-      <DkSplit v-model="split">
-        <!-- 左边部分   -->
-        <div slot="left" class="split-pane">
-          <DkTree  :data="hgSpuCategoryList" :topCurrentFlag="true" style="margin-top: 5px" expandMode="one"
-                   id="categoryId" parent-id="parentId" tree-node-name="categoryName" :height="tableHeight"></DkTree>
-        </div>
+    <DkSplit v-model="split">
+      <!-- 左边部分   -->
+      <DkTable slot="left" ref="leftTable" :data="leftData" :height="tableHeight + 30" :page-flag="false"
+               :page-total-flag="false"  :choose-flag="false" :show-setting-flag="false"
+               @current-change="currentChangeEvent($event)" primaryKey="seriesId">
+        <DkTableColumn field="seriesName" />
+      </DkTable>
 
         <!-- 右边部分   -->
         <DkTable slot="right" :id="'table-' + $options.name" ref="table-select" :data="tableData" :pageFlag="true"
                  :page-total="pageInfo.total" :current-page="pageInfo.currentPage" :choose-flag="false"
-                 :height="this.tableHeight" primaryKey="typeId" @pageChange="pageSizeChange">
-          <DkTableColumn field="编码"></DkTableColumn>
-          <DkTableColumn field="名称"></DkTableColumn>
+                 :height="this.tableHeight" primaryKey="skuId" @pageChange="pageSizeChange">
+          <DkTableColumn field="skuCode"></DkTableColumn>
+          <DkTableColumn field="skuName"></DkTableColumn>
+          <DkTableColumn field="skuModel"></DkTableColumn>
+          <DkTableColumn field="skuSpec"></DkTableColumn>
+          <DkTableColumn field="seriesName"></DkTableColumn>
+          <DkTableColumn field="brandName"></DkTableColumn>
+          <DkTableColumn field="shortName"></DkTableColumn>
+          <DkTableColumn field="pricePurchase"></DkTableColumn>
+          <DkTableColumn field="priceStandard"></DkTableColumn>
+          <DkTableColumn field="priceWholesale"></DkTableColumn>
+          <DkTableColumn field="priceLimited"></DkTableColumn>
+          <DkTableColumn field="remarks"></DkTableColumn>
           <DkTableColumn field="flgValid" type="switch" ></DkTableColumn>
         </DkTable>
       </DkSplit>
@@ -60,104 +70,115 @@ export default {
   data(){
     let self = this
     return{
+      leftData: [],
+      tableData: [],
+      brandList: [],
+      seriesId:null,
       split: 0.15,
       minSplit: 0.15,
-      hgSpuCategoryList:[
-      ],
       searchContent:
         [
           {
-            itemCode: '商品名称',
-          },
-          {
-            itemCode: '商品编码',
+            itemCode: 'skuName',
           },
           {
-            itemCode: '唯一编码',
+            itemCode: 'skuModel',
           },
           {
-            itemCode: '商品品牌',
+            itemCode: 'brandIds',
+            valueFormat: {
+              code: 'goodsBrandList',
+              data: [],
+              valueKey: 'brandId',
+              labelKey: 'brandName'
+            },
+            valueKind: 'M-CHOICE'
           },
+          self.$config.flgValidSearch
         ],
     }
   },
   methods:{
+
     /**
-     * @desc   : 新建按钮点击事件
-     * @author : 常皓宁
-     * @date   : 2024/1/31 9:19
+     * @desc   : 加载数据
+     * @author : 宋扬
+     * @date   : 2024/4/7 14:21
      */
-    add() {
-      this.$router.push('/core/goods/add')
+    initData(){
+      // 查询商品系列数据
+      this.getSeriesData();
+      // 查询品牌信息
+      this.getGoodsBrand();
     },
 
+    /**
+     * @desc   : 品牌
+     * @author : 宋扬
+     * @date   : 2024/4/8 13:23
+     */
+    getGoodsBrand(){
+      this.excute(this.$service.goodsBrandService, this.$service.goodsBrandService.selectByCond, {}).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          let list = this.searchContent.filter(it => it.valueFormat.code == 'goodsBrandList')
+          if (list.length > 0) {
+            list[0].valueFormat.data = res.data.list
+          }
+        }
+      })
+    },
+
+    /**
+     * @desc   : 查询数据
+     * @author : 宋扬
+     * @date   : 2024/4/7 14:30
+     */
+    getData(params){
+      return this.excute(this.$service.goodsService,this.$service.goodsService.selectByCond,params)
+    },
+
+    /**
+     * @desc   : 查询参数重新赋值
+     * @author : 宋扬
+     * @date   : 2024/4/9 9:10
+     */
+    setSearchParams(params){
+      params.seriesId = this.seriesId;
+      return params;
+    },
+
+    /**
+     * @desc   : 获取系列数据
+     * @author : 宋扬
+     * @date   : 2024/4/7 15:10
+     */
+    getSeriesData(){
+      return this.excute(this.$service.goodsSeriesService, this.$service.goodsSeriesService.getGoodsSeriesList, {}).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          this.leftData = res.data;
+        }
+      })
+    },
+
+    /**
+     * @desc   : 右侧列表行变化事件
+     * @author : 宋扬
+     * @date   : 2024/4/7 15:03
+     */
+    currentChangeEvent({row}){
+      if (row != null){
+        this.seriesId =  row.seriesId;
+        //调用查询事件
+        this.searchData();
+      }
+    }
+
   },
   created() {
-    this.primaryKey = 'goodsId'  // 设置主键Id
+    this.primaryKey = 'skuId'  // 设置主键Id
     this.routeObjName = 'goods'  // 设置路由名称
+    this.comHandleEnableFlag = true; // 开启启用停用功能
   },
-  mounted() {
-    this.hgSpuCategoryList = [
-      {
-        categoryId:0,
-        categoryName:'全部分类',
-        parentId:null
-      },
-      {
-        categoryId:1,
-        categoryName:'智能一体机',
-        parentId:0
-      },
-      {
-        categoryId:2,
-        categoryName:'陶瓷坐便',
-        parentId:0
-      },
-      {
-        categoryId:3,
-        categoryName:'浴室柜',
-        parentId:0
-      },
-      {
-        categoryId:4,
-        categoryName:'定制浴室柜',
-        parentId:0
-      },
-      {
-        categoryId:5,
-        categoryName:'花洒',
-        parentId:0
-      },
-      {
-        categoryId:6,
-        categoryName:'淋浴房',
-        parentId:0
-      },
-      {
-        categoryId:7,
-        categoryName:'龙头类',
-        parentId:0
-      },
-      {
-        categoryId:8,
-        categoryName:'五金类',
-        parentId:0
-      },
-      {
-        categoryId:9,
-        categoryName:'浴缸',
-        parentId:0
-      },
-      {
-        categoryId:10,
-        categoryName:'配件',
-        parentId:0
-      },
-    ]
-  }
 }
 </script>
 
-<style scoped>
-
-</style>

+ 1 - 1
src/view/mst/org/index.vue

@@ -102,7 +102,7 @@
 import {indexMixin} from "@/mixins";
 
 export default {
-  name: "organization",
+  name: "org",
   mixins: [indexMixin],
   data() {
     let self = this

+ 16 - 0
src/view/mst/role/index.vue

@@ -129,6 +129,22 @@ export default {
     }
   },
   methods: {
+
+    /**
+    * @desc   : 编辑角色校验
+    * @author : 常皓宁
+    * @date   : 2024/4/10 13:09
+    */
+    openValidData(btnName, rows) {
+      //编辑
+      if (rows && rows[0] && (btnName === 'edit' || btnName === 'disable') ) {
+        if (rows[0].sysCode != null) {
+          this.$Message.warning(this.$t('W_007', {'param': this.$t('W_120')}));
+          return false;
+        }
+      }
+      return true;
+    },
     /**
      * @desc   : 打开功能权限弹窗
      * @author : 常皓宁

+ 0 - 10
src/view/mst/staff/index.vue

@@ -61,7 +61,6 @@
       ref="modal_editAdd"
       @on-visible-change="handleVisibleModal"
       @modalOk="save"
-      @modalCancel="clear"
       :saveFlag="true"
       :title="modalTitle"
     >
@@ -434,15 +433,6 @@ export default {
     },
 
     /**
-    * @desc   : 关闭弹窗
-    * @author : 常皓宁
-    * @date   : 2024/3/13 9:05
-    */
-    clear() {
-      this.formData = []
-    },
-
-    /**
      * @desc   : 提交事件
      * @author : 常皓宁
      * @date   : 2024/3/5 14:19

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

@@ -651,6 +651,7 @@ export default {
         whName: null,
         remarks: null,
         annexPaths: null,
+        flgAutoHandle: false,//自动入库标识
       },
         this.purchaseItemList = []
     },
@@ -711,6 +712,18 @@ export default {
       // 公司
       this.params.cpId = this.$store.state.user.cpId
 
+      //附件
+      if (this.formData.annexPaths.length > 0) {
+        this.params.annexPaths = this.formData.annexPaths.map(m => {
+          return {
+            name: m.name,
+            url: m.path,
+            type: m.type,
+            createTime: m.createTime
+          }
+        })
+      }
+
       // 新建
       if (this.type === this.$config.formMode.add) {
         let tableFilter = this.$refs['detailTable'].getTableDataFilter();

+ 12 - 8
src/view/pur/pur-enter/index.vue

@@ -304,7 +304,7 @@ export default {
         this.loading = true
         this.tableData = []
         this.pageInfo.currentPage = 1
-        this.getData()
+        this.searchData()
       })
 
     },
@@ -322,15 +322,10 @@ export default {
      * @author : 常皓宁
      * @date   : 2023/8/26 16:25
      */
-    setSearchParams() {
-      let params = this.searchList
-      params.currentPage = this.pageInfo.currentPage
-      params.pageSize = this.pageInfo.pageSize
+    setSearchParams(params) {
+      console.log('123123')
       params.flgValid = true
       params.intoType = this.$config.intoTypeBySql.purchase
-      if (this.$store.state.user.cpId) {
-        params.cpId = this.$store.state.user.cpId  //所属公司
-      }
       if (this.tableModel === 'waitEntry') {
         params.intoStatusList = [this.$config.intoStatus.ruKuZhong]
       } else if (this.tableModel === 'ingEntry') {
@@ -364,6 +359,15 @@ export default {
       if (row != null) {
         this.intoId = row.intoId
         this.getDetail(1)
+        if (row.annexPaths) {
+          row.annexPaths = row.annexPaths.map(m => {
+            return {
+              path: m.url,
+              name: m.name,
+              type: 'img'
+            }
+          })
+        }
         //订单附件
         this.tableDataDetail_files = row.annexPaths
       }

+ 2 - 9
src/view/pur/pur-return/index.vue

@@ -306,7 +306,7 @@ export default {
         this.tableData = []
         this.pageInfo.currentPage = 1
         // 查询数据
-        this.getData()
+        this.searchData()
       })
 
     },
@@ -378,20 +378,13 @@ export default {
      * @author : 常皓宁
      * @date   : 2023/8/26 16:25
      */
-    setSearchParams() {
-      let params = this.searchList
-      params.currentPage = this.pageInfo.currentPage
-      params.pageSize = this.pageInfo.pageSize
+    setSearchParams(params) {
       params.flgValid = true
       params.intoType = this.$config.intoTypeBySql.purchaseReturn
       if (this.isShowCancel) {
         params.isShowCancel = 1
       } else {
         params.isShowCancel = null
-
-      }
-      if (this.$store.state.user.cpId) {
-        params.cpId = this.$store.state.user.cpId  //所属公司
       }
       if (this.tableModel === 'waitOut') {
         params.intoStatusList = [this.$config.intoStatus.ruKuZhong]

+ 160 - 0
src/view/report/detail-report/index.vue

@@ -0,0 +1,160 @@
+<!-- @desc:明细报表  @auth:付斌  @time:2024/02/20 15:15 -->
+<template>
+  <div class="main-div">
+    <BaseIndexButtonGroup id="BaseIndexButtonGroup">
+      <template #left>
+        <BaseIndexButton ref="search" name="search"></BaseIndexButton>
+        <BaseIndexButton ref="clear" name="clear"></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"
+                  @on-switch-change="handleSwitchChange"></SearchCond>
+    </div>
+
+    <!--  表格部分  -->
+    <DkTable slot="top" :id="'table-'+$options.name"
+             ref="table-select" name="table" :data="tableData"
+             @pageChange="pageSizeChange"
+             :page-total="pageInfo.total"
+             :page-size="pageInfo.pageSize"
+             :page-size-opts="pageSizeOpts"
+             :current-page="pageInfo.currentPage"
+             :choose-flag="false"
+             :height="tableHeight" :showFooter="showFooter">
+      <div v-for="(item, index) in columns" :key="item.field">
+        <DkTableColumn
+          :type="item.type"
+          :field="item.field"
+          :title="item.title"
+          :digits="item.digits"
+          :sum="item.sum"
+          :dataType="item.dataType"
+          :align="item.align"
+          @on-link="handleLink"
+        >
+        </DkTableColumn>
+      </div>
+    </DkTable>
+
+  </div>
+</template>
+
+<script>
+
+import {indexMixin} from '@/mixins'
+import setting from "./setting";
+
+export default {
+  name: 'detail-report',
+  mixins: [indexMixin],
+  data() {
+    return {
+      service: {},
+      methodsName: null,
+      showFooter: true,
+      columns: [],
+      columns_socail: [],// 记录原始列
+      detailColumns: [],
+      searchContent: [],
+    }
+  },
+
+  methods: {
+    /**
+     * @desc   : desc
+     * @author : 周兴
+     * @date   : 2024/4/9 13:21
+     */
+    handleSwitchChange(e) {
+      let code = e.code
+      let checked = e.e;
+      // 查看明细
+      if (code == 'flgViewItem') {
+        // 勾选,把明细列显示出来
+        if (checked && this.detailColumns && this.detailColumns.length > 0) {
+          this.columns = this.columns.union(this.detailColumns);
+        }
+        // 还原列
+        if (!checked) {
+          this.columns = this.columns_socail.copy();
+        }
+      }
+    },
+    /**
+     * @desc   : 查询数据
+     * @author : 周兴
+     * @date   : 2024-02-20 15:53
+     */
+    getData(params) {
+      return this.excute(this.service, this.service[this.methodsName], params)
+    },
+    /**
+     * @desc   : 根据类型给属性赋值
+     * @author : 周兴
+     * @date   : 2022/3/16 18:12
+     */
+    setProperty() {
+      let self = this
+      // 设置接口相关信息
+      console.log('eee',self.formType)
+      let set = setting.setSetting(this.$service, self.formType);
+      self = this.objectMerge(self, set)
+      if (self.pageSize) {
+        self.pageInfo.pageSize = self.pageSize;
+      }
+      // 对下拉查询条件查询数据源
+      this.getSelectDataSource();
+      this.columns_socail = this.columns.copy();
+    },
+    /**
+     * @desc   : 获取下拉的数据源
+     * @author : 周兴
+     * @date   : 2024/4/9 13:56
+     */
+    getSelectDataSource() {
+      let filters = this.searchContent.filter(it => it.valueKind == 'M-CHOICE' || it.valueKind == 'S-CHOICE');
+      if (filters && filters.length > 0) {
+        filters.forEach(it => {
+          if (it.valueFormat && it.valueFormat.service && it.valueFormat.method) {
+            this.excute(this.$service[it.valueFormat.service],
+              this.$service[it.valueFormat.service][it.valueFormat.method], {}).then(res => {
+              if (res.code === this.$config.SUCCESS_CODE) {
+                let data = []
+                if (res.data && res.data.list) {
+                  data = [...res.data.list]
+                }
+                if (data.length === 0 && res.data && Array.isArray(res.data)) {
+                  data = [...res.data]
+                }
+                it.valueFormat.data = data
+              }
+            })
+          }
+        })
+      }
+    },
+    /**
+     * @desc   : 同一页面的初始化方法
+     * @author : 周兴
+     * @date   : 2024/4/9 12:54
+     */
+    createdInit() {
+      this.setProperty();
+      this.routeObjName = 'detailReport'
+    },
+  },
+  /**
+   * @desc   : 在实例创建完成后被立即同步调用
+   * @author : 周兴
+   * @date   : 2022/3/3 10:32
+   */
+  created() {
+  },
+}
+</script>
+

+ 468 - 0
src/view/report/detail-report/setting.js

@@ -0,0 +1,468 @@
+import i18n from '../../../locale/index';
+import Config from '../../../config/index';
+
+const $t = (name) => {
+  let text = i18n.vm.messages['zh-CN'][name];
+  if (!text) {
+    text = name
+  }
+  return text;
+}
+
+const data = {
+// 销售明细表
+  'order-detail-report': {
+    // 是否显示合计行
+    showFooter: true,
+    // 接口文件
+    serviceStr: 'detailReportService',
+    // 查询方法
+    methodsName: 'getOrderDetailReport',
+    // 查询条件
+    searchContent: [
+      // 订单单号
+      {itemCode: 'orderNo'},
+      // 联系人
+      {itemCode: 'contactName'},
+      // 客户名称
+      {itemCode: 'cusName'},
+      // 客户电话
+      {
+        itemCode: 'cusPhone',
+        valueFormat: {
+          code: 'cusPhone',
+        },
+        valueKind: 'M-SEARCH',
+        magnifierType: Config.MagnifierType.customer,
+      },
+      // 详细地址
+      {itemCode: 'addressFull'},
+      // 送货日期
+      {
+        itemCode: 'deliveryDate',
+        valueFormat: {
+          code: 'deliveryDate',
+        },
+        valueKind: 'DATE_RANGE'
+      },
+      // 制单日期
+      {
+        itemCode: 'makeTime',
+        valueFormat: {
+          code: 'makeTime',
+        },
+        valueKind: 'DATE_RANGE'
+      },
+      // 业务部门
+      {
+        itemCode: 'orgId',
+        itemName: 'orgName',
+        valueFormat: {
+          code: 'orgIdList',
+          service:'commonService',
+          method:'getOrg',
+          data: [],
+          valueKey: 'orgId',
+          labelKey: 'orgName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      // 业务员
+      {
+        itemCode: 'staffId',
+        itemName: 'staffName',
+        valueFormat: {
+          code: 'staffIdList',
+          service:'commonService',
+          method:'getStaff',
+          data: [],
+          valueKey: 'staffId',
+          labelKey: 'staffCodeName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      //商品名称
+      {itemCode: 'skuName'},
+      //商品型号
+      {itemCode: 'skuModel'},
+      // 品牌
+      {
+        itemCode: 'brandIds',
+        valueFormat: {
+          code: 'goodsBrandList',
+          service:'goodsBrandService',
+          method:'selectByCond',
+          data: [],
+          valueKey: 'brandId',
+          labelKey: 'brandName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      // 系列
+      {
+        itemCode: 'series',
+        valueFormat: {
+          code: 'goodsSeriesList',
+          service:'goodsSeriesService',
+          method:'getGoodsSeriesList',
+          data: [],
+          valueKey: 'seriesId',
+          labelKey: 'seriesName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      // 种类
+      {
+        itemCode: 'category',
+        valueFormat: {
+          code: 'goodsCategoryList',
+          service:'goodsCategoryService',
+          method:'selectByCond',
+          data: [],
+          valueKey: 'catId',
+          labelKey: 'catName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      {itemCode: 'flgViewItem',valueKind:'SWITCH',itemName:'查看明细'},
+    ],
+    // 列表列
+    columns: [
+      {field: 'orderNo'},
+      {field: 'cusName'},
+      {field: 'cusPhone'},
+      {field: 'contactName'},
+      {field: 'contactPhone'},
+      {field: 'orderStatusName'},
+      {field: 'addressFull'},
+      {field: 'deliveryDate',type: 'date'},
+      {field: 'orgName'},
+      {field: 'staffName'},
+      {field: 'channelName'},
+      {field: 'cusFromName'},
+      {field: 'makeStaffName'},
+      {field: 'makeTime',type: 'dateTime'},
+      {field: 'sumQuantity',type:'number'},
+      {field: 'sumStandard',type:'number'},
+      {field: 'sumAmount',type:'number'},
+      {field: 'saleDiscount',type:'number'},
+      {field: 'paymentNo'},
+      {field: 'amtReceivable',type:'number'},
+      {field: 'amtHandle',type:'number'},
+      {field: 'amtResidue',type:'number'},
+      {field: 'remarks', width: 'auto'}
+    ],
+    detailColumns:[
+      {field: 'skuName'},
+      {field: 'skuModel'},
+      {field: 'nonStdCode'},
+      {field: 'shortName'},
+      {field: 'catName'},
+      {field: 'seriesName'},
+      {field: 'outNo'},
+      {field: 'outStatusName'},
+      {field: 'whName'},
+      {field: 'itemQty',type:'number'},
+      {field: 'priceStd',type:'number'},
+      {field: 'amtStd',type:'number'},
+      {field: 'priceSale',type:'number'},
+      {field: 'itemAmt',type:'number'},
+      {field: 'priceDiscount',type:'number'},
+      {field: 'outingQty',type:'number'},
+      {field: 'outingAmt',type:'number'},
+      {field: 'outQty',type:'number'},
+      {field: 'outAmt',type:'number'},
+      {field: 'returnQty',type:'number'},
+      {field: 'returnAmt',type:'number'},
+    ]
+  },
+  // 库存查询
+  'ivt-detail-report':{
+    // 是否显示合计行
+    showFooter: true,
+    // 接口文件
+    serviceStr: 'detailReportService',
+    // 查询方法
+    methodsName: 'getIvtDetailReport',
+    // 查询条件
+    searchContent: [
+      {itemCode: 'skuCode'},
+      {itemCode: 'skuName'},
+      {itemCode: 'nonStdCode'},
+      {itemCode: 'whName'},
+      {itemCode: 'skuName'},
+      {itemCode: 'flgViewItem',valueKind:'SWITCH',itemName:'查看明细'},
+    ],
+    // 列表列
+    columns: [
+      {field: 'skuCode'},
+      {field: 'skuName'},
+      {field: 'skuModel'},
+      {field: 'brandName'},
+      {field: 'categoryName'},
+      {field: 'unitName'},
+      {field: 'conversionFactor'},
+      {field: 'seriesName'},
+      {field: 'skuSpec'},
+      {field: 'pricePurchase'},
+      {field: 'priceStandard'},
+      {field: 'priceWholesale'},
+      {field: 'priceLimited'},
+      {field: 'skuImages'},
+      {field: 'nonStdCode'},
+      {field: 'invQty',type: 'number', digits: 2, sum: true},
+      {field: 'outingQty',type: 'number', digits: 2, sum: true},
+      {field: 'usableQty',type: 'number', digits: 2, sum: true},
+      {field: 'whCode'},
+      {field: 'whName'},
+      {field: 'priceInto'},
+      {field: 'remarks', width: 'auto'}
+    ],
+    detailColumns:[
+      {field: 'orgCode1'},
+      {field: 'orgName2'},
+    ]
+  },
+  // 采购明细表
+  'pur-detail-report': {
+    // 是否显示合计行
+    showFooter: true,
+    // 接口文件
+    serviceStr: 'detailReportService',
+    // 查询方法
+    methodsName: 'getPurDetailReport',
+    // 查询条件
+    searchContent: [
+      // 采购单号
+      {itemCode: 'purNo'},
+      // 联系人
+      {itemCode: 'contactName'},
+      // 联系电话
+      {itemCode: 'contactPhone'},
+      // 供应商
+      {
+        itemCode: 'supplierName',
+        valueFormat: {
+          code: 'supIdlist',
+        },
+        valueKind: 'M-SEARCH',
+        magnifierType: Config.MagnifierType.supplier,
+      },
+      // 取货日期
+      {
+        itemCode: 'pickupDate',
+        valueFormat: {
+          code: 'pickupDate',
+        },
+        valueKind: 'DATE_RANGE'
+      },
+      // 业务部门
+      {
+        itemCode: 'orgId',
+        itemName: 'orgName',
+        valueFormat: {
+          code: 'orgIdList',
+          service:'commonService',
+          method:'getOrg',
+          data: [],
+          valueKey: 'orgId',
+          labelKey: 'orgName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      // 业务员
+      {
+        itemCode: 'staffId',
+        itemName: 'staffName',
+        valueFormat: {
+          code: 'staffIdList',
+          service:'commonService',
+          method:'getStaff',
+          data: [],
+          valueKey: 'staffId',
+          labelKey: 'staffCodeName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      //商品名称
+      {itemCode: 'skuName'},
+      //商品型号
+      {itemCode: 'skuModel'},
+      // 品牌
+      {
+        itemCode: 'brandIds',
+        valueFormat: {
+          code: 'goodsBrandList',
+          service:'goodsBrandService',
+          method:'selectByCond',
+          data: [],
+          valueKey: 'brandId',
+          labelKey: 'brandName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      // 系列
+      {
+        itemCode: 'series',
+        valueFormat: {
+          code: 'goodsSeriesList',
+          service:'goodsSeriesService',
+          method:'getGoodsSeriesList',
+          data: [],
+          valueKey: 'seriesId',
+          labelKey: 'seriesName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      // 种类
+      {
+        itemCode: 'category',
+        valueFormat: {
+          code: 'goodsCategoryList',
+          service:'goodsCategoryService',
+          method:'selectByCond',
+          data: [],
+          valueKey: 'catId',
+          labelKey: 'catName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+      {itemCode: 'flgViewItem',valueKind:'SWITCH',itemName:'查看明细'},
+    ],
+    // 列表列
+    columns: [
+      {field: 'purNo'},
+      {field: 'supplierName'},
+      {field: 'orgName'},
+      {field: 'staffName'},
+      {field: 'pickupDate'},
+      {field: 'contactName'},
+      {field: 'contactPhone'},
+      {field: 'purStatusName'},
+      {field: 'makeStaffName'},
+      {field: 'intoingQtySum',type:'number'},
+      {field: 'intoingAmtSum',type:'number'},
+      {field: 'intoQtySum',type:'number'},
+      {field: 'intoAmtSum',type:'number'},
+      {field: 'returnQtySum',type:'number'},
+      {field: 'returnAmtSum',type:'number'},
+      {field: 'amtPayable',type:'number'},
+      {field: 'amtResidue',type:'number'},
+      {field: 'remarks', width: 'auto'}
+    ],
+    detailColumns:[
+      {field: 'skuName'},
+      {field: 'skuModel'},
+      {field: 'nonStdCode'},
+      {field: 'shortName'},
+      {field: 'catName'},
+      {field: 'seriesName'},
+      {field: 'orderNo'},
+      {field: 'intoNo'},
+      {field: 'intoStatus'},
+      {field: 'itemQty',type:'number'},
+      {field: 'pricePur',type:'number'},
+      {field: 'itemAmt',type:'number'},
+      {field: 'intoingQty',type:'number'},
+      {field: 'intoingAmt',type:'number'},
+      {field: 'intoQty',type:'number'},
+      {field: 'intoAmt',type:'number'},
+      {field: 'returnQty',type:'number'},
+      {field: 'returnAmt',type:'number'},
+    ]
+  },
+  // 出库明细报表
+  'out-detail-report': {
+    // 是否显示合计行
+    showFooter: true,
+    // 接口文件
+    serviceStr: 'detailReportService',
+    // 查询方法
+    methodsName: 'getOutboundDetailReport',
+    // 查询条件
+    searchContent: [
+      {itemCode: 'orgCode'},
+      {itemCode: 'orgName'},
+      {
+        itemCode: 'staffId',
+        itemName: '业务员',
+        valueFormat: {
+          code: 'staffIdList',
+          service:'commonService',
+          method:'getStaff',
+          data: [],
+          valueKey: 'staffId',
+          labelKey: 'staffCodeName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+
+      {itemCode: 'flgViewItem',valueKind:'SWITCH',itemName:'查看明细'},
+    ],
+
+    // 列表列
+    columns: [
+      {field: 'orgCode'},
+      {field: 'orgName'},
+      {field: 'remarks', width: 'auto'}
+    ],
+    detailColumns:[
+      {field: 'orgCode1'},
+      {field: 'orgName2'},
+    ]
+  },
+  // 入库明细报表
+  'entry-detail-report': {
+    // 是否显示合计行
+    showFooter: true,
+    // 接口文件
+    serviceStr: 'detailReportService',
+    // 查询方法
+    methodsName: 'inbound_detail_report',
+    // 查询条件
+    searchContent: [
+      {itemCode: 'orgCode'},
+      {itemCode: 'orgName'},
+      {
+        itemCode: 'staffId',
+        itemName: '业务员',
+        valueFormat: {
+          code: 'staffIdList',
+          service:'commonService',
+          method:'getStaff',
+          data: [],
+          valueKey: 'staffId',
+          labelKey: 'staffCodeName',
+        },
+        valueKind: 'M-CHOICE'
+      },
+
+      {itemCode: 'flgViewItem',valueKind:'SWITCH',itemName:'查看明细'},
+    ],
+
+    // 列表列
+    columns: [
+      {field: 'orgCode'},
+      {field: 'orgName'},
+      {field: 'remarks', width: 'auto'}
+    ],
+    detailColumns:[
+      {field: 'orgCode1'},
+      {field: 'orgName2'},
+    ]
+  },
+}
+
+
+export const setSetting = (services, type) => {
+  let setting = data[type];
+  if (services && setting) {
+    setting.service = services[setting.serviceStr]
+  }
+  return setting;
+}
+
+
+export default {
+  setSetting: setSetting,
+}

+ 0 - 3
src/view/sale/cus-receipt/form.vue

@@ -89,9 +89,6 @@ export default {
       loading: false,
       negativeFlag: false,
       showEditTable: true,
-      //控制客户是否可以输入
-      readonlyFlag: true,
-      allCanNoEdit: false, //是否所有的都不允许编辑
       // 画面表单数据
       formData: {
         accDate: new Date(),

+ 3 - 3
src/view/sale/cus-receipt/index.vue

@@ -75,8 +75,8 @@ export default {
   data() {
     let self = this
     return {
-      tableData: [],
-      tableDataDetail_rpItem: [],
+      tableData: null,
+      tableDataDetail_rpItem: null,
       searchContent: [
         {
           itemCode: '收款单号-文本',
@@ -227,7 +227,7 @@ export default {
      * @date   : 2024-02-20 15:53
      */
     getData(params) {
-      this.tableData = [];
+      this.tableData = null;
       this.tableDataDetail_rpItem = null;
       return this.excute(this.$service.cusReceiptService, this.$service.cusReceiptService.selectByCond, params)
     },

+ 46 - 5
src/view/sale/order-out/form.vue

@@ -60,6 +60,16 @@
             <DatePickerPop v-model="formData.outDate"
                            :short-cut-flag="true"/>
           </DkFormItem>
+          <!--自动出库标识-->
+          <DkFormItem prop="autoOutFlag" v-show="showAutoFlag">
+            <template>
+              <i-switch v-model="formData.flgAutoHandle" @on-change="changeOutStatus"
+                        :disabled="type === $config.formMode.handle">
+                <span slot="open"></span>
+                <span slot="close"></span>
+              </i-switch>
+            </template>
+          </DkFormItem>
           <!--单据备注-->
           <DkFormItem prop="remarks">
             <InputPop ref="remarks" v-model="formData.remarks"
@@ -116,9 +126,9 @@ export default {
   data() {
     let self = this
     return {
-      allCanNoEdit: false, //是否所有的都不允许编辑
-      currentRow: null,// 表格中的当前行
-      // 画面表单数据
+      showAutoFlag: true, //是否显示自动办理出库标识
+      showOutDate: true, //是否显示自动办理出库标识
+      currentRow: null,   // 表格中的当前行
       formData: {
         outId: null,
         outNo: null,
@@ -304,6 +314,24 @@ export default {
       }
     },
     /**
+     * @desc   : 自动出库标识变更
+     * @author : 付斌
+     * @date   : 2024-04-11 14:47
+     */
+    changeOutStatus() {
+      if (this.type === this.$config.formMode.add) {
+        if (this.formData.flgAutoHandle) {
+          this.formData.outDate = new Date().format("yyyy-MM-dd")
+          this.showOutDate = true
+        } else {
+          this.formData.outDate = null
+          this.showOutDate = false
+        }
+      } else {
+        this.formData.outDate = new Date().format("yyyy-MM-dd")
+      }
+    },
+    /**
      * @desc   : 通过id查询
      * @author : 付斌
      * @date   : 2022/03/04 13:17
@@ -329,6 +357,12 @@ export default {
         if (this.type === this.$config.formMode.add) {
           this.goodsFootFormData.sumOutingQty = this.formData.sumQuantity;
           this.goodsFootFormData.sumOutingAmt = this.formData.sumAmount;
+          //系统自动办理出库
+          if (this.$store.state.user.setting[this.$config.settingCode.IVT001] == 1) {
+            this.formData.flgAutoHandle = true;
+          } else {
+            this.formData.flgAutoHandle = false;
+          }
         } else if (this.type === this.$config.formMode.edit) {
           this.goodsFootFormData.sumOutingQty = this.formData.outingQty;
           this.goodsFootFormData.sumOutingAmt = this.formData.outingAmt;
@@ -342,7 +376,6 @@ export default {
         if (!this.formData.makeStaff) {
           this.formData.makeStaff = this.$store.state.user.id;
         }
-        this.formData.flgAutoHandle = true;
       }
     },
     /**
@@ -402,7 +435,7 @@ export default {
     saveData() {
       if (this.type === this.$config.formMode.add) {
         return this.excute(this.$service.orderOutService, this.$service.orderOutService.outboundInsert, this.params);
-      } else if (this.type === this.$config.formMode.edit){
+      } else if (this.type === this.$config.formMode.edit) {
         return this.excute(this.$service.orderOutService, this.$service.orderOutService.outboundUpdate, this.params);
       }
     },
@@ -426,6 +459,14 @@ export default {
   created() {
     this.focusItem = 'outId';    // 给第一个组件赋值,可以在混入中自动去聚焦
     this.primaryKey = 'outId'  // 设置主键Id
+
+    //设置默认值
+    if (this.$route.params.id) {
+      // 出库办理
+      if (this.type === this.$config.formMode.handle) {
+        this.showAutoFlag = false;
+      }
+    }
   },
 }
 </script>

+ 48 - 11
src/view/sale/order-out/formTogether.vue

@@ -99,6 +99,16 @@
             <DatePickerPop v-model="formData.outDate"
                            :short-cut-flag="true"/>
           </DkFormItem>
+          <!--自动出库标识-->
+          <DkFormItem prop="autoOutFlag" v-show="showAutoFlag">
+            <template>
+              <i-switch v-model="formData.flgAutoHandle" @on-change="changeOutStatus"
+                        :disabled="type === $config.formMode.handle">
+                <span slot="open"></span>
+                <span slot="close"></span>
+              </i-switch>
+            </template>
+          </DkFormItem>
           <!--单据备注-->
           <DkFormItem prop="remarks">
             <InputPop ref="remarks" v-model="formData.remarks"
@@ -154,7 +164,8 @@ export default {
   data() {
     let self = this
     return {
-      allCanNoEdit: false, //是否所有的都不允许编辑
+      showAutoFlag: true, //是否显示自动办理出库标识
+      showOutDate: true, //是否显示自动办理出库标识
       currentRow: null,// 表格中的当前行
       // 画面表单数据
       formData: {
@@ -555,15 +566,30 @@ export default {
       }
     },
     /**
+     * @desc   : 自动出库标识变更
+     * @author : 付斌
+     * @date   : 2024-04-11 14:47
+     */
+    changeOutStatus() {
+      if (this.type === this.$config.formMode.addTogether) {
+        if (this.formData.flgAutoHandle) {
+          this.formData.outDate = new Date().format("yyyy-MM-dd")
+          this.showOutDate = true
+        } else {
+          this.formData.outDate = null
+          this.showOutDate = false
+        }
+      } else {
+        this.formData.outDate = new Date().format("yyyy-MM-dd")
+      }
+    },
+    /**
      * @desc   : 通过id查询
      * @author : 付斌
      * @date   : 2022/03/04 13:17
      */
     detail(id) {
-      //如果是新建用订单ID,编辑、办理用出库单ID
-      if (this.type === this.$config.formMode.add) {
-        return this.excuteNoParam(this.$service.orderService, this.$service.orderService.getOrderForOut, [id]);
-      } else if (this.type === this.$config.formMode.edit) {
+      if (this.type === this.$config.formMode.edit) {
         return this.excuteNoParam(this.$service.orderOutService, this.$service.orderOutService.getOutboundForUpdate, [id]);
       }
     },
@@ -577,9 +603,16 @@ export default {
         this.formData = data["data"];
         this.formData.itemList = data["dataItem"];
 
-        if (this.type === this.$config.formMode.add) {
+        if (this.type === this.$config.formMode.addTogether) {
           this.goodsFootFormData.sumOutingQty = this.formData.sumQuantity;
           this.goodsFootFormData.sumOutingAmt = this.formData.sumAmount;
+
+          //系统自动办理出库
+          if (this.$store.state.user.setting[this.$config.settingCode.IVT001] == 1) {
+            this.formData.flgAutoHandle = true;
+          } else {
+            this.formData.flgAutoHandle = false;
+          }
         } else if (this.type === this.$config.formMode.edit) {
           this.goodsFootFormData.sumOutingQty = this.formData.outingQty;
           this.goodsFootFormData.sumOutingAmt = this.formData.outingAmt;
@@ -624,10 +657,6 @@ export default {
      * @date   : 2023/6/25 14:31
      */
     setParams(arg) {
-      if (this.type === this.$config.formMode.add) {
-        this.formData.fromId = this.formData.orderId;
-        this.formData.fromNo = this.formData.orderNo;
-      }
       this.formData.outingQty = this.goodsFootFormData.sumOutingQty;
       this.formData.outingAmt = this.goodsFootFormData.sumOutingAmt;
       let itemTable = this.$refs['goodsTable'].getTableDataFilter();
@@ -646,7 +675,7 @@ export default {
      * @date   : 2023/6/25 14:31
      */
     saveData() {
-      if (this.type === this.$config.formMode.add || this.type === this.$config.formMode.addTogether) {
+      if (this.type === this.$config.formMode.addTogether) {
         return this.excute(this.$service.orderOutService, this.$service.orderOutService.outboundInsert, this.params);
       } else if (this.type === this.$config.formMode.edit) {
         return this.excute(this.$service.orderOutService, this.$service.orderOutService.outboundUpdate, this.params);
@@ -672,6 +701,14 @@ export default {
   created() {
     this.focusItem = 'outId';    // 给第一个组件赋值,可以在混入中自动去聚焦
     this.primaryKey = 'outId'  // 设置主键Id
+
+    //设置默认值
+    if (this.$route.params.id) {
+      // 出库办理
+      if (this.type === this.$config.formMode.handle) {
+        this.showAutoFlag = false;
+      }
+    }
   },
 }
 </script>

+ 39 - 3
src/view/sale/order-return/form.vue

@@ -60,6 +60,16 @@
             <DatePickerPop v-model="formData.outDate"
                            :short-cut-flag="true"/>
           </DkFormItem>
+          <!--自动出库标识-->
+          <DkFormItem prop="autoOutFlag" v-show="showAutoFlag">
+            <template>
+              <i-switch v-model="formData.flgAutoHandle" @on-change="changeOutStatus"
+                        :disabled="type === $config.formMode.handle">
+                <span slot="open"></span>
+                <span slot="close"></span>
+              </i-switch>
+            </template>
+          </DkFormItem>
           <!--单据备注-->
           <DkFormItem prop="remarks">
             <InputPop ref="remarks" v-model="formData.remarks" :readonly="checkColumnIsEdit('remarks')"
@@ -115,8 +125,8 @@ export default {
   data() {
     let self = this
     return {
-      loading: false,
-      allCanNoEdit: false, //是否所有的都不允许编辑
+      showAutoFlag: true, //是否显示自动办理出库标识
+      showOutDate: true, //是否显示自动办理出库标识
       // 画面表单数据
       formData: {
         cpId: this.$store.state.user.cpId,
@@ -257,6 +267,24 @@ export default {
       }
     },
     /**
+     * @desc   : 自动出库标识变更
+     * @author : 付斌
+     * @date   : 2024-04-11 14:47
+     */
+    changeOutStatus() {
+      if (this.type === this.$config.formMode.add) {
+        if (this.formData.flgAutoHandle) {
+          this.formData.outDate = new Date().format("yyyy-MM-dd")
+          this.showOutDate = true
+        } else {
+          this.formData.outDate = null
+          this.showOutDate = false
+        }
+      } else {
+        this.formData.outDate = new Date().format("yyyy-MM-dd")
+      }
+    },
+    /**
      * @desc   : 通过id查询
      * @author : 付斌
      * @date   : 2022/03/04 13:17
@@ -303,7 +331,15 @@ export default {
 
         this.goodsFootFormData.sumQuantity = this.formData.outingQty;
         this.goodsFootFormData.sumAmount = this.formData.outingAmt;
-        this.formData.flgAutoHandle = true;
+
+        if (this.type != this.$config.formMode.edit) {
+          //系统自动办理出库
+          if (this.$store.state.user.setting[this.$config.settingCode.IVT001] == 1) {
+            this.formData.flgAutoHandle = true;
+          } else {
+            this.formData.flgAutoHandle = false;
+          }
+        }
       }
     },
     /**

+ 39 - 4
src/view/sale/order-return/formOther.vue

@@ -99,6 +99,16 @@
             <DatePickerPop v-model="formData.outDate"
                            :short-cut-flag="true"/>
           </DkFormItem>
+          <!--自动出库标识-->
+          <DkFormItem prop="autoOutFlag" v-show="showAutoFlag">
+            <template>
+              <i-switch v-model="formData.flgAutoHandle" @on-change="changeOutStatus"
+                        :disabled="type === $config.formMode.handle">
+                <span slot="open"></span>
+                <span slot="close"></span>
+              </i-switch>
+            </template>
+          </DkFormItem>
           <!--单据备注-->
           <DkFormItem prop="remarks">
             <InputPop ref="remarks" v-model="formData.remarks" :readonly="checkColumnIsEdit('remarks')"
@@ -153,8 +163,8 @@ export default {
   data() {
     let self = this
     return {
-      loading: false,
-      allCanNoEdit: false, //是否所有的都不允许编辑
+      showAutoFlag: true, //是否显示自动办理出库标识
+      showOutDate: true, //是否显示自动办理出库标识
       // 画面表单数据
       formData: {
         cpId: this.$store.state.user.cpId,
@@ -535,6 +545,24 @@ export default {
       }
     },
     /**
+     * @desc   : 自动出库标识变更
+     * @author : 付斌
+     * @date   : 2024-04-11 14:47
+     */
+    changeOutStatus() {
+      if (this.type === this.$config.formMode.addTogether) {
+        if (this.formData.flgAutoHandle) {
+          this.formData.outDate = new Date().format("yyyy-MM-dd")
+          this.showOutDate = true
+        } else {
+          this.formData.outDate = null
+          this.showOutDate = false
+        }
+      } else {
+        this.formData.outDate = new Date().format("yyyy-MM-dd")
+      }
+    },
+    /**
      * @desc   : 通过id查询
      * @author : 付斌
      * @date   : 2022/03/04 13:17
@@ -561,7 +589,6 @@ export default {
      * @date   : 2024-03-03 9:33
      */
     setValuesByEdit(data) {
-      console.log("orderOutReturnService", data)
       if (data) {
         this.formData = data["data"];
         this.formData.itemList = data["dataItem"];
@@ -581,7 +608,15 @@ export default {
 
         this.goodsFootFormData.sumQuantity = this.formData.outingQty;
         this.goodsFootFormData.sumAmount = this.formData.outingAmt;
-        this.formData.flgAutoHandle = true;
+
+        if (this.type === this.$config.formMode.addOther) {
+          //系统自动办理出库
+          if (this.$store.state.user.setting[this.$config.settingCode.IVT001] == 1) {
+            this.formData.flgAutoHandle = true;
+          } else {
+            this.formData.flgAutoHandle = false;
+          }
+        }
       }
     },
     /**

+ 193 - 120
src/view/sale/order/form.vue

@@ -76,25 +76,6 @@
                          @ok="staffOk($event)"
                          :type="this.$config.MagnifierType.staff"/>
           </DkFormItem>
-
-          <!--          &lt;!&ndash;业务部门&ndash;&gt;-->
-          <!--          <DkFormItem prop="orgId" :label="$t('orgId')" :required="true">-->
-          <!--            <SelectMagnifier v-model="formData.orgId" :display-text="formData.orgName"-->
-          <!--                             :type="this.$config.MagnifierType.org"-->
-          <!--                             @ok="orgOk"-->
-          <!--                             :readonly="checkColumnIsEdit('orgId')"-->
-          <!--                             :disabled="checkColumnIsEdit('orgId')"-->
-          <!--                             :multiple="false"/>-->
-          <!--          </DkFormItem>-->
-          <!--          &lt;!&ndash;业务员&ndash;&gt;-->
-          <!--          <DkFormItem prop="staffId" :label="$t('staffId')" :required="true">-->
-          <!--            <SelectMagnifier v-model="formData.staffId" :display-text="formData.staffName"-->
-          <!--                             :type="this.$config.MagnifierType.staff"-->
-          <!--                             @ok="staffOk"-->
-          <!--                             :readonly="checkColumnIsEdit('staffId')"-->
-          <!--                             :disabled="checkColumnIsEdit('staffId')"-->
-          <!--                             :multiple="false"/>-->
-          <!--          </DkFormItem>-->
           <!--客户来源-->
           <DkFormItem prop="cusFrom" :required="true">
             <SelectPop v-model="formData.cusFrom" ref="cusFrom" :multiple="false"
@@ -195,41 +176,36 @@ export default {
   data() {
     let self = this
     return {
-      setCustomerFlag: false,  // 是否是选择客户设置以及编辑时设置
-      loading: false,
-      // 画面表单数据
       formData: {
-        orderId: null, //订单Id
+        orderId: null,
         orderNo: null,
-        orderStatus: self.$config.orderStatus.done,//订单状态
-        cusId: null,//客户Id
+        cusId: null,
         cusName: null,
         cusPhone: null,
         contactName: null,
         contactPhone: null,
-        customerDistrict: null,         // 客户区域
-        addressArea: null,              // 行政区划
-        addressGcj02: null,             // 经纬度
-        addressName: null,              // 小区
-        addressNo: null,                // 门牌号
-        addressFull: null,              // 详细地址
-        staffList: [],//存放从业务员id和分配百分比
-        staffId: null,
-        staffName: null,
-        staffCode: null,
-        orgList: [],//存放从业务部门id和分配百分比
-        orgId: null,
-        orgName: null,
-        orgCode: null,
-        salesChannel: null, //销售渠道
-        cusFrom: null,//客户来源
+        customerDistrict: null,   // 客户区域
+        addressArea: null,        // 行政区划
+        addressGcj02: null,       // 经纬度
+        addressName: null,        // 小区
+        addressNo: null,          // 门牌号
+        addressFull: null,        // 详细地址
+        salesChannel: null,       //销售渠道
+        cusFrom: null,            //客户来源
         deliveryDate: new Date().addDays(1),//送货时间
+        annexPaths: null,
         remarks: null,
         itemList: [],
         deleteItemList: [],
         receiptList: [],
-        annexPaths: null,
+        staffList: [],    //存放从业务员id和分配百分比
+        orgList: [],      //存放从业务部门id和分配百分比
+        orderStatus: self.$config.orderStatus.done, //订单状态
         outStatus: self.$config.outStatus.daiChuKu,
+        staffId: self.$store.state.user.id,
+        staffName: self.$store.state.user.staffName,
+        orgId: self.$store.state.user.orgId,
+        orgName: self.$store.state.user.orgName,
         makeStaff: self.$store.state.user.id,
       },
       //商品合计信息
@@ -249,6 +225,8 @@ export default {
       cityData: [],
       channelList: [],
       cusFromList: [],
+      canUseWhList: [],     // 可用仓库列表
+      defaultWh: null,      // 默认仓库
       addOrderItemColumns: [
         {
           field: 'skuModel',
@@ -279,7 +257,6 @@ export default {
           digits: 2,
           formula: {
             itemAmt: ['itemQty*priceSale', 'itemQty', 'priceSale'],
-            amtStd: ['itemQty*priceStd', 'itemQty', 'priceStd'],
             priceDiscount: ['priceSale/priceStd*100', 'priceSale', 'priceStd'],
           },
         },
@@ -295,6 +272,26 @@ export default {
             priceDiscount: ['priceSale/priceStd*100', 'priceSale', 'priceStd'],
           },
         },
+        // 仓库
+        {
+          field: 'whName',
+          type: 'tableSelect',
+          multiple: false,
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.warehouse,
+          otherSearchParam: () => {
+            return {
+              skuId: self.currentRow?.skuId,
+              nonStdCode: self.currentRow?.nonStdCode,
+              orgId: self.formData.orgId,
+            }
+          },
+          fieldUpdate: [
+            {updateField: 'whId', valueFiled: 'whId'},
+            {updateField: 'whName', valueFiled: 'whName'},
+          ],
+          searchDetailFlag: true
+        },
         //金额
         {
           field: 'itemAmt',
@@ -302,7 +299,7 @@ export default {
           digits: 2,
           number: true,
           sum: true,
-          formulaLate:true,
+          formulaLate: true,
           formula: {
             priceSale: ['itemAmt/itemQty', 'itemAmt', 'itemQty'],
             priceDiscount: ['itemAmt/itemQty/priceStd*100', 'itemAmt', 'itemQty', 'priceStd'],
@@ -360,7 +357,6 @@ export default {
           digits: 2,
           formula: {
             itemAmt: ['itemQty*priceSale', 'itemQty', 'priceSale'],
-            amtStd: ['itemQty*priceStd', 'itemQty', 'priceStd'],
             priceDiscount: ['priceSale/priceStd*100', 'priceSale', 'priceStd'],
           },
         },
@@ -376,6 +372,26 @@ export default {
             priceDiscount: ['priceSale/priceStd*100', 'priceSale', 'priceStd'],
           },
         },
+        // 仓库
+        {
+          field: 'whName',
+          type: 'tableSelect',
+          multiple: false,
+          sortBoolean: false,
+          dataType: self.$config.tableSelectType.warehouse,
+          otherSearchParam: () => {
+            return {
+              skuId: self.currentRow?.skuId,
+              nonStdCode: self.currentRow?.nonStdCode,
+              orgId: self.formData.orgId,
+            }
+          },
+          fieldUpdate: [
+            {updateField: 'whId', valueFiled: 'whId'},
+            {updateField: 'whName', valueFiled: 'whName'},
+          ],
+          searchDetailFlag: true
+        },
         //金额
         {
           field: 'itemAmt',
@@ -453,7 +469,6 @@ export default {
           field: 'remarks', type: 'text', equal: true,
         },
       ],
-      receiptList: [],//定金
     }
   },
 
@@ -464,10 +479,12 @@ export default {
      * @date   : 2024-02-20 15:53
      */
     initData() {
-      //获取渠道
-      this.getChannel()
-      //获取数据字典
-      this.getDictionaryData()
+      // 获取渠道
+      this.getChannel();
+      // 获取数据字典
+      this.getDictionaryData();
+      // 获取可用的仓库列表及默认仓库
+      this.getCanUseWh();
 
       // 设置默认业务员业务部门
       this.formData.staffList = []
@@ -486,11 +503,6 @@ export default {
       org.allocationRatio = 100;
       org.ownerFlag = true;
       this.formData.orgList.push(org);
-
-      this.formData.staffId = this.$store.state.user.id
-      this.formData.staffName = this.$store.state.user.staffName
-      this.formData.orgId = this.$store.state.user.orgId
-      this.formData.orgName = this.$store.state.user.orgName
     },
     /**
      * @desc   : 获取渠道
@@ -520,7 +532,7 @@ export default {
       })
     },
     /**
-     *   @desc   : 获取业务员相关
+     *   @desc   : 业务部门OK
      *   @date   : 2022/5/28 10:43
      *   @author : 付斌
      */
@@ -528,14 +540,16 @@ export default {
       if (rows && rows.length > 0) {
         this.formData.orgList = []
         for (let i of rows) {
-          //找到主业务员
+          //找到主部门
           if (i.ownerFlag) {
             this.formData.orgId = i.orgId
             this.formData.orgCode = i.orgCode
             this.formData.orgName = i.orgName
             this.formData.allocationRatio = i.allocationRatio
+            // 获取可用的仓库列表及默认仓库
+            this.getCanUseWh(i.orgId);
           }
-          //存放从业务员id和分配比
+          //存放从部门id和分配比
           this.formData.orgList.push({
             orgId: i.orgId,
             orgCode: i.orgCode,
@@ -547,7 +561,7 @@ export default {
       }
     },
     /**
-     *   @desc   : 获取业务员相关
+     *   @desc   : 业务员OK
      *   @date   : 2022/5/28 10:43
      *   @author : 付斌
      */
@@ -632,7 +646,8 @@ export default {
         this.formData.addressGcj02 = value.addressGcj02;
         this.formData.addressFull = value.addressFull + (this.formData.addressNo ? this.formData.addressNo : '');
       }
-    },
+    }
+    ,
     /**
      *   @desc   : 拼写详细地址
      *   @date   : 2022/6/9 10:08
@@ -640,7 +655,7 @@ export default {
      */
     setAddressFull(e) {
       // 客户区域有值才会拼接详细地址
-      if (!this.setCustomerFlag && this.formData.customerDistrict && this.formData.customerDistrict.addressFull) {
+      if (this.formData.customerDistrict && this.formData.customerDistrict.addressFull) {
         this.formData.addressFull = this.formData.customerDistrict.addressFull + (this.formData.addressNo ? this.formData.addressNo : '')
       }
     },
@@ -650,7 +665,6 @@ export default {
      * @date   : 2024-02-27 10:36
      */
     clearCutomer() {
-      this.setCustomerFlag = true;
       this.formData.customerDistrict = null;
       this.formData.cusId = null
       this.formData.cusCode = null
@@ -662,28 +676,15 @@ export default {
       this.addressArea = []
       this.formData.addressName = null
       this.formData.addressNo = null
-
       this.formData.latitude = null
       this.formData.longitude = null
       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   : 获取商品表格中数量、金额后计算总单信息
@@ -691,26 +692,33 @@ export default {
      *   @author : 付斌
      */
     getTotals(field, row, rowIndex) {
-      let table = this.$refs['goodsTable'].getTableDataFilter();
+      let table = this.$refs['goodsTable'].tableData
       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["itemQty"] || row["itemQty"] == '') {
+            this.$set(row, 'itemQty', 0);
           }
-          if (row["itemAmt"]) {
-            sumAmount += parseFloat(row["itemAmt"]);
+          if (!row["itemAmt"] || row["itemQty"] == '') {
+            this.$set(row, 'itemAmt', 0);
           }
+          sumQuantity += parseFloat(row["itemQty"]);
+          sumAmount += parseFloat(row["itemAmt"]);
           this.$set(row, 'amtStd', parseFloat(row["itemQty"]) * parseFloat(row["priceStd"]));
           sumStandard += parseFloat(row["amtStd"]);
+
+          if (!row["whId"] || row["whId"] == '') {
+            this.$set(row, 'whId', this.defaultWh.whId);
+            this.$set(row, 'whName', this.defaultWh.whName);
+          }
         })
-        this.goodsFootFormData.sumQuantity = sumQuantity;
-        this.goodsFootFormData.sumAmount = sumAmount;
-        this.goodsFootFormData.sumStandard = sumStandard;
-        this.goodsFootFormData.saleDiscount = (sumAmount / sumStandard * 100).toFixed(2);
       }
+      this.goodsFootFormData.sumQuantity = sumQuantity;
+      this.goodsFootFormData.sumAmount = sumAmount;
+      this.goodsFootFormData.sumStandard = sumStandard;
+      this.goodsFootFormData.saleDiscount = (sumAmount / sumStandard * 100).toFixed(2);
     },
     /**
      * @desc   : 通过id查询
@@ -823,46 +831,61 @@ export default {
      */
     clear() {
       let self = this
-      this.setCustomerFlag = true;
       this.formData = {
-        orderId: null, //订单Id
+        orderId: null,
         orderNo: null,
-        orderStatus: self.$config.orderStatus.done,//订单状态
-        cusId: null,//客户Id
+        cusId: null,
         cusName: null,
         cusPhone: null,
         contactName: null,
         contactPhone: null,
-        customerDistrict: null,         // 客户区域
-        addressArea: null,              // 行政区划
-        addressGcj02: null,             // 经纬度
-        addressName: null,              // 小区
-        addressNo: null,                // 门牌号
-        addressFull: null,              // 详细地址
-        staffList: [],//存放从业务员id和分配百分比
-        staffId: null,
-        staffName: null,
-        staffCode: null,
-        orgList: [],//存放从业务部门id和分配百分比
-        orgId: null,
-        orgName: null,
-        orgCode: null,
-        salesChannel: null, //销售渠道
-        cusFrom: null,//客户来源
+        customerDistrict: null,   // 客户区域
+        addressArea: null,        // 行政区划
+        addressGcj02: null,       // 经纬度
+        addressName: null,        // 小区
+        addressNo: null,          // 门牌号
+        addressFull: null,        // 详细地址
+        salesChannel: null,       //销售渠道
+        cusFrom: null,            //客户来源
         deliveryDate: new Date().addDays(1),//送货时间
+        annexPaths: null,
         remarks: null,
         itemList: [],
         deleteItemList: [],
         receiptList: [],
-        annexPaths: null,
+        staffList: [],    //存放从业务员id和分配百分比
+        orgList: [],      //存放从业务部门id和分配百分比
+        orderStatus: self.$config.orderStatus.done, //订单状态
         outStatus: self.$config.outStatus.daiChuKu,
+        staffId: self.$store.state.user.id,
+        staffName: self.$store.state.user.staffName,
+        orgId: self.$store.state.user.orgId,
+        orgName: self.$store.state.user.orgName,
         makeStaff: self.$store.state.user.id,
       }
+
+      // 设置默认业务员业务部门
+      this.formData.staffList = []
+      let staff = {}
+      staff.staffId = this.$store.state.user.staffId
+      staff.staffCode = this.$store.state.user.staffCode
+      staff.staffName = this.$store.state.user.staffName
+      staff.allocationRatio = 100;
+      staff.ownerFlag = true;
+      this.formData.staffList.push(staff);
+
+      this.formData.orgList = []
+      let org = {}
+      org.orgId = this.$store.state.user.orgId
+      org.orgName = this.$store.state.user.orgName
+      org.allocationRatio = 100;
+      org.ownerFlag = true;
+      this.formData.orgList.push(org);
+
       // 清空客户区域
       if (this.$refs.customerDistrict) {
         this.$refs.customerDistrict.clear();
       }
-      this.setCustomerFlag = false;
     },
     /**
      * @desc   : 判断列是否可以编辑
@@ -874,19 +897,69 @@ export default {
         return true;
       }
     },
-    // /**
-    //  * @desc   : 修改客户电话后,清除当前客户信息
-    //  * @author : 付斌
-    //  * @date   : 2022-08-01 14:39
-    //  */
-    // customerPhoneChange(e, change) {
-    //   // 文本改变时不清空数据
-    //   if (!change && this.formData.cusId) {
-    //     this.clearCutomer()
-    //   }
-    // },
-  }
-  ,
+
+    // region 私有方法
+    /**
+     * @desc   : 获取可用的仓库列表及默认仓库
+     * @author : 付斌
+     * @date   : 2024-03-02 11:15
+     */
+    getCanUseWh(orgId) {
+      if (!orgId) {
+        orgId = this.$store.state.user.orgId
+      }
+      let params = {orgId: orgId}
+      this.excute(this.$service.commonService, this.$service.commonService.getOrgWh, params, false).then(res => {
+          if (res.code === this.$config.SUCCESS_CODE) {
+            this.canUseWhList = [...res.data]
+            let list = res.data.filter(it => it.flgDefault)
+            if (list.length > 0) {
+              this.defaultWh = list[0]
+              // 设置默认仓库
+              this.setDefaultWh()
+            } else {
+              this.excute(this.$service.commonService, this.$service.commonService.getWarehouse, {}, false).then(res => {
+                if (res.code === this.$config.SUCCESS_CODE) {
+                  this.canUseWhList = [...res.data]
+                  let list = res.data.filter(it => it.flgDefault)
+                  if (list.length > 0) {
+                    this.defaultWh = list[0]
+                    // 设置默认仓库
+                    this.setDefaultWh()
+                  }
+                }
+              })
+            }
+          }
+        }
+      )
+    },
+    /**
+     * @desc   : 设置默认仓库
+     * @author : 付斌
+     * @date   : 2024-04-11 13:56
+     */
+    setDefaultWh() {
+      let table = this.$refs['goodsTable'].tableData
+      if (table && table.length > 0) {
+        table.forEach(row => {
+          if (row.skuId) {
+            if (row.whId) {
+              let list2 = this.canUseWhList.filter(it => it.whId === row.whId)
+              if (list2.length == 0) {
+                this.$set(row, 'whId', this.defaultWh.whId);
+                this.$set(row, 'whName', this.defaultWh.whName);
+              }
+            } else {
+              this.$set(row, 'whId', this.defaultWh.whId);
+              this.$set(row, 'whName', this.defaultWh.whName);
+            }
+          }
+        })
+      }
+    },
+    // endregion 私有方法
+  },
   /**
    * @desc   : 在实例创建完成后被立即同步调用
    * @author : 付斌

+ 1 - 0
src/view/sale/order/index.vue

@@ -81,6 +81,7 @@
             <DkTableColumn field="priceSale" :digits="2" dataType="number" sum/>
             <DkTableColumn field="itemAmt" :digits="2" dataType="number" sum/>
             <DkTableColumn field="priceDiscount" :digits="2" dataType="number" sum/>
+            <DkTableColumn field="whName"/>
             <DkTableColumn field="outingQty" dataType="number" sum/>
             <DkTableColumn field="outingAmt" :digits="2" dataType="number" sum/>
             <DkTableColumn field="outQty" dataType="number" sum/>