Przeglądaj źródła

Merge branch 'develop_szhjyh02' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_xsth

数字货架功能
lilei 2 lat temu
rodzic
commit
d60cff9679

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1660096799914
+  "version": 1660101207563
 }

+ 29 - 0
src/api/approveStore.js

@@ -0,0 +1,29 @@
+import { axios } from '@/utils/request'
+
+//  客户类型列表  分页
+export const xprhStoreApplyQueryPage = (params) => {
+  const url = `/xprhStoreApply/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 审核
+export const xprhStoreApplyAudit = (params) => {
+  const url = `/xprhStoreApply/audit`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 门店认证详情
+export const xprhStoreApplyDetail = (params) => {
+  return axios({
+    url: `/xprhStoreApply/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}

+ 11 - 0
src/api/data.js

@@ -115,6 +115,17 @@ export const getArea = (params) => {
   }
 }
 
+// 获取省市区,兼容小程序数据
+export const getAreaCgj = (params) => {
+  if(params.type == '2' || params.parentId){
+    return axios({
+      url: `/areaCgj/queryList`,
+      data: params,
+      method: 'post'
+    })
+  }
+}
+
 // 首页 导航指引合计
 export const bizStateCount = (params) => {
   return axios({

+ 9 - 0
src/api/shelf.js

@@ -105,3 +105,12 @@ export const shelfPutOutDetailList = (params) => {
     method: 'post'
   })
 }
+
+// 修改完成标识
+export const modifFinishFlag = (params) => {
+  return axios({
+    url: `/shelf/modifFinishFlag `,
+    data: params,
+    method: 'post'
+  })
+}

+ 7 - 0
src/api/shelfRecall.js

@@ -37,6 +37,13 @@ export const shelfRecallCancel = params => {
     method: 'post'
   })
 }
+// 删除回调单
+export const shelfRecallDelete = params => {
+  return axios({
+    url: `/shelfRecall/delete/${params.recallBillSn}`,
+    method: 'get'
+  })
+}
 // 保存 调回单
 export const shelfRecallSave = params => {
   return axios({

+ 7 - 0
src/api/shelfReplenish.js

@@ -35,6 +35,13 @@ export const shelfReplenishCancel = (params) => {
     method: 'post'
   })
 }
+// 删除补货单
+export const shelfReplenishDelete = (params) => {
+  return axios({
+    url: `/shelfReplenish/delete/${params.replenishBillSn}`,
+    method: 'get'
+  })
+}
 //  补货单 查询每个状态的数据条数
 export const shelfReplenishStateCount = (params) => {
   return axios({

+ 10 - 3
src/components/UploadFile/index.vue

@@ -21,7 +21,13 @@
         <a-button> <a-icon type="upload" /> {{ upText }} </a-button>
       </div>
     </a-upload>
-    <a-modal :visible="previewVisible" :footer="null" centered :maskClosable="false" @cancel="handleCancel">
+    <a-modal
+      :visible="previewVisible"
+      title="图片预览"
+      :footer="null"
+      centered
+      :maskClosable="true"
+      @cancel="handleCancel">
       <video v-if="fileType=='video/mp4'" controls="controls" style="width: 100%" :src="previewImage" />
       <img v-else alt="example" style="width: 100%" :src="previewImage" />
     </a-modal>
@@ -151,9 +157,10 @@ export default {
       this.$emit('remove')
     },
     handleChange ({ file, fileList }) {
-      if (file.response && (file.response.status == 500 || file.response.status == 900)) {
+      console.log(file)
+      if (!file.response || file.response && (file.response.status == 500 || file.response.status == 900 || file.response.status == 404)) {
         if (file.status == 'error' || file.status == 'done') {
-          this.$message.error(file.response.message || '上传失败,请重试!')
+          this.$message.error(file.response && file.response.message || '上传失败,请重试!')
           this.$emit('remove')
           return
         }

+ 2 - 2
src/components/index.js

@@ -16,7 +16,7 @@ import AvatarList from '@/components/AvatarList'
 import CountDown from '@/components/CountDown'
 import Ellipsis from '@/components/Ellipsis'
 import FooterToolbar from '@/components/FooterToolbar'
-import NumberInfo from '@/components/NumberInfo'
+// import NumberInfo from '@/components/NumberInfo'
 import DescriptionList from '@/components/DescriptionList'
 import Tree from '@/components/Tree/Tree'
 import Trend from '@/components/Trend'
@@ -47,7 +47,7 @@ export {
   CountDown,
   Ellipsis,
   FooterToolbar,
-  NumberInfo,
+  // NumberInfo,
   DescriptionList,
   // 兼容写法,请勿继续使用
   DescriptionList as DetailList,

+ 38 - 3
src/config/router.config.js

@@ -317,7 +317,7 @@ export const asyncRouterMap = [
       // 数字货架
       {
         path: '/numsGoodsShelves',
-        redirect: '/numsGoodsShelves/settlementManagement',
+        redirect: '/numsGoodsShelves/shelfSet',
         component: PageView,
         meta: {
           title: '数字货架',
@@ -325,6 +325,42 @@ export const asyncRouterMap = [
           permission: 'M_numsGoodsShelves'
         },
         children: [
+          {
+            path: '/numsGoodsShelves/approveStore',
+            redirect: '/numsGoodsShelves/approveStore/list',
+            name: 'approveStore',
+            component: BlankLayout,
+            meta: {
+              title: '汽修厂认证审核',
+              icon: 'monitor',
+              permission: 'M_approveStore'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'approveStoreList',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/approveStore/list.vue'),
+                meta: {
+                  title: '汽修厂认证审核',
+                  icon: 'monitor',
+                  hidden: true,
+                  permission: 'M_approveStore'
+                }
+              },
+              {
+                path: 'authPass/:sn',
+                name: 'approveStoreAuthPass',
+                component: () => import(/* webpackChunkName: "numsGoodsShelves" */ '@/views/numsGoodsShelves/approveStore/authPass.vue'),
+                meta: {
+                  title: '审核通过',
+                  icon: 'monitor',
+                  hidden: true,
+                  replaceTab: true
+                }
+              },
+            ]
+          },
           {
             path: '/numsGoodsShelves/shelfSet',
             redirect: '/numsGoodsShelves/shelfSet/list',
@@ -357,7 +393,6 @@ export const asyncRouterMap = [
                   icon: 'monitor',
                   hidden: true,
                   replaceTab: true
-                  // permission: 'M_salesQueryList'
                 }
               }
             ]
@@ -559,7 +594,7 @@ export const asyncRouterMap = [
                 }
               }
             ]
-          }
+          },
           // {
           //   path: '/numsGoodsShelves/accountManagement',
           //   redirect: '/numsGoodsShelves/accountManagement/list',

+ 47 - 0
src/core/directives/copyText.js

@@ -0,0 +1,47 @@
+import Vue from "vue";
+import message from 'ant-design-vue/es/message';
+// 注册一个全局自定义复制指令 `v-copyText`
+Vue.directive("copyText", {
+  bind(el, { value }) {
+    el.$value = value;
+    el.handler = () => {
+      el.style.position = 'relative';
+      if (!el.$value) {
+        // 值为空的时候,给出提示
+        message.info('无复制内容');
+        return
+      }
+      // 动态创建 textarea 标签
+      const textarea = document.createElement('textarea');
+      // 将该 textarea 设为 readonly 防止 iOS 下自动唤起键盘,同时将 textarea 移出可视区域
+      textarea.readOnly = 'readonly';
+      textarea.style.position = 'absolute';
+      textarea.style.top = '0px';
+      textarea.style.left = '-9999px';
+      textarea.style.zIndex = '-9999';
+      // 将要 copy 的值赋给 textarea 标签的 value 属性
+      textarea.value = el.$value
+      // 将 textarea 插入到 el 中
+      el.appendChild(textarea);
+      // 兼容IOS 没有 select() 方法
+      if (textarea.createTextRange) {
+        textarea.select(); // 选中值并复制
+      } else {
+        textarea.setSelectionRange(0, el.$value.length);
+        textarea.focus();
+      }
+      const result = document.execCommand('Copy');
+      if (result) message.info('复制成功');
+      el.removeChild(textarea);
+    }
+    el.addEventListener('click', el.handler); // 绑定点击事件
+  },
+  // 当传进来的值更新的时候触发
+  componentUpdated(el, { value }) {
+    el.$value = value;
+  },
+  // 指令与元素解绑的时候,移除事件绑定
+  unbind(el) {
+    el.removeEventListener('click', el.handler);
+  },
+});

+ 1 - 1
src/core/use.js

@@ -16,7 +16,7 @@ import PermissionHelper from '@/utils/helper/permission'
 // import '@/components/use'
 import './directives/hasPermission'
 import './directives/dragModal'
-
+import './directives/copyText'
 VueClipboard.config.autoSetContainer = true
 
 Vue.use(Antd)

+ 1 - 1
src/views/customerManagement/customerInfo/detailModal.vue

@@ -21,7 +21,7 @@
           <a-descriptions-item label="配送方式:">{{ detailData&&detailData.dispatchTypeDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="是否卫星仓客户:">{{ detailData&&detailData.satelliteFlagDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="价格类型:">{{ detailData&&detailData.priceTypeDictValue || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="收款方式:">{{ detailData&&detailData.settleStyleName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="收款方式:">{{ detailData&&detailData.settleStyleSnDictValue || '--' }}</a-descriptions-item>
           <a-descriptions-item label="客户类型:">{{ detailData&&detailData.customerTypeName || '--' }}</a-descriptions-item>
         </a-descriptions>
       </a-spin>

+ 393 - 0
src/views/numsGoodsShelves/approveStore/authPass.vue

@@ -0,0 +1,393 @@
+<template>
+  <div class="authPass-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="authPass-back">
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="authPass-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+      </template>
+    </a-page-header>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="authPass-table-page-wrapper">
+        <a-form-model
+          id="authPass-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-row :gutter="15">
+            <a-col :span="12">
+              <a-form-model-item label="门头照片" prop="storeImage">
+                <Upload
+                  class="upload"
+                  id="noticeEdit-imgPaths"
+                  v-model="form.storeImage"
+                  ref="storeImage"
+                  :fileSize="10"
+                  :maxNums="1"
+                  @remove="removeImage1"
+                  @change="changeImage1"
+                  listType="picture-card"></Upload>
+                <div class="upload-desc">说明:单张大小小于10Mb,最多1张。</div>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item label="营业执照" prop="licenseImage">
+                <Upload
+                  class="upload"
+                  id="noticeEdit-imgPaths"
+                  v-model="form.licenseImage"
+                  ref="licenseImage"
+                  :fileSize="10"
+                  :maxNums="1"
+                  @remove="removeImage2"
+                  @change="changeImage2"
+                  listType="picture-card"></Upload>
+                <div class="upload-desc">说明:单张大小小于10Mb,最多1张。</div>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item label="门店名称" prop="storeName">
+                <a-input id="authPass-storeName" :maxLength="30" v-model.trim="form.storeName" placeholder="请输入门店名称(最多30个字符)" allowClear />
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="15">
+            <a-col :span="12">
+              <a-form-model-item label="客户地址" required style="margin: 0;">
+                <a-row :gutter="15">
+                  <!-- 客户地址 -->
+                  <a-col span="6">
+                    <a-form-model-item prop="addrProvince">
+                      <a-select id="authPass-addrProvince" allowClear @change="getCityList" v-model="form.addrProvince" placeholder="请选择省">
+                        <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="6">
+                    <a-form-model-item prop="addrCity">
+                      <a-select id="authPass-addrCity" allowClear @change="getAreaList" v-model="form.addrCity" placeholder="请选择市">
+                        <a-select-option v-for="item in addrCityList" :value="item.areaSn" :key="item.areaSn + 'b'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                  <a-col span="6">
+                    <a-form-model-item prop="addrDistrict">
+                      <a-select id="authPass-addrDistrict" allowClear @change="areaCharged" v-model="form.addrDistrict" placeholder="请选择区/县">
+                        <a-select-option v-for="item in addrDistrictList" :value="item.areaSn" :key="item.areaSn + 'c'">{{ item.name }}</a-select-option>
+                      </a-select>
+                    </a-form-model-item>
+                  </a-col>
+                </a-row>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item label="详细地址" prop="addrDetail">
+                <a-textarea id="authPass-addrDetail" :maxLength="100" v-model.trim="form.addrDetail" placeholder="请输入详细地址(最多100个字符)" allowClear />
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="15">
+            <a-col :span="12">
+              <a-form-model-item label="联系人姓名" prop="contactName">
+                <a-input
+                  id="authPass-contactName"
+                  :maxLength="20"
+                  v-model.trim="form.contactName"
+                  @change="filterEmpty"
+                  placeholder="请输入联系人姓名(最多20个字符)"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item label="联系人手机" prop="contactPhone">
+                <a-input
+                  id="authPass-contactPhone"
+                  :maxLength="30"
+                  disabled
+                  v-model.trim="form.contactPhone"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item label="结算方式" prop="settleType">
+                <v-select
+                  code="SHELF_SETTLE_TYPE"
+                  id="authPass-settleType"
+                  v-model="form.settleType"
+                  allowClear
+                  placeholder="请选择结算方式"
+                ></v-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item label="关联客户" prop="customerSn">
+                <custList ref="custList" :isEnabled="true" @change="custChange"></custList>
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12" v-if="form.settleType == 'CREDIT'">
+              <a-form-model-item label="授信额度" prop="creditLimit">
+                <a-input-number
+                  :min="100"
+                  :max="9999999"
+                  style="width:100%"
+                  :precision="2"
+                  v-model="form.creditLimit"
+                  placeholder="请输入大于100的数字(最多允许两位小数)"></a-input-number>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 30px;">
+            <a-button type="primary" @click="saveForm" size="large" id="authPass-btn-submit" style="padding: 0 60px;">审核通过</a-button>
+          </a-form-model-item>
+        </a-form-model>
+      </a-card>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect, Upload } from '@/components'
+import { getAreaCgj } from '@/api/data'
+import custList from '@/views/common/custList.vue'
+import { xprhStoreApplyDetail, xprhStoreApplyAudit } from '@/api/approveStore'
+export default {
+  name: 'ApproveStoreAuthPass',
+  components: { STable, VSelect, custList, Upload },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        storeName: '', // 门店名称
+        contactPhone: '', //  联系手机
+        contactName: '', //  联系人
+        addrProvince: undefined, //  省
+        addrProvinceName: '',
+        addrCity: undefined, // 市
+        addrCityName: '',
+        addrDistrict: undefined, // 区
+        addrDistrictName: '',
+        addrDetail: '', //  详细地址
+        storeImage: '', // 门头照片
+        licenseImage: '', // 营业执照
+        settleType: '', //  结算方式
+        customerSn: undefined, //  关联客户
+        creditLimit: '', //  授信额度
+        delearSn: undefined,
+        applySn: undefined,
+        auditStatus: 'PASS' // 通过
+      },
+      rules: {
+        storeImage: [{ required: true, message: '请上传门头照片', trigger: 'change' }],
+        storeName: [{ required: true, message: '请输入门店名称', trigger: 'change' }],
+        addrProvince: [{ required: true, message: '请选择省', trigger: 'change' }],
+        addrCity: [{ required: true, message: '请选择市', trigger: 'change' }],
+        addrDistrict: [{ required: true, message: '请选择区/县', trigger: 'change' }],
+        addrDetail: [{ required: true, message: '请输入详细地址', trigger: 'change' }],
+        contactName: [{ required: true, message: '请输入联系人姓名', trigger: 'change' }],
+        settleType: [{ required: true, message: '请选择收结算方式', trigger: 'change' }],
+        customerSn: [{ required: true, message: '请选择关联客户', trigger: 'change' }],
+        creditLimit: [{ required: true, message: '请输入授信额度', trigger: 'change' }]
+      },
+      addrProvinceList: [], //  省下拉
+      addrCityList: [], //  市下拉
+      addrDistrictList: [], //  区下拉
+      settleStyleList: [] //  收款方式  下拉数据
+    }
+  },
+  methods: {
+    filterEmpty () {
+      let str = this.form.storeName
+      str = str.replace(/\ +/g, '')
+      str = str.replace(/[ ]/g, '')
+      str = str.replace(/[\r\n]/g, '')
+      this.form.storeName = str
+    },
+    // 关联客户
+    custChange (obj, row) {
+      this.form.customerSn = row ? row.customerSn : undefined
+    },
+    //  图片上传
+    changeImage1 (file) {
+      this.form.storeImage = file
+    },
+    removeImage1 () {
+      this.form.storeImage = ''
+      this.$refs.storeImage.setFileList('')
+    },
+    //  图片上传
+    changeImage2 (file) {
+      this.form.licenseImage = file
+    },
+    removeImage2 () {
+      this.form.licenseImage = ''
+      this.$refs.licenseImage.setFileList('')
+    },
+    //  获取客户信息
+    getDetail () {
+      xprhStoreApplyDetail({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          if (res.data.addrProvince) { this.getArea('city', res.data.addrProvince) }
+          if (res.data.addrDistrict) { this.getArea('district', res.data.addrCity) }
+          this.form = Object.assign(this.form, res.data)
+          this.$refs.storeImage.setFileList(res.data.storeImage)
+          this.$refs.licenseImage.setFileList(res.data.licenseImage)
+          this.form.auditStatus = 'PASS' // 通过
+        } else {
+          this.$refs.ruleForm.resetFields()
+        }
+      })
+    },
+    //  保存
+    saveForm () {
+      const _this = this
+      _this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.$confirm({
+            title: '操作提示',
+            content: <div><div>审核通过后,即可成为认证门店,</div><div>确认审核通过吗?</div></div>,
+            centered: true,
+            closable: true,
+            onOk () {
+              _this.handleSubmit()
+            }
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    handleSubmit (e) {
+      const _this = this
+      _this.spinning = true
+      xprhStoreApplyAudit(_this.form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.handleBack()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
+    //  返回列表
+    handleBack () {
+      this.$router.push({ name: 'approveStoreList' })
+    },
+    // 获取城市列表
+    getCityList (val) {
+      this.addrCityList = []
+      this.addrDistrictList = []
+      this.form.addrCity = undefined
+      this.form.addrDistrict = undefined
+      if (val) {
+        this.getArea('city', val)
+        this.form.addrProvinceName = this.addrProvinceList.find(item => item.areaSn == val).name
+      } else {
+        this.form.addrProvinceName = ''
+      }
+    },
+    // 获取区县列表
+    getAreaList (val) {
+      this.addrDistrictList = []
+      this.form.addrDistrict = undefined
+      if (val) {
+        this.getArea('district', val)
+        this.form.addrCityName = this.addrCityList.find(item => item.areaSn == val).name
+      } else {
+        this.form.addrCityName = ''
+      }
+    },
+    // 区县变更
+    areaCharged (val) {
+      if (val) {
+        this.form.addrDistrictName = this.addrDistrictList.find(item => item.areaSn == val).name
+      } else {
+        this.form.addrDistrictName = ''
+      }
+    },
+    //  省/市/区
+    getArea (leve, sn) {
+      let params
+      if (leve == 'province') {
+        params = { type: '2' }
+      } else {
+        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
+      }
+      getAreaCgj(params).then(res => {
+        if (res.status == 200) {
+          if (leve == 'province') {
+            this.addrProvinceList = res.data || []
+          } else if (leve == 'city') {
+            this.addrCityList = res.data || []
+          } else if (leve == 'district') {
+            this.addrDistrictList = res.data || []
+          }
+        } else {
+          if (leve == 'province') {
+            this.addrProvinceList = []
+          } else if (leve == 'city') {
+            this.addrCityList = []
+          } else if (leve == 'district') {
+            this.addrDistrictList = []
+          }
+        }
+      })
+    },
+    // 获取基础数据
+    getBaseData () {
+      this.getArea('province') //  省市区
+      this.$refs.ruleForm.resetFields()
+    },
+    initPage () {
+      this.getBaseData()
+      //  编辑页
+      if (this.$route.params.sn) {
+        this.getDetail()
+      }
+    }
+  },
+  mounted () {
+    console.log('mounted')
+    this.initPage()
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      console.log('beforeRouteEnter')
+    })
+  }
+}
+</script>
+
+<style lang="less">
+.authPass-wrap {
+  height: 100%;
+  >.ant-spin-nested-loading{
+    height: calc(100% - 52px);
+	  overflow-y: auto;
+    .ant-spin-container{
+      height: 100%;
+    }
+    .upload-desc {
+      color:#999;
+      clear:both;
+    }
+  }
+  .ant-form-item-children{
+    display:block;
+  }
+	.authPass-back {
+		margin-bottom: 10px;
+	}
+  .authPass-table-page-wrapper{
+    height: 100%;
+  }
+}
+</style>

+ 224 - 0
src/views/numsGoodsShelves/approveStore/list.vue

@@ -0,0 +1,224 @@
+<template>
+  <a-card size="small" :bordered="false" class="approveStore-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 提示 -->
+      <a-alert type="info" style="margin-bottom: 10px">
+        <div slot="message">我的邀请码:{{ dealerInviteCode }} <a-button type="link" v-copyText="dealerInviteCode">复制</a-button></div>
+      </a-alert>
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="4" :sm="24">
+              <a-form-item label="联系人手机">
+                <a-input allowClear placeholder="请输入联系人手机" v-model.tirm="queryParam.contactPhone"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="联系人姓名">
+                <a-input allowClear placeholder="请输入联系人姓名" v-model.tirm="queryParam.contactName"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="门店名称">
+                <a-input allowClear placeholder="请输入门店名称" v-model.tirm="queryParam.storeName"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="状态">
+                <v-select
+                  v-model="queryParam.auditStatus"
+                  ref="auditStatus"
+                  id="approveStore-auditStatus"
+                  code="XPRH_STORE_APPLY_STATUS"
+                  placeholder="请选择审核状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <div>
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="approveStore-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="approveStore-reset">重置</a-button>
+              </div>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 图片 -->
+        <template slot="imageUrl" slot-scope="text, record">
+          <div v-if="text&&text.length">
+            <img :src="text" width="30" height="30" class="imageUrl" @click="inited([text])" />
+          </div>
+          <span v-else>--</span>
+        </template>
+        <!-- 地址 -->
+        <template slot="addr" slot-scope="text, record">
+          <div>
+            {{ record.addrProvinceName +'-'+ record.addrCityName +'-'+ record.addrDistrictName }}
+            <div style="word-wrap: wrap;">{{ record.addrDetail }}</div>
+          </div>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <div v-if="record.auditStatus == 'WAIT'">
+            <a-button size="small" type="link" class="button-primary" @click="handleAudit(record,1)">通过</a-button>
+            <a-button size="small" type="link" class="button-primary" @click="handleAudit(record,0)">不通过</a-button>
+          </div>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import { xprhStoreApplyQueryPage, xprhStoreApplyAudit } from '@/api/approveStore'
+export default {
+  components: { STable, VSelect },
+  mixins: [commonMixin],
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      queryParam: {
+        contactName: '',
+        contactPhone: '',
+        storeName: '',
+        auditStatus: undefined
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '提交时间', dataIndex: 'applyTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '联系人手机', dataIndex: 'contactPhone', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '联系人姓名', dataIndex: 'contactName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '门店名称', dataIndex: 'storeName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '门店地址', dataIndex: 'addrDetail', width: '28%', align: 'center', scopedSlots: { customRender: 'addr' } },
+        { title: '门头照片', dataIndex: 'storeImage', width: '6%', align: 'center', scopedSlots: { customRender: 'imageUrl' } },
+        { title: '营业执照', dataIndex: 'licenseImage', width: '6%', align: 'center', scopedSlots: { customRender: 'imageUrl' } },
+        { title: '状态', dataIndex: 'auditStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return xprhStoreApplyQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      openModal: false,
+      nowData: null
+    }
+  },
+  computed: {
+    ...mapState({
+      dealerInviteCode: state => state.user.info.extInfo.dealer.dealerInviteCode
+    })
+  },
+  methods: {
+    inited (viewer) {
+      if (viewer.length) {
+        this.$viewerApi({
+          images: viewer
+        })
+      }
+    },
+    // 审核
+    handleAudit (row, type) {
+      // 审核通过
+      if (type == 1) {
+        this.$router.push({ name: 'approveStoreAuthPass', params: { sn: row.applySn } })
+      } else {
+        const _this = this
+        this.$confirm({
+          title: '提示',
+          content: '确认审核不通过吗?',
+          centered: true,
+          closable: true,
+          onOk () {
+            _this.spinning = true
+            xprhStoreApplyAudit({
+              applySn: row.applySn,
+              auditStatus: 'REFUSE'
+            }).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.$refs.table.refresh()
+                _this.spinning = false
+              } else {
+                _this.spinning = false
+              }
+            })
+          }
+        })
+      }
+    },
+    // 重置
+    resetSearchForm () {
+      this.queryParam.contactName = ''
+      this.queryParam.contactPhone = ''
+      this.queryParam.storeName = ''
+      this.queryParam.auditStatus = undefined
+      this.$refs.table.refresh(true)
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 245
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+        _this.resetSearchForm()
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.setTableH()
+      this.$refs.table.refresh()
+    }
+  }
+}
+</script>

+ 57 - 22
src/views/numsGoodsShelves/recallManagement/list.vue

@@ -2,7 +2,12 @@
   <a-card size="small" :bordered="false" class="accountManagementList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
-      <div ref="tableSearch" class="table-page-search-wrapper">
+      <div ref="tableSearch" style="width:100%;overflow: hidden;" class="table-page-search-wrapper">
+        <a-tabs type="card" v-model="queryParam.bizType" @change="tabChange" class="replenishmentManagementList-tabs">
+          <a-tab-pane v-for="item in tabsList" :key="item.code">
+            <p slot="tab">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
+          </a-tab-pane>
+        </a-tabs>
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="36">
             <a-col :md="6" :sm="24">
@@ -43,11 +48,6 @@
           </a-row>
         </a-form>
       </div>
-      <a-tabs type="card" v-model="queryParam.bizType" @change="tabChange" class="replenishmentManagementList-tabs">
-        <a-tab-pane v-for="item in tabsList" :key="item.code">
-          <p slot="tab">{{ item.name }}<span v-if="item.countNum&&item.code=='WAIT_CONFIRM'" style="color:red">({{ item.countNum }})</span></p>
-        </a-tab-pane>
-      </a-tabs>
       <s-table
         class="sTable fixPagination"
         ref="table"
@@ -69,15 +69,22 @@
             v-if="record.billState=='WAIT_CONFIRM'"
             class="button-primary"
             @click.stop="handleRecall(record)"
-            id="shelfMonitoringList-warehousing-btn">退库</a-button>
+          >退库</a-button>
           <a-button
             size="small"
             v-if="record.billState=='WAIT_CONFIRM'"
             type="link"
             class="button-primary"
             @click.stop="handleCancel(record)"
-            id="shelfMonitoringList-warehousing-btn">取消调回单</a-button>
-          <span v-if="record.billState!='WAIT_CONFIRM'" style="display: inline-block;margin-left: 7px;">--</span>
+          >取消调回单</a-button>
+          <a-button
+            size="small"
+            v-if="record.billState=='CANCEL'"
+            type="link"
+            class="button-primary"
+            @click.stop="handleDelete(record)"
+          >删除</a-button>
+          <span v-if="record.billState=='FINISH'">--</span>
         </template>
         <a-table
           v-if="innerData&&innerData[index]"
@@ -92,9 +99,9 @@
         >
         </a-table>
       </s-table>
+      <!-- 退库 -->
+      <recallModal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></recallModal>
     </a-spin>
-    <!-- 退库 -->
-    <recallModal :isOpenModal="showModal" :currentData="currentData" @close="showModal=false" @refresh="$refs.table.refresh(true)"></recallModal>
   </a-card>
 </template>
 
@@ -107,7 +114,7 @@ import recallModal from './recallModal.vue'
 import getDate from '@/libs/getDate.js'
 import { toThousands } from '@/libs/tools.js'
 import shelfList from '@/views/common/shelfList'
-import { shelfRecallList, shelfRecallDetailList, shelfRecallCancel, shelfRecallStateCount } from '@/api/shelfRecall.js'
+import { shelfRecallList, shelfRecallDetailList, shelfRecallCancel, shelfRecallStateCount, shelfRecallDelete } from '@/api/shelfRecall.js'
 export default {
   components: { STable, recallModal, rangeDate, shelfList },
   mixins: [commonMixin],
@@ -121,7 +128,6 @@ export default {
       currentData: null,
       activeKey: 0, // 默认的tab
       tabsList: [],
-      currentType: 'ALL',
       expandedRowKeys: [],
       time: [
         getDate.getCurrMonthDays().starttime,
@@ -198,7 +204,6 @@ export default {
       setTimeout(() => {
         this.queryParam.bizType = key
         this.$refs.table.refresh(true)
-        this.currentType = key
       }, 100)
     },
     // 获取各类型下的数量
@@ -211,7 +216,6 @@ export default {
           this.tabsList = [
             { code: 'ALL', name: '全部', countNum: 0 }, { code: 'WAIT_CONFIRM', name: '待退库', countNum: 0 }, { code: 'FINISH', name: '已完成', countNum: 0 }, { code: 'CANCEL', name: '已取消', countNum: 0 }
           ]
-          // this.queryParam.bizType = 'ALL'
           this.tabsList[1].countNum = res.data.WAIT_CONFIRM || 0
           this.tabsList[2].countNum = res.data.FINISH || 0
           this.tabsList[3].countNum = res.data.CANCEL || 0
@@ -249,21 +253,17 @@ export default {
     },
     // 重置
     resetSearchForm () {
-      // this.$refs.rangeDate.resetDate(this.time)
-      // this.queryParam.billState = this.currentType
-      // this.queryParam = {
       this.resetData()
-
       this.getSumByType()
     },
     resetData () {
       this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.bizType = 'ALL'
       this.queryParam = {
         beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
         endDate: getDate.getCurrMonthDays().endtime, // 结束时间
         recallBillNo: '', // 调回单号
-        shelfSn: undefined // 数字货架sn
+        shelfSn: undefined, // 数字货架sn
+        bizType: 'ALL'
       }
     },
     // 退库
@@ -292,9 +292,30 @@ export default {
         }
       })
     },
+    // 删除
+    handleDelete (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认删除调回单吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          shelfRecallDelete({ recallBillSn: row.recallBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 265
+      this.tableHeight = window.innerHeight - tableSearchH - 250
     },
     pageInit () {
       const _this = this
@@ -341,6 +362,7 @@ export default {
 
 <style lang="less">
   .accountManagementList-wrap{
+    width:100%;
     .inner-table{
       background-color: #fff;
       border-bottom: 1px solid #eee;
@@ -349,5 +371,18 @@ export default {
          border-bottom: 1px solid #eee;
       }
     }
+    .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-bar{
+      margin: 0 0 10px 0!important;
+    }
+    .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-nav-container{
+      height: 30px!important;
+    }
+    .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab-active{
+      height: 30px!important;
+    }
+    .replenishmentManagementList-tabs.ant-tabs.ant-tabs-card .ant-tabs-card-bar .ant-tabs-tab{
+      line-height: 26px!important;
+      height: 30px!important;
+    }
   }
 </style>

+ 0 - 7
src/views/numsGoodsShelves/recallManagement/recallModal.vue

@@ -181,13 +181,6 @@ export default {
       this.opened = nVal
       if (nVal) {
         this.getData()
-        // if (this.currentData) {
-        //   this.currentData.map((item, index) => {
-        //     item.no = index + 1
-        //     item.confirmQty = item.qty
-        //   })
-        // }
-        // this.list = JSON.parse(JSON.stringify(this.currentData || []))
       }
     }
   }

+ 47 - 28
src/views/numsGoodsShelves/replenishmentManagement/list.vue

@@ -3,6 +3,12 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
+        <!-- 标签页 -->
+        <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="replenishmentManagementList-tabs">
+          <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
+            <p slot="tab">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
+          </a-tab-pane>
+        </a-tabs>
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
@@ -42,12 +48,6 @@
           </a-row>
         </a-form>
       </div>
-      <!-- 标签页 -->
-      <a-tabs type="card" v-model="queryParam.bizType" @change="handleTabChange" class="replenishmentManagementList-tabs ">
-        <a-tab-pane v-for="item in tabPaneData" :key="item.bizType">
-          <p slot="tab">{{ item.bizName }}<span v-if="item.countNum && item.bizName!='全部'&&item.bizName!='已完成'&&item.bizName!='已取消'" style="color: red;">({{ item.countNum }})</span></p>
-        </a-tab-pane>
-      </a-tabs>
       <s-table
         class="sTable fixPagination"
         ref="table"
@@ -81,6 +81,7 @@
           <a-button v-if="record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleOutWarehousing(record)">出库</a-button>
           <a-button v-if="record.billState=='WAIT_CHECK'" size="small" type="link" class="button-primary" @click.stop="handlePutWarehousing(record)">签收</a-button>
           <a-button v-if="record.billState=='WAIT_CONFIRM' || record.billState=='WAIT_OUT_STOCK'" size="small" type="link" class="button-primary" @click.stop="handleCancelOrder(record)">取消补货单</a-button>
+          <a-button v-if="record.billState=='CANCEL'" size="small" type="link" class="button-primary" @click.stop="handleDelete(record)">删除</a-button>
         </template>
       </s-table>
       <!-- 确认 -->
@@ -114,7 +115,7 @@ import stockModal from './stockModal.vue'
 import printStickerModal from './printStickerModal.vue'
 import outWarehousingModal from './outWarehousingModal.vue'
 import putWarehousingModal from './putWarehousingModal.vue'
-import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishTaskInsertBill } from '@/api/shelfReplenish'
+import { shelfReplenishList, shelfReplenishDetailList, shelfReplenishCancel, shelfReplenishStateCount, shelfReplenishDetailStock, shelfReplenishConfirm, shelfReplenishTaskInsertBill, shelfReplenishDelete } from '@/api/shelfReplenish'
 export default {
   components: { STable, VSelect, rangeDate, shelfSList, confirmModal, stockModal, printStickerModal, outWarehousingModal, putWarehousingModal },
   mixins: [commonMixin],
@@ -188,7 +189,14 @@ export default {
         { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       listData: [],
-      tabPaneData: [],
+      tabPaneData: [
+        { bizName: '全部', bizType: 'ALL', countNum: 0 },
+        { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
+        { bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
+        { bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
+        { bizName: '已完成', bizType: 'FINISH', countNum: 0 },
+        { bizName: '已取消', bizType: 'CANCEL', countNum: 0 }
+      ],
       nowData: null,
       openConfirmModal: false,
       openStockModal: false,
@@ -255,7 +263,7 @@ export default {
     handleOutWarehousingOk () {
       this.nowData = null
       this.openOutWarehousingModal = false
-      this.queryByTypeSum()
+      this.queryByTypeSum(true)
     },
     handleValidate (type, params) {
       // 校验产品库存是否足够
@@ -279,7 +287,7 @@ export default {
       shelfReplenishConfirm(params).then(res => {
         if (res.status == 200) {
           this.$message.success('确认补货成功')
-          this.$refs.table.refresh(true)
+          this.$refs.table.refresh()
           this.handleCancel()
         }
       })
@@ -293,7 +301,7 @@ export default {
     handlePutWarehousingOk () {
       this.nowData = null
       this.openPutWarehousingModal = false
-      this.queryByTypeSum()
+      this.queryByTypeSum(true)
     },
     // 取消补货单
     handleCancelOrder (row) {
@@ -316,6 +324,27 @@ export default {
         }
       })
     },
+    // 删除
+    handleDelete (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认删除补货单吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          shelfReplenishDelete({ replenishBillSn: row.replenishBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     expandFun (expanded, record) {
       if (expanded) {
         this.expandedRowKeys.push(record.id)
@@ -367,43 +396,33 @@ export default {
     // 选择类型
     handleTabChange (key) {
       this.expandedRowKeys = []
-      setTimeout(() => {
-        this.queryParam.bizType = key
-        this.$refs.table.refresh(true)
-        this.curBizType = key
-      }, 100)
+      this.queryParam.bizType = key
+      this.curBizType = key
+      this.$refs.table.refresh(true)
     },
     // 客户 change
     custChange (obj) {
       this.queryParam.customerSn = obj.key || undefined
     },
     // 获取类型
-    queryByTypeSum () {
+    queryByTypeSum (flag) {
       const params = JSON.parse(JSON.stringify(this.queryParam))
       delete params.bizType
       shelfReplenishStateCount(params).then(res => {
         if (res.data && res.status == 200) {
-          this.tabPaneData = [
-            { bizName: '全部', bizType: 'ALL', countNum: 0 },
-            { bizName: '待确认', bizType: 'WAIT_CONFIRM', countNum: 0 },
-            { bizName: '待出库', bizType: 'WAIT_OUT_STOCK', countNum: 0 },
-            { bizName: '待签收', bizType: 'WAIT_CHECK', countNum: 0 },
-            { bizName: '已完成', bizType: 'FINISH', countNum: 0 },
-            { bizName: '已取消', bizType: 'CANCEL', countNum: 0 }
-          ]
-          this.queryParam.bizType = 'ALL'
           this.tabPaneData[1].countNum = res.data.WAIT_CONFIRM || 0
           this.tabPaneData[2].countNum = res.data.WAIT_OUT_STOCK || 0
           this.tabPaneData[3].countNum = res.data.WAIT_CHECK || 0
           this.tabPaneData[4].countNum = res.data.FINISH || 0
           this.tabPaneData[5].countNum = res.data.CANCEL || 0
-          this.$refs.table.refresh(true)
+          this.queryParam.bizType = this.curBizType
+          this.$refs.table.refresh(!flag)
         }
       })
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 240
+      this.tableHeight = window.innerHeight - tableSearchH - 200
     },
     pageInit () {
       const _this = this

+ 3 - 3
src/views/numsGoodsShelves/settlementManagement/list.vue

@@ -5,12 +5,12 @@
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="货架名称">
                 <shelfList v-model="queryParam.shelfSn"></shelfList>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="关联客户">
                 <custList ref="custList" @change="custChange" v-model="queryParam.customerName"></custList>
               </a-form-item>
@@ -245,7 +245,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 265
+      this.tableHeight = window.innerHeight - tableSearchH - 245
     },
     pageInit () {
       const _this = this

+ 3 - 3
src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue

@@ -8,7 +8,7 @@
         </template>
       </a-page-header>
       <!-- 额度统计 授信结算类型 显示-->
-      <a-card size="small" :bordered="false" style="margin-bottom: 10px;" v-if="this.$route.params.settleType=='CREDIT'">
+      <a-card size="small" :bordered="false" style="margin-bottom: 10px;" v-if="$route.params.settleType=='CREDIT'">
         <a-collapse :activeKey="['1']">
           <a-collapse-panel key="1" >
             <template slot="header">
@@ -75,7 +75,7 @@
           :style="{ height: tableHeight+77+'px' }"
           ref="table"
           size="small"
-          rowKey="id"
+          :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"
@@ -221,7 +221,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 300
+      this.tableHeight = window.innerHeight - tableSearchH - (this.$route.params.settleType == 'CREDIT' ? 415 : 300)
     }
   },
   mounted () {

+ 36 - 13
src/views/numsGoodsShelves/shelfSet/list.vue

@@ -35,7 +35,7 @@
       </div>
       <!-- 提示 -->
       <a-alert type="info" style="margin-bottom: 10px">
-        <div slot="message">注意:只有当数字货架的所有信息都设置完成,才能在其他功能中看到该数字货架</div>
+        <div slot="message">注意:只有当数字货架的“是否设置完成”为"是",系统才会自动对该货架生成补货单,修理厂才能正常下单。</div>
       </a-alert>
       <!-- 列表 -->
       <s-table
@@ -51,22 +51,28 @@
         bordered>
         <!-- 货位数量 -->
         <template slot="shelfPlaceNum" slot-scope="text, record">
-          <div v-if="record.finishFlag=='1'">{{ record.shelfPlaceNum }}</div>
-          <div v-else>
-            <p style="margin: 0;">
-              <span style="color: red;">{{ record.shelfPlaceBindNum||record.shelfPlaceBindNum==0 ? record.shelfPlaceBindNum:'' }}</span> /
-              {{ record.shelfPlaceNum }}
-            </p>
-          </div>
+          <p style="margin: 0;">
+            <span style="color: red;">
+              {{ record.shelfPlaceBindNum||record.shelfPlaceBindNum==0 ? record.shelfPlaceBindNum:'' }}</span> /
+            {{ record.shelfPlaceNum }}
+          </p>
         </template>
         <!-- 是否设置完成 -->
         <template slot="finishFlag" slot-scope="text, record">
-          <span v-if="record.finishFlagDictValue" :style="{color: record.finishFlagDictValue=='否' ? 'red':''}">{{ record.finishFlagDictValue }}</span>
-          <span v-else>--</span>
+          <a-switch
+            checkedChildren="是"
+            unCheckedChildren="否"
+            v-if="record.finishFlag!=undefined"
+            @change="changeStatus(record)"
+            :checked="record.finishFlag == 1"
+          />
+          <span v-else :style="{ color: record.finishFlag == 1 ? '#00aa00' : '#999' }">
+            {{ record.finishFlag == 1 ? '是' : (record.finishFlag!=undefined?'否':'--') }}
+          </span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
-          <a-button size="small" type="link" class="button-primary" @click="handleSet(record)">{{ record.finishFlag=='1'?'修改':'设置' }}</a-button>
+          <a-button size="small" type="link" class="button-primary" @click="handleSet(record)">设置</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -81,7 +87,7 @@ import { STable, VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
 import shelfSList from '@/views/common/shelfList'
 import basicInfoModal from './basicInfoModal.vue'
-import { shelfList } from '@/api/shelf'
+import { shelfList, modifFinishFlag } from '@/api/shelf'
 export default {
   components: { STable, VSelect, custList, shelfSList, basicInfoModal },
   mixins: [commonMixin],
@@ -104,7 +110,7 @@ export default {
         { title: '关联客户', dataIndex: 'customerEntity.customerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '货位数量', scopedSlots: { customRender: 'shelfPlaceNum' }, width: '15%', align: 'center' },
         { title: '是否设置完成', scopedSlots: { customRender: 'finishFlag' }, width: '20%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'left' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -154,6 +160,23 @@ export default {
         this.queryParam.customerSn = undefined
       }
     },
+    // 启用 禁用
+    changeStatus (record) {
+      const params = {
+        shelfSn: record.shelfSn,
+        finishFlag: record.finishFlag == 1 ? '0' : '1'
+      }
+      this.spinning = true
+      modifFinishFlag(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
     // 重置
     resetSearchForm () {
       this.queryParam.shelfSn = undefined

+ 1 - 1
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -47,7 +47,7 @@
           </a-form>
         </div>
         <!-- 操作按钮 -->
-        <div class="table-operator" v-if="basicInfoData&&basicInfoData.finishFlag=='0'">
+        <div class="table-operator">
           <a-button id="shelfSet-import" type="primary" class="button-error" @click="openGuideModal=true">导入绑定产品</a-button>
           <a-tooltip placement="top">
             <template slot="title">

+ 13 - 1
src/views/salesManagement/salesQuery/list.vue

@@ -23,7 +23,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                  <custList ref="custList" v-model="queryParam.buyerName"></custList>
+                  <custList ref="custList" @change="custChange"></custList>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -251,6 +251,7 @@ export default {
         outWarehouseBeginDate: '',
         outWarehouseEndDate: '',
         buyerName: undefined, //  客户名称
+        buyerSn: undefined,
         salesBillNo: '', //  销售单号
         purchaseBillNo: '', //  采购单号
         payType: undefined, //  支付方式
@@ -328,6 +329,16 @@ export default {
       this.queryParam.outWarehouseBeginDate = date[0]
       this.queryParam.outWarehouseEndDate = date[1]
     },
+    custChange (v, row) {
+      console.log(v, row)
+      if (row && row.customerSn) {
+        this.queryParam.buyerSn = row.customerSn
+        this.queryParam.buyerName = undefined
+      } else {
+        this.queryParam.buyerName = v
+        this.queryParam.buyerSn = undefined
+      }
+    },
     // 新增
     handleAdd () {
       this.openModal = true
@@ -435,6 +446,7 @@ export default {
       this.queryParam.outWarehouseEndDate = ''
 
       this.queryParam.buyerName = undefined
+      this.queryParam.buyerSn = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.purchaseBillNo = ''
       this.queryParam.payType = undefined