Procházet zdrojové kódy

Merge branch 'develop_yh25' of jianguan-web/jg-ocs-html into pre-release

李磊 před 1 rokem
rodič
revize
f62c54b728
29 změnil soubory, kde provedl 1793 přidání a 1231 odebrání
  1. 5 0
      package-lock.json
  2. 2 1
      package.json
  3. binární
      public/templ/参与客户导入列表模板.xlsx
  4. 11 0
      src/api/product.js
  5. 11 0
      src/api/promotion.js
  6. 31 5
      src/components/UploadFile/index.vue
  7. 25 0
      src/config/router.config.js
  8. 6 0
      src/libs/tools.js
  9. 11 11
      src/views/Home.vue
  10. 12 12
      src/views/allocationManagement/transfersPrint/list.vue
  11. 32 11
      src/views/productManagement/newProduct/list.vue
  12. 1 0
      src/views/productManagement/productInfo/edit.vue
  13. 52 12
      src/views/promotionRulesManagement/dealerPromotions/addModal.vue
  14. 184 0
      src/views/promotionRulesManagement/dealerPromotions/chooseImportDealerModal.vue
  15. 2 1
      src/views/promotionRulesManagement/dealerPromotions/detail.vue
  16. 192 0
      src/views/promotionRulesManagement/dealerPromotions/importDealerModa.vue
  17. 5 1
      src/views/promotionRulesManagement/dealerPromotions/list.vue
  18. 6 6
      src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue
  19. 8 1
      src/views/salesManagement/backorder/list.vue
  20. 11 9
      src/views/salesManagement/salesList/list.vue
  21. 579 571
      src/views/salesManagement/salesQueryNew/comps/productList.vue
  22. 374 365
      src/views/salesManagement/salesQueryNew/comps/productNormalList.vue
  23. 5 2
      src/views/salesManagement/salesQueryNew/comps/setWarehouse.vue
  24. 28 26
      src/views/salesManagement/salesQueryNew/detail.vue
  25. 176 173
      src/views/salesManagement/salesQueryNew/edit.vue
  26. 1 1
      src/views/salesManagement/salesQueryNew/list.vue
  27. 12 12
      src/views/salesManagement/stockPrint/list.vue
  28. 9 9
      src/views/salesReturnManagement/returnSchedule/list.vue
  29. 2 2
      vue.config.js

+ 5 - 0
package-lock.json

@@ -15710,6 +15710,11 @@
         "is-plain-obj": "^1.0.0"
       }
     },
+    "sortablejs": {
+      "version": "1.15.0",
+      "resolved": "https://registry.npmmirror.com/sortablejs/-/sortablejs-1.15.0.tgz",
+      "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w=="
+    },
     "source-list-map": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",

+ 2 - 1
package.json

@@ -28,7 +28,9 @@
     "mockjs2": "1.0.7",
     "moment": "^2.24.0",
     "nprogress": "^0.2.0",
+    "pdfjs-dist": "2.5.207",
     "screenfull": "^5.1.0",
+    "sortablejs": "^1.15.0",
     "v-runtime-template": "^1.10.0",
     "v-viewer": "^1.6.4",
     "viser-vue": "^2.4.6",
@@ -38,7 +40,6 @@
     "vue-cropper": "0.4.9",
     "vue-easytable": "^2.27.1",
     "vue-ls": "^3.2.1",
-    "pdfjs-dist": "2.5.207",
     "vue-pdf-signature": "^4.2.6",
     "vue-piczoom": "^1.0.6",
     "vue-quill-editor": "^3.0.6",

binární
public/templ/参与客户导入列表模板.xlsx


+ 11 - 0
src/api/product.js

@@ -11,6 +11,17 @@ export const productList = (params) => {
     method: 'post'
   })
 }
+// 产品上线信息列表
+export const queryOnlinePageList = (params) => {
+  const url = `/productLog/queryOnlinePage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
 //  产品 列表 已定过价的 分页
 export const productPricedList = (params) => {
   const url = `/product/queryPricedPage/${params.pageNo}/${params.pageSize}`

+ 11 - 0
src/api/promotion.js

@@ -147,3 +147,14 @@ export const downSpecialFail = (params) => {
     responseType: 'blob'
   })
 }
+
+// 导入参与客户   导出错误项
+export const downDealerFail = (params) => {
+  const url = `/promotion/downDealerFail`
+  return axios.request({
+    url: url,
+    method: 'post',
+    data: params,
+    responseType: 'blob'
+  })
+}

+ 31 - 5
src/components/UploadFile/index.vue

@@ -22,12 +22,15 @@
       </div>
     </a-upload>
     <a-modal :visible="previewVisible" :footer="null" centered :maskClosable="false" @cancel="handleCancel">
+      <div style="height: 30px;">预览</div>
       <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>
   </div>
 </template>
 <script>
+import Sortable from 'sortablejs'
+import { moveElement } from '@/libs/tools'
 export default {
   name: 'Upload',
   props: {
@@ -101,6 +104,24 @@ export default {
       }
     }
   },
+  created () {
+    const _this = this
+    this.$nextTick(() => {
+      const el = document.querySelector('.ant-upload-list-picture-card')
+      const sortable = Sortable.create(el, {
+        onEnd: function (evt) {
+          console.log(evt.oldIndex, evt.newIndex)
+          const a = _this.formatFile()
+          console.log(a.split(','))
+          const ret = moveElement(a.split(','), evt.oldIndex, evt.newIndex)
+          console.log(ret)
+
+          _this.$emit('change', ret.join(','))
+          _this.$emit('input', ret.join(','))
+        }
+      })
+    })
+  },
   methods: {
     setFileList (a) {
       const temp = []
@@ -152,9 +173,9 @@ export default {
           this.previewImage = file.url || file.thumbUrl
         }
         this.previewVisible = true
-      }else{
+      } else {
         const src = file.response.data
-        if(!Array.isArray(src)){
+        if (!Array.isArray(src)) {
           this.previewImage = file.url || file.thumbUrl
           this.previewVisible = true
         }
@@ -174,7 +195,7 @@ export default {
         if (file.status == 'error' || file.status == 'done') {
           this.$message.error(file.response.message || '上传失败,请重试!')
           this.$emit('remove')
-          return
+          // return
         }
       }
       this.fileList = this.validaFile(file, fileList)
@@ -204,7 +225,7 @@ export default {
               }
             }
           })
-          console.log(temp)
+          // console.log(temp)
           obj = JSON.stringify(temp)
         }
       }
@@ -216,7 +237,7 @@ export default {
         return []
       }
       // console.log(file, filesList, this.beforeUpload(file, 0))
-      if (!this.beforeUpload(file, 0) && file.status != 'removed') {
+      if (!this.beforeUpload(file, 0) && file.status != 'removed' || file.status == 'error') {
         const index = filesList.findIndex(item => item.uid == file.uid)
         filesList.splice(index, 1)
       }
@@ -306,6 +327,11 @@ export default {
       max-height:860px;
       text-align:center;
   }
+/deep/.ant-modal-close-x{
+        height: 35px;
+        line-height: 35px;
+        width: 35px;
+      }
  /deep/.ant-modal-body video{
     width: 90% !important;
   }

+ 25 - 0
src/config/router.config.js

@@ -2648,6 +2648,31 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/productManagement/newProduct',
+            redirect: '/productManagement/newProduct/list/onlineInfo/1',
+            name: 'productLaunchInfo',
+            component: BlankLayout,
+            meta: {
+              title: '产品上线信息',
+              icon: 'rise'
+              // permission: 'M_productLaunchInfoList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list/:type/:onlineFalg',
+                name: 'productLaunchInfoList',
+                component: () => import(/* webpackChunkName: "productManagement" */ '@/views/productManagement/newProduct/list.vue'),
+                meta: {
+                  title: '产品上线信息列表',
+                  icon: 'rise',
+                  hidden: true
+                  // permission: 'M_productLaunchInfoList'
+                }
+              }
+            ]
+          },
           {
             path: '/productManagement/productOfflineAudit',
             redirect: '/productManagement/productOfflineAudit/list',

+ 6 - 0
src/libs/tools.js

@@ -505,4 +505,10 @@ export const removeEmptyStr = function(str){
     return strs;
   }
   return '';
+}
+// 移动数组项
+export const moveElement = function (arr, fromIndex, toIndex) {
+  const element = arr.splice(fromIndex, 1)[0];
+  arr.splice(toIndex, 0, element);
+  return arr;
 }

+ 11 - 11
src/views/Home.vue

@@ -83,7 +83,7 @@ export default {
     // 查看更多产品
     seeMore () {
       this.openNewProduct = false
-      this.$router.push({ name: this.onlineFalg == 1 ? 'newProductList' : 'oldProductList', params: { onlineFalg: this.onlineFalg } })
+      this.$router.push({ name: this.onlineFalg == 1 ? 'newProductList' : 'oldProductList', params: { onlineFalg: this.onlineFalg, type: 'newProduct' } })
     },
     // 关闭弹框
     cancelProductTips () {
@@ -108,16 +108,16 @@ export default {
         vm.openResetPwd = true
       }
       // 退货原因列表
-        vm.getLookUpDataByCode({
-          code: 'GOOD_PRODUCT_RETURN',
-          key: 'goodReturnReason',
-          isEnable: 1
-        })
-        vm.getLookUpDataByCode({
-          code: 'DEFECTIVE_PRODUCT_RETURN',
-          key: 'defectiveReturnReason',
-          isEnable: 1
-        })
+      vm.getLookUpDataByCode({
+        code: 'GOOD_PRODUCT_RETURN',
+        key: 'goodReturnReason',
+        isEnable: 1
+      })
+      vm.getLookUpDataByCode({
+        code: 'DEFECTIVE_PRODUCT_RETURN',
+        key: 'defectiveReturnReason',
+        isEnable: 1
+      })
       // 菜单数据
       vm.getYyMenuList()
       vm.$store.state.app.priceAuthOptions = [

+ 12 - 12
src/views/allocationManagement/transfersPrint/list.vue

@@ -232,7 +232,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return allocateBillList(Object.assign(parameter, this.queryParam, {authWarehouseFlag:1})).then(res => {
+        return allocateBillList(Object.assign(parameter, this.queryParam, { authWarehouseFlag: 1 })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -257,27 +257,27 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '10%' },
-        { title: '调往对象', dataIndex: 'targetName', width: '12%', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '发货编号', dataIndex: 'sendNo', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '8%' },
+        { title: '调往对象', dataIndex: 'targetName', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '发货编号', dataIndex: 'sendNo', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '发货说明', dataIndex: 'explainInfo', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '打印状态', scopedSlots: { customRender: 'printStatus' }, width: '6%', align: 'center' },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印状态', scopedSlots: { customRender: 'printStatus' }, width: '5%', align: 'center' },
         { title: '允许打印时间', dataIndex: 'allowPrintTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'printCount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.isShowWarehouse) {
-        arr.splice(4, 0, { title: '调出仓库', dataIndex: 'warehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } })
+        arr.splice(4, 0, { title: '调出仓库', dataIndex: 'warehouseName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } })
       }
 
       if (this.$hasPermissions('M_transfersPrintList_salesPrice')) { //  售价权限
-        arr.splice(9, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(10, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(11, 0, { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(12, 0, { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(9, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(10, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(11, 0, { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(12, 0, { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
 
       return arr

+ 32 - 11
src/views/productManagement/newProduct/list.vue

@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item :label="($route.params.onlineFalg=='1'?'上':'下')+'线时间'">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
@@ -64,10 +64,6 @@
         <template slot="auditTimeTit">
           {{ $route.params.onlineFalg=='1'?'上':'下' }}线时间
         </template>
-        <!-- 上/下线时间 内容 -->
-        <template slot="auditTime" slot-scope="text, record">
-          {{ $route.params.onlineFalg=='1'?record.auditTime:record.auditTime }}
-        </template>
         <!-- 产品分类 -->
         <template slot="productType" slot-scope="text, record">
           <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
@@ -86,14 +82,15 @@
     </a-spin>
   </a-card>
 </template>
-
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { queryNewProductPage } from '@/api/product'
+import { queryNewProductPage, queryOnlinePageList } from '@/api/product'
 import { STable, VSelect } from '@/components'
 import ProductBrand from '@/views/common/productBrand.js'
 import productTypeAll from '@/views/common/productTypeAll.js'
 import rangeDate from '@/views/common/rangeDate.vue'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 export default {
   name: 'NewProductList',
   mixins: [commonMixin],
@@ -119,9 +116,13 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
+      time: [
+        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
       columns: [
         { title: '序号', dataIndex: 'no', width: 50, align: 'center' },
-        { slots: { title: 'auditTimeTit' }, scopedSlots: { customRender: 'auditTime' }, width: 140, align: 'center' },
+        { slots: { title: 'auditTimeTit' }, dataIndex: 'auditTime', width: 140, align: 'center',customRender: function (text) { return text || '--' } },
         { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 140, align: 'center' },
         { title: '产品名称', dataIndex: 'name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
@@ -134,7 +135,19 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return queryNewProductPage(Object.assign(parameter, this.queryParam, { onlineFalg: this.$route.params.onlineFalg })).then(res => {
+        const ajaxName = this.$route.params.type == 'onlineInfo' ? queryOnlinePageList : queryNewProductPage
+        if (this.$route.params.type == 'onlineInfo') {
+          if (this.queryParam.beginDate || this.queryParam.endDate) {
+            this.queryParam.onlineFalg = 1
+            this.queryParam.newProductDateScope = 9999
+          } else {
+            this.queryParam.onlineFalg = undefined
+            this.queryParam.newProductDateScope = undefined
+          }
+        } else {
+          this.queryParam.onlineFalg = this.$route.params.onlineFalg
+        }
+        return ajaxName(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -161,8 +174,6 @@ export default {
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
       this.queryParam.code = ''
       this.queryParam.name = ''
       this.queryParam.origCode = ''
@@ -172,6 +183,16 @@ export default {
       this.queryParam.productTypeSn3 = ''
       this.queryParam.enabledFlag = undefined
       this.productType = []
+      if (this.$route.params.type == 'onlineInfo') {
+        this.$refs.rangeDate.resetDate(this.time)
+        this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+        this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      } else {
+        this.queryParam.beginDate = ''
+        this.queryParam.endDate = ''
+        this.time = []
+        this.$refs.rangeDate.resetDate([])
+      }
       this.$refs.table.refresh(true)
     },
     //  详情

+ 1 - 0
src/views/productManagement/productInfo/edit.vue

@@ -363,6 +363,7 @@ export default {
     },
     // 产品图片上传
     changeImage (file) {
+      console.log(file.split(","))
       this.form.productMsg = file
     },
     validateQrCode (rule, value, callback) {

+ 52 - 12
src/views/promotionRulesManagement/dealerPromotions/addModal.vue

@@ -36,12 +36,21 @@
         <a-form-model-item label="费用所属部门" prop="expenseDepartmentSn">
           <department style="width: 100%;" @change="departementChange" id="promotionList-basicInfo-activeDate" v-model="form.expenseDepartmentSn"></department>
         </a-form-model-item>
-        <a-form-model-item label="参与客户" prop="dealerSnList">
+        <a-form-model-item label="参与客户" prop="dealerScope">
           <a-row :gutter="15">
-            <a-col :md="3" :sm="24">
+            <a-col :md="12" :sm="24">
+              <a-select v-model="form.dealerScope" placeholder="请选择参与客户" @change="changeDealerScope" allowClear>
+                <a-select-option value="ALL_DEALER">全部客户</a-select-option>
+                <a-select-option value="SOME_DEALER">部分客户</a-select-option>
+              </a-select>
+            </a-col>
+            <a-col :md="3" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
               <a-button type="primary" :loading="spinning" @click="handleDealerModal">选择</a-button>
             </a-col>
-            <a-col :md="6" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
+            <a-col :md="4" :sm="24" v-show="form.dealerScope && form.dealerScope!='ALL_DEALER' ">
+              <a-button type="primary" :loading="spinning" @click="openGuideModal=true" ghost>导入客户</a-button>
+            </a-col>
+            <a-col :md="5" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
               已{{ chooseDealerList.length }}选项
             </a-col>
             <a-col :md="24" :sm="24" v-show="chooseDealerList && chooseDealerList.length>0">
@@ -96,6 +105,8 @@
         <chooseDealer ref="dealerChoose" pageType="dealerPromotion" @plAdd="handleAddDealer"></chooseDealer>
       </div>
     </a-modal>
+    <!-- 导入参与客户 -->
+    <importDealerModa :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeOk" />
   </a-modal>
 </template>
 
@@ -106,11 +117,12 @@ import department from '@/views/expenseManagement/expenseReimbursement/departmen
 import warehouse from '@/views/common/chooseWarehouse.js'
 import moment from 'moment'
 import chooseDealer from '../promotionManagement/chooseDealer'
+import importDealerModa from './importDealerModa.vue'
 import { dealerPromotionSave, dealerPromotionInfo, dealerPromotionEdit } from '@/api/promotion'
 export default {
   name: 'PromotionListBasicInfoModal',
   mixins: [commonMixin],
-  components: { Upload, department, warehouse, chooseDealer },
+  components: { Upload, department, warehouse, chooseDealer, importDealerModa },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -136,7 +148,8 @@ export default {
         description: '', // 活动简称
         content: '', // 活动描述
         attachmentList: '', // 附件
-        dealerSnList: []// 参与客户
+        dealerSnList: [], // 参与客户
+        dealerScope: 'SOME_DEALER' // 全部客户   部分客户
       },
       openDealerModal: false,
       chooseDealerList: [],
@@ -146,11 +159,12 @@ export default {
         title: [{ required: true, message: '请输入促销名称', trigger: 'blur' }],
         activeDate: [{ required: true, message: '请选择促销时间', trigger: 'change' } ],
         expenseDepartmentSn: [{ required: true, message: '请选择费用所属部门', trigger: 'change' }],
-        dealerSnList: [{ required: true, message: '请选择参与客户', trigger: 'change' }],
+        dealerScope: [{ required: true, message: '请选择参与客户', trigger: 'change' }],
         description: [{ required: true, message: '请输入促销简称', trigger: 'blur' }],
         content: [{ required: true, message: '请输入促销描述', trigger: 'blur' }]
       },
-      attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo'
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
+      openGuideModal: false
     }
   },
   methods: {
@@ -205,10 +219,21 @@ export default {
     //  新增/编辑
     handleSave () {
       const _this = this
-      const newArr = this.chooseDealerList.map(item => {
-        return item.dealerSn
-      })
-      _this.form.dealerSnList = newArr
+      if (_this.form.dealerScope === 'SOME_DEALER') {
+        if (_this.chooseDealerList && _this.chooseDealerList.length > 0) {
+          const newArr = this.chooseDealerList.map(item => {
+            return item.dealerSn
+          })
+          _this.form.dealerSnList = newArr
+        } else {
+          _this.$message.error('请选择参与客户')
+          return
+        }
+      } else {
+        this.form.dealerList = []
+        this.form.dealerSnList = []
+      }
+
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
@@ -233,6 +258,11 @@ export default {
         }
       })
     },
+    changeDealerScope (val) {
+      if (val === 'ALL_DEALER') {
+        this.chooseDealerList = []
+      }
+    },
     // 重置
     resetSearchForm () {
       this.form = {
@@ -242,7 +272,8 @@ export default {
         description: '', // 活动简称
         content: '', // 活动描述
         attachmentList: '', // 附件
-        dealerSnList: []// 参与客户
+        dealerSnList: [], // 参与客户
+        dealerScope: 'SOME_DEALER'
       }
       this.attachList = []
       this.chooseDealerList = []
@@ -272,6 +303,15 @@ export default {
     // 不可选日期
     disabledDate (date, dateStrings) {
       return date && date.valueOf('day') < moment().subtract(1, 'day') // 今天以后,包含今天
+    },
+    // 导入参与客户
+    hanldeOk (arr) {
+      const list = [...this.chooseDealerList, ...arr]
+      const obj = {}
+      this.chooseDealerList = list.reduce((cur, next) => {
+        obj[next.dealerSn] ? '' : obj[next.dealerSn] = true && cur.push(next)
+        return cur
+      }, [])
     }
   },
   watch: {

+ 184 - 0
src/views/promotionRulesManagement/dealerPromotions/chooseImportDealerModal.vue

@@ -0,0 +1,184 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="确认导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="80%">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.allocateSn"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="unTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.errorDesc"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          class="button-primary"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import {downDealerFail } from '@/api/promotion'
+export default {
+  name: 'ChooseImportModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      loadData: [],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  computed: {
+    nowColumns () {
+      const _this = this
+      let columnsArr = [
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '经销商名称', dataIndex: 'dealerName', width: '90%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      return columnsArr
+    },
+    nowUnColumns () {
+      const _this = this
+      const unColumnsArr = [
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '经销商名称', dataIndex: 'dealerName', width: '50%', align: 'center', customRender: function (text) { return text || '--' },ellipsis: true },
+        { title: '备注',dataIndex: 'remarks',  width: '40%', align: 'center', customRender: function (text) { return text || '--' } ,ellipsis: true}
+      ]
+      return unColumnsArr
+    }
+  },
+  methods: {
+    getData () {
+      const paramsData = JSON.parse(JSON.stringify(this.paramsData))
+      this.loadData = paramsData.rightList || []
+      this.unLoadData = paramsData.errorList || []
+      this.loadData.map((item, index) => {
+        item.no = index + 1
+      })
+      this.unLoadData.map((item, index) => {
+        item.no = index + 1
+        item.importErrorMsgSet = item.remarks.split(',')
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.loadData.length == 0) {
+        this.$message.warning('没有可导入的数据!')
+      } else {
+        const data = this.paramsData.rightList
+        this.$emit('ok', data)
+        this.isShow = false
+      }
+    },
+    // 导出错误项
+    handleError () {
+      const _this = this
+      if (_this.unLoadData.length < 1) {
+        _this.$message.info('暂无可导出的错误项~')
+        return
+      }
+      _this.spinning = true
+      hdExportExcel(downDealerFail, _this.unLoadData, '导出参与客户错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 2 - 1
src/views/promotionRulesManagement/dealerPromotions/detail.vue

@@ -19,7 +19,8 @@
           <a-descriptions-item label="促销时间" v-else>--</a-descriptions-item>
           <a-descriptions-item label="审核通过时间">{{ detailData.auditDate||'--' }}</a-descriptions-item>
           <a-descriptions-item label="费用所属部门">{{ detailData.expenseDepartmentName || '--' }}</a-descriptions-item>
-          <a-descriptions-item label="参与客户"><div @click="handleSee">共<span class="link-bule">{{ detailData.dealerQty }}</span>个</div></a-descriptions-item>
+          <a-descriptions-item label="参与客户" v-if="detailData.dealerScope!='ALL_DEALER'"><div @click="handleSee">共<span class="link-bule">{{ detailData.dealerQty }}</span>个</div></a-descriptions-item>
+          <a-descriptions-item label="参与客户" v-else>全部客户</a-descriptions-item>
           <a-descriptions-item label="促销描述" :span="2">
             <div class="descItem">{{ detailData.content || '' }}</div>
           </a-descriptions-item>

+ 192 - 0
src/views/promotionRulesManagement/dealerPromotions/importDealerModa.vue

@@ -0,0 +1,192 @@
+<template>
+  <a-modal
+    centered
+    class="importGuide-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="800">
+    <div class="importGuide-con">
+      <div class="explain-con">
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>1</span>准备导入
+          </div>
+          <ul>
+            <li>1)请先下载导入模板,模板中已标示出必填项 </li>
+            <li>2) “经销商名称”具有唯一性,需输入完整经销商名称,不能为空,不可重复,需是系统中已存在的经销商</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+                <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>2</span>上传数据文件
+          </div>
+          <p>目前支持的文件类型*.xls,*.xlsx.</p>
+          <div style="overflow: hidden;padding-left: 23px;">
+            <Upload
+              id="importGuide-attachList"
+              ref="importUpload"
+              :maxNums="1"
+              fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+              uploadType="attach"
+              :action="attachAction"
+              upText="选择导入文件"
+              @remove="resetSearchForm"
+              @change="changeImport"></Upload>
+          </div>
+        </div>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="importGuide-nextStep"
+          size="large"
+          class="button-primary"
+          @click="handlerNextStep"
+          style="padding: 0 60px;">下一步</a-button>
+        <a-button
+          id="importGuide-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+      </div>
+    </div>
+    <!-- 导入 -->
+    <chooseImportModal ref="chooseImportBox" :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
+  </a-modal>
+</template>
+
+<script>
+import ChooseImportModal from './chooseImportDealerModal.vue'
+import { Upload } from '@/components'
+export default {
+  name: 'ImportGuideModal',
+  components: { ChooseImportModal, Upload },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    params: {
+      type: Object,
+      default: null
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      openImportModal: false, //  导入
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/promotion/importDealer', // 导入门槛、正价、促销产品
+      paramsData: null,
+      filePath: ''
+    }
+  },
+  methods: {
+    // 清空数据
+    resetSearchForm () {
+      this.$refs.importUpload.setFileList() //  清空导入文件
+      this.paramsData = null //  清空上传数据
+    },
+    // 下一步
+    handlerNextStep () {
+      if (this.paramsData) {
+        this.openImportModal = true
+      } else {
+        this.$message.warning('添加文件后再进行下一步操作!')
+      }
+    },
+    // 上传文件  change
+    changeImport (file) {
+      if (file && JSON.parse(file).length > 0) {
+        this.paramsData = Object.assign({}, JSON.parse(file)[0] || null, this.params)
+      } else {
+        this.paramsData = null
+      }
+    },
+    // 导入
+    hanldeOk (obj) {
+      if (obj && obj.length > 0) {
+        this.$emit('ok', obj)
+        this.isShow = false
+      }
+    },
+    // 关闭
+    handleClose () {
+      this.openImportModal = false
+      this.isShow = false
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetSearchForm()
+      } else {
+        this.filePath = location.protocol + '//' + location.host + '/templ/参与客户导入列表模板.xlsx'
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .importGuide-modal{
+    .importGuide-con{
+      .explain-con{
+        .explain-item{
+          margin-bottom: 10px;
+          .explain-tit{
+            font-weight: bold;
+            span{
+              display: inline-block;
+              width: 18px;
+              height: 18px;
+              line-height: 16px;
+              text-align: center;
+              margin-right: 5px;
+              border-radius: 50%;
+              border: 1px solid rgba(0, 0, 0, 0.3);
+            }
+          }
+          p{
+            margin: 8px 0;
+            padding-left: 23px;
+          }
+          ul{
+            list-style: none;
+            padding: 0;
+            padding-left: 23px;
+            margin: 0;
+            li{
+              line-height: 26px;
+            }
+          }
+        }
+        #importGuide-attachList{
+          width: 100%;
+        }
+      }
+      .btn-con{
+        margin: 10px 0 20px;
+        text-align: center;
+        .button-cancel{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 5 - 1
src/views/promotionRulesManagement/dealerPromotions/list.vue

@@ -83,7 +83,8 @@
         </template>
         <!-- 参与客户 -->
         <template slot="joinCustomers" slot-scope="text, record">
-          <div @click="handleCustomers(record)">共有<span style="color:#39f;vertical-align:top;">{{ record.dealerSnList?record.dealerSnList.length:0 }}</span>个客户</div>
+          <div v-if="record.dealerScope ==='ALL_DEALER'">全部客户</div>
+          <div class="joinCustomer" v-else @click="handleCustomers(record)">共有<span style="color:#39f;vertical-align:top;">{{ record.dealerSnList?record.dealerSnList.length:0 }}</span>个客户</div>
         </template>
         <!-- 发布状态 -->
         <template slot="releaseStatus" slot-scope="text, record">
@@ -445,5 +446,8 @@ export default {
     .nameBox{
      padding:0 5px;
     }
+    .joinCustomer{
+      cursor:pointer;
+    }
   }
 </style>

+ 6 - 6
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -541,16 +541,16 @@ export default {
       return snArr
     },
     handleProductsAdd (con) {
-      debugger
       const newArr = []
+      const newConArr = []
       con.forEach(newCon => {
         if (!newCon.provincePrice || !newCon.cityPrice || !newCon.specialPrice) {
           newArr.push(newCon.code)
         }
       })
-      con.map((list, pos) => {
-        if (!list.provincePrice || !list.cityPrice || !list.specialPrice) {
-          con.splice(pos, 1)
+      con.forEach((list, pos) => {
+        if (list.provincePrice && list.cityPrice && list.specialPrice) {
+          newConArr.push(list)
         }
       })
       const _this = this
@@ -561,11 +561,11 @@ export default {
           closable: true,
           centered: true,
           onOk () {
-            _this.handleProductsOk(con)
+            _this.handleProductsOk(newConArr)
           }
         })
       } else {
-        _this.handleProductsOk(con)
+        _this.handleProductsOk(newConArr)
       }
     },
     // +新增产品

+ 8 - 1
src/views/salesManagement/backorder/list.vue

@@ -15,6 +15,11 @@
                 <dealerSubareaScopeList ref="custList" id="backorderList-buyerSn" @change="custChange"></dealerSubareaScopeList>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="销售单号">
+                <a-input id="backorderList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+              </a-form-item>
+            </a-col>
             <!-- <a-col :md="6" :sm="24">
               <a-form-model-item label="仓库">
                 <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
@@ -82,7 +87,8 @@ export default {
         beginDate: '',
         endDate: '',
         buyerSn: undefined,
-        warehouseSn: undefined
+        warehouseSn: undefined,
+        salesBillNo: ''
       },
       disabled: false, //  查询、重置按钮是否可操作
       // 加载数据方法 必须为 Promise 对象
@@ -140,6 +146,7 @@ export default {
       this.$refs.rangeDate.resetDate()
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
+      this.queryParam.salesBillNo = ''
       this.queryParam.buyerSn = undefined
       this.queryParam.warehouseSn = undefined
       this.$refs.custList.resetForm()

+ 11 - 9
src/views/salesManagement/salesList/list.vue

@@ -81,16 +81,15 @@
                   <Area id="salesList-provinceSn" v-model="queryParam.provinceSn" placeholder="请选择省"></Area>
                 </a-form-model-item>
               </a-col>
-              <!-- <a-col :md="6" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="超时环节提醒">
-                  <v-select
-                    v-model="queryParam.sendFlag"
-                    id="outboundOrderList-sendFlag"
-                    code="SEND_FLAG"
-                    placeholder="请选择提醒环节"
-                    allowClear></v-select>
+                  <a-select v-model="queryParam.timeoutflag" allowClear placeholder="请选择超时环节提醒状态">
+                    <a-select-option value="NOT_SENDGOODS">未发货</a-select-option>
+                    <a-select-option value="NOT_STOCK">未备货</a-select-option>
+                    <a-select-option value="NOT_COLLECTION">未收款</a-select-option>
+                  </a-select>
                 </a-form-model-item>
-              </a-col> -->
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <div class="table-page-search-submitButtons">
@@ -223,7 +222,8 @@ export default {
         endDate: undefined,
         billStatus: undefined, //  业务状态
         sendFlag: '', // 发货状态
-        provinceSn: undefined// 省份
+        provinceSn: undefined, // 省份
+        timeoutflag: undefined// 超时环节提醒
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -384,6 +384,8 @@ export default {
       this.queryParam.billStatus = undefined
       this.queryParam.sendFlag = ''
       this.queryParam.provinceSn = undefined
+      this.queryParam.timeoutflag = undefined
+
       this.examineTime = []
       this.paymentTime = []
       this.$refs.subarea.clearData()

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 579 - 571
src/views/salesManagement/salesQueryNew/comps/productList.vue


+ 374 - 365
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -36,7 +36,7 @@
         </a-row>
       </a-form>
     </div>
-    
+
     <div class="table-page-search-wrapper">
       <a-row :gutter="15" type="flex" justify="space-between" align="middle">
         <a-col :md="8" :sm="24" style="text-align:left;">
@@ -45,8 +45,11 @@
         <a-col :md="16" :sm="24" style="text-align:right;">
           <a-dropdown>
             <a-menu slot="overlay" @click="handleMenuClick">
+              <a-menu-item key="3">
+                全部仓库设置
+              </a-menu-item>
               <a-menu-item key="0">
-                仓库设置
+                部分仓库设置
               </a-menu-item>
               <a-menu-item key="1">
                 删除已选项
@@ -75,19 +78,19 @@
         </a-col>
       </a-row>
     </div>
-    
+
     <!-- 已选配件列表 -->
     <s-table
-      class="sTable" 
-      ref="table" 
-      size="small" 
-      :scroll="showTotal ? null :{ y: tableHeight }" 
-      :rowKey="(record) => record.id" 
-      :columns="columns" 
-      :data="loadData" 
-      :row-selection="{ columnWidth: 40 }" 
-      @rowSelection="rowSelectionFun" 
-      :pageSize="showTotal?10:30" 
+      class="sTable"
+      ref="table"
+      size="small"
+      :scroll="showTotal ? null :{ y: tableHeight }"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      :row-selection="{ columnWidth: 40 }"
+      @rowSelection="rowSelectionFun"
+      :pageSize="showTotal?10:30"
       :defaultLoadData="false"
       bordered>
       <!-- 产品编码 -->
@@ -134,7 +137,7 @@
       <template slot="warehouseBox" slot-scope="text, record">
         <a-select
           size="small"
-          style="width:100%;" 
+          style="width:100%;"
           placeholder="请选择仓库"
           v-model="record.warehouseSn"
           :showSearch="true"
@@ -158,9 +161,9 @@
         <!-- 总计 -->
         <a-alert type="info" v-if="showTotal" banner :showIcon="false">
           <div slot="message" style="text-align: right;">
-              款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : 0 }}</strong>;
-              数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : 0 }}</strong>;
-              <span v-if="$hasPermissions('B_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
+            款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : 0 }}</strong>;
+            数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : 0 }}</strong>;
+            <span v-if="$hasPermissions('B_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
           </div>
         </a-alert>
       </template>
@@ -169,389 +172,395 @@
     <!-- 导入产品 -->
     <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: salesBillSn}" @close="closeGuideModel" @ok="hanldeOk" />
     <!-- 仓库设置 -->
-    <setWarehouse :show="openWarehouseModal" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false"></setWarehouse>
+    <setWarehouse :show="openWarehouseModal" :title="warehouseTit" @ok="chooseWarehouseOk" @cancel="openWarehouseModal=false;warehouseTit = ''"></setWarehouse>
   </div>
 </template>
 
 <script>
-  import { commonMixin } from '@/utils/mixin'
-  import { STable, VSelect } from '@/components'
-  import ImportGuideModal from './importGuideModal.vue'
-  import setWarehouse from './setWarehouse.vue'
-  import chooseWarehouse from '@/views/common/chooseWarehouse'
-  import ProductBrand from '@/views/common/productBrand.js'
-  import productTypeAll from '@/views/common/productTypeAll.js'
-  import { 
-    salesDetailList, 
-    salesDetailInsert, 
-    salesDetailUpdateQty, 
-    salesDetailDel, 
-    salesDetailBatchDel, 
-    deleteAll, 
-    updateWarehouse, 
-    salesDetaiCount, 
-    salesBatchInsert } from '@/api/salesDetailNew'
-  export default {
-    name: 'ProductList',
-    mixins: [commonMixin],
-    components: { 
-      STable,
-      VSelect,
-      ImportGuideModal,
-      chooseWarehouse,
-      setWarehouse,
-      ProductBrand,
-      productTypeAll
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import ImportGuideModal from './importGuideModal.vue'
+import setWarehouse from './setWarehouse.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
+import ProductBrand from '@/views/common/productBrand.js'
+import productTypeAll from '@/views/common/productTypeAll.js'
+import {
+  salesDetailList,
+  salesDetailInsert,
+  salesDetailUpdateQty,
+  salesDetailDel,
+  salesDetailBatchDel,
+  deleteAll,
+  updateWarehouse,
+  salesDetaiCount,
+  salesBatchInsert } from '@/api/salesDetailNew'
+export default {
+  name: 'ProductList',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    ImportGuideModal,
+    chooseWarehouse,
+    setWarehouse,
+    ProductBrand,
+    productTypeAll
+  },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
     },
-    props: {
-      openModal: { //  弹框显示状态
-        type: Boolean,
-        default: false
-      },
-      newLoading: Boolean,
-      detailData: {
-        type: Object,
-        default: function(){return null}
-      },
-      warehouseSn: {
-        type: String,
-        default: ''
+    newLoading: Boolean,
+    detailData: {
+      type: Object,
+      default: function () { return null }
+    },
+    warehouseSn: {
+      type: String,
+      default: ''
+    },
+    salesBillSn: {
+      type: String,
+      default: ''
+    },
+    showTotal: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.queryParam.salesBillSn = this.salesBillSn || ''
+        this.getCount()
+        return salesDetailList(Object.assign(parameter, this.queryParam, { showStock: true })).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
+              data.list[i].qtyBackups = data.list[i].qty
+              data.list[i].warehouseBackups = data.list[i].warehouseSn
+            }
+            this.dataSource = data.list
+          }
+          this.disabled = false
+          return data
+        })
       },
-      salesBillSn: {
-        type: String,
-        default: ''
+      showSearch: false,
+      openWarehouseModal: false, // 打开仓库设置
+      openGuideModal: false, //  导入产品引导
+      delLoading: false,
+      chooseDisabled: false,
+      disabled: false, //  查询、重置按钮是否可操作
+      queryParam: {
+        warehouseSn: undefined,
+        productCode: '',
+        productName: '',
+        productBrandSn: undefined,
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
       },
-      showTotal:{
-        type: Boolean,
-        default: true
+      productType: [],
+      rowSelectionInfo: null,
+      warehouseDataList: [],
+      countData: null,
+      isInster: false,
+      warehouseTit: ''
+    }
+  },
+  computed: {
+    selectTotal () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
+    },
+    tableHeight () {
+      return window.innerHeight - 395
+    },
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '13%', align: 'center' },
+        { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: '20%', align: 'left' },
+        // { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '8%', align: 'center' },
+        { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '8%', align: 'center' },
+        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '15%', align: 'center' },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
+        arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(7, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
       }
+      return arr
+    }
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    warehouseLoad (sn, list) {
+      this.warehouseDataList = list
+    },
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    openCpModal () {
+      this.$emit('openCpModal', 0, 'productNormalList')
     },
-    data () {
-      return {
-        spinning: false,
-        // 加载数据方法 必须为 Promise 对象
-        loadData: parameter => {
-          this.disabled = true
-          this.queryParam.salesBillSn = this.salesBillSn || ''
-          this.getCount()
-          return salesDetailList(Object.assign(parameter, this.queryParam, {showStock: true})).then(res => {
-            let data
+    // 统计
+    getCount () {
+      salesDetaiCount(Object.assign(this.queryParam, { showStock: true })).then(res => {
+        if (res.status == 200) {
+          this.countData = res.data
+        }
+      })
+    },
+    handleBatchDelAll () {
+      const _this = this
+      if (_this.dataSource.length == 0) {
+        _this.$message.warning('暂无可删除的已选产品!')
+        return
+      }
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除全部已选产品吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          deleteAll({ salesBillSn: _this.salesBillSn }).then(res => {
             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
-                data.list[i].qtyBackups = data.list[i].qty
-                data.list[i].warehouseBackups = data.list[i].warehouseSn
-              }
-              this.dataSource = data.list
+              _this.$refs.table.refresh(false)
+              _this.$emit('insterOk', 'normal')
+              _this.$message.success(res.message)
             }
-            this.disabled = false
-            return data
+            _this.spinning = false
           })
-        },
-        showSearch: false,
-        openWarehouseModal: false, // 打开仓库设置
-        openGuideModal: false, //  导入产品引导
-        delLoading: false,
-        chooseDisabled: false,
-        disabled: false, //  查询、重置按钮是否可操作
-        queryParam: {
-          warehouseSn: undefined,
-          productCode: '',
-          productName: '',
-          productBrandSn: undefined,
-          productTypeSn1: '', //  产品一级分类
-          productTypeSn2: '', //  产品二级分类
-          productTypeSn3: '' //  产品三级分类
-        },
-        productType: [],
-        rowSelectionInfo: null,
-        warehouseDataList: [],
-        countData: null,
-        isInster: false
-      }
+        }
+      })
     },
-    computed: {
-      selectTotal () {
-        return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
-      },
-      tableHeight(){
-        return window.innerHeight - 395
-      },
-      columns () {
-        const arr = [
-          { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-          { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '13%', align: 'center' },
-          { title: '产品名称', dataIndex: 'productEntity.name', scopedSlots: { customRender: 'productName' }, width: '20%', align: 'left' },
-          // { title: '售价', dataIndex: 'price', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '8%', align: 'center' },
-          { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '8%', align: 'center' },
-          { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '15%', align: 'center' },
-          { title: '单位', dataIndex: 'productEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-          // { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
-        ]
-        if (this.$hasPermissions('B_salesEdit_salesPrice')) { // 售价权限
-          arr.splice(3, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-          arr.splice(7, 0, { title: '售价小计', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+    // 批量删除已选产品
+    handleBatchDel () {
+      const _this = this
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        _this.$message.warning('请先选择要删除的产品后再进行批量操作!')
+        return
+      }
+      const obj = []
+      _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
+        obj.push(item.salesBillDetailSn)
+      })
+      this.$confirm({
+        title: '提示',
+        content: '已选产品' + obj.length + '项,确认要批量删除吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          salesDetailBatchDel({
+            salesBillSn: _this.salesBillSn,
+            salesBillDetailSnList: obj
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$refs.table.refresh(false)
+              _this.$emit('insterOk', 'normal')
+              _this.$message.success(res.message)
+            }
+            _this.spinning = false
+          })
         }
-        return arr
+      })
+    },
+    // 设置单个出库仓库
+    handleWarehouseBox (row) {
+      const snArr = [row.salesBillDetailSn]
+      const ajax_data = {
+        warehouseSn: row.warehouseSn,
+        salesBillDetailSnList: snArr,
+        salesBillSn: this.salesBillSn
       }
+      this.setWarehouseInfo(ajax_data)
     },
-    methods: {
-      filterOption (input, option) {
-        return (
-          option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-        )
-      },
-      warehouseLoad(sn,list){
-        this.warehouseDataList = list
-      },
-      // 表格选中项
-      rowSelectionFun (obj) {
-        this.rowSelectionInfo = obj || null
-      },
-      openCpModal(){
-        this.$emit('openCpModal', 0, 'productNormalList')
-      },
-      // 统计
-      getCount(){
-        salesDetaiCount(Object.assign(this.queryParam, {showStock: true})).then(res => {
-          if(res.status == 200){
-            this.countData = res.data
-          }
-        })
-      },
-      handleBatchDelAll () {
-        const _this = this
-        if (_this.dataSource.length == 0) {
-          _this.$message.warning('暂无可删除的已选产品!')
-          return
+    chooseWarehouseOk (sn) {
+      const _this = this
+      const snArr = []
+      _this.rowSelectionInfo.selectedRows.forEach(item => {
+        snArr.push(item.salesBillDetailSn)
+      })
+      const ajax_data = {
+        warehouseSn: sn,
+        salesBillDetailSnList: snArr,
+        salesBillSn: _this.salesBillSn,
+        allFlag: _this.warehouseTit ? true : undefined
+      }
+      _this.setWarehouseInfo(ajax_data)
+    },
+    setWarehouseInfo (data) {
+      const _this = this
+      _this.spinning = true
+      updateWarehouse(data).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
         }
-        this.$confirm({
-          title: '提示',
-          content: '确认要删除全部已选产品吗?',
-          centered: true,
-          onOk () {
-            _this.spinning = true
-            deleteAll({ salesBillSn: _this.salesBillSn }).then(res => {
-              if (res.status == 200) {
-                _this.$refs.table.refresh(false)
-                _this.$emit('insterOk','normal')
-                _this.$message.success(res.message)
-              }
-              _this.spinning = false
-            })
-          }
-        })
-      },
-      // 批量删除已选产品
-      handleBatchDel () {
-        const _this = this
+        _this.$refs.table.refresh(false)
+        _this.openWarehouseModal = false
+        _this.spinning = false
+      })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    handleMenuClick (e) {
+      const _this = this
+      if (e.key == 0) { // 仓库设置
         if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
-          _this.$message.warning('请先选择要删除的产品后再进行批量操作!')
-          return
-        }
-        const obj = []
-        _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => {
-          obj.push(item.salesBillDetailSn)
-        })
-        this.$confirm({
-          title: '提示',
-          content: '已选产品' + obj.length + '项,确认要批量删除吗?',
-          centered: true,
-          onOk () {
-            _this.spinning = true
-            salesDetailBatchDel({
-              salesBillSn: _this.salesBillSn,
-              salesBillDetailSnList: obj
-            }).then(res => {
-              if (res.status == 200) {
-                _this.$refs.table.refresh(false)
-                _this.$emit('insterOk','normal')
-                _this.$message.success(res.message)
-              }
-              _this.spinning = false
-            })
-          }
-        })
-      },
-      // 设置单个出库仓库
-      handleWarehouseBox (row) {
-        const snArr = [row.salesBillDetailSn]
-        const ajax_data = {
-          warehouseSn: row.warehouseSn,
-          salesBillDetailSnList: snArr,
-          salesBillSn: this.salesBillSn
-        }
-        this.setWarehouseInfo(ajax_data)
-      },
-      chooseWarehouseOk (sn) {
-        const _this = this
-        const snArr = []
-        _this.rowSelectionInfo.selectedRows.forEach(item => {
-          snArr.push(item.salesBillDetailSn)
-        })
-        const ajax_data = {
-          warehouseSn: sn,
-          salesBillDetailSnList: snArr,
-          salesBillSn: _this.salesBillSn
+          _this.$message.warning('请先选择要设置的产品!')
+        } else {
+          _this.openWarehouseModal = true
         }
-        _this.setWarehouseInfo(ajax_data)
-      },
-      setWarehouseInfo (data) {
-        const _this = this
+      } else if (e.key == 1) { // 删除已选项
+        this.handleBatchDel()
+      } else if (e.key == 3) {
+        _this.$refs.table.clearSelected()
+        _this.warehouseTit = '全部仓库设置'
+        _this.openWarehouseModal = true
+      } else {
+        this.handleBatchDelAll()
+      }
+    },
+    // 已选产品  blur
+    onCellBlur (val, record) {
+      const _this = this
+      //  光标移出,值发生改变再调用编辑接口
+      if (val && val != record.qtyBackups) {
         _this.spinning = true
-        updateWarehouse(data).then(res => {
+        salesDetailUpdateQty({
+          salesBillDetailSn: record.salesBillDetailSn,
+          qty: record.qty,
+          salesBillSn: _this.salesBillSn
+        }).then(res => {
           if (res.status == 200) {
+            _this.$emit('insterOk', 'normal')
             _this.$message.success(res.message)
           }
           _this.$refs.table.refresh(false)
-          _this.openWarehouseModal = false
           _this.spinning = false
         })
-      },
-      //  产品分类  change
-      changeProductType (val, opt) {
-        this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
-        this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
-        this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
-      },
-      handleMenuClick (e) {
-        const _this = this
-        if (e.key == 0) { // 仓库设置
-          if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length < 1)) {
-            _this.$message.warning('请先选择要设置的产品!')
-          } else {
-            _this.openWarehouseModal = true
-          }
-        } else if (e.key == 1) { // 删除已选项
-          this.handleBatchDel()
-        } else {
-          this.handleBatchDelAll()
-        }
-      },
-      // 已选产品  blur
-      onCellBlur (val, record) {
-        const _this = this
-        //  光标移出,值发生改变再调用编辑接口
-        if (val && val != record.qtyBackups) {
+      } else {
+        record.qty = record.qtyBackups
+      }
+    },
+    // 重置
+    resetSearchForm (flag) {
+      this.queryParam.productCode = ''
+      this.queryParam.productName = ''
+      this.queryParam.warehouseSn = undefined
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.productType = []
+      this.$refs.table.clearSelected()
+      this.$refs.table.refresh(!!flag)
+    },
+    // 删除产品
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.delLoading = true
           _this.spinning = true
-          salesDetailUpdateQty({
-            salesBillDetailSn: record.salesBillDetailSn,
-            qty: record.qty,
-            salesBillSn: _this.salesBillSn
-          }).then(res => {
+          salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn }).then(res => {
             if (res.status == 200) {
-              _this.$emit('insterOk','normal')
               _this.$message.success(res.message)
+              _this.$refs.table.refresh(false)
+              _this.$emit('insterOk', 'normal')
             }
-            _this.$refs.table.refresh(false)
+            _this.delLoading = false
             _this.spinning = false
           })
-        } else {
-          record.qty = record.qtyBackups
         }
-      },
-      // 重置
-      resetSearchForm (flag) {
-        this.queryParam.productCode = ''
-        this.queryParam.productName = ''
-        this.queryParam.warehouseSn = undefined
-        this.queryParam.productBrandSn = undefined
-        this.queryParam.productTypeSn1 = ''
-        this.queryParam.productTypeSn2 = ''
-        this.queryParam.productTypeSn3 = ''
-        this.productType = []
-        this.$refs.table.clearSelected()
-        this.$refs.table.refresh(!!flag)
-      },
-      // 删除产品
-      handleDel (row) {
-        const _this = this
-        this.$confirm({
-          title: '提示',
-          content: '确认要删除吗?',
-          centered: true,
-          closable: true,
-          onOk () {
-            _this.delLoading = true
-            _this.spinning = true
-            salesDetailDel({ salesBillDetailSn: row.salesBillDetailSn, salesBillSn: _this.salesBillSn }).then(res => {
-              if (res.status == 200) {
-                _this.$message.success(res.message)
-                _this.$refs.table.refresh(false)
-                _this.$emit('insterOk','normal')
-              }
-              _this.delLoading = false
-              _this.spinning = false
-            })
-          }
-        })
-      },
-      // 添加产品
-      insterProduct (row, promotionFlag) {
-        console.log(row, promotionFlag)
-        // 防止多次添加产品
-        if (this.isInster) { return }
-        this.saveNewProduct(row, promotionFlag)
-      },
-      // 保存添加的产品到销售列表
-      saveNewProduct (row, promotionFlag) {
-        this.$message.loading('正在添加产品...', 1)
-        this.isInster = true
-        this.spinning = true
-        salesDetailInsert({
-          packQty: row.productPackQty,
-          productSn: row.productSn,
-          showCost: row.lastStockCost,
-          price: row.productPrice,
-          origPrice: row.productPrice,
-          promotionGiftsAmount: 0,
-          usePromotionGiftsAmount: 0,
-          qty: row.salesNums,
-          salesBillSn: this.detailData.salesBillSn,
-          salesBillNo: this.detailData.salesBillNo,
-          purchaseBillSn: this.detailData.purchaseBillSn,
-          purchaseBillNo: this.detailData.purchaseBillNo,
-          stockSn: row.stockSn,
-          promotableFlag: row.isJoinActivityProduct || 0, // 可促销标记 有活动的传1,没活动的传0
-          promotionFlag: promotionFlag, // 促销标记 正品传0,促销品传1
-          warehouseSn: row.warehouseSn
-        }).then(res => {
-          if (res.status == 200) {
-            this.$message.success('产品添加成功', 2.5)
-            this.resetSearchForm(true)
-            this.$emit('insterOk','normal')
-          }
-          this.spinning = false
-          this.isInster = false
-        }).catch(err => {
-          this.spinning = false
-          this.isInster = false
-        })
-      },
-      closeGuideModel () {
-        this.openGuideModal = false
-      },
-      // 批量导入产品
-      hanldeOk (data, salesPromoSn) {
-        const params = {
-          salesBillSn: this.detailData.salesBillSn,
-          salesBillDetailList: data
+      })
+    },
+    // 添加产品
+    insterProduct (row, promotionFlag) {
+      console.log(row, promotionFlag)
+      // 防止多次添加产品
+      if (this.isInster) { return }
+      this.saveNewProduct(row, promotionFlag)
+    },
+    // 保存添加的产品到销售列表
+    saveNewProduct (row, promotionFlag) {
+      this.$message.loading('正在添加产品...', 1)
+      this.isInster = true
+      this.spinning = true
+      salesDetailInsert({
+        packQty: row.productPackQty,
+        productSn: row.productSn,
+        showCost: row.lastStockCost,
+        price: row.productPrice,
+        origPrice: row.productPrice,
+        promotionGiftsAmount: 0,
+        usePromotionGiftsAmount: 0,
+        qty: row.salesNums,
+        salesBillSn: this.detailData.salesBillSn,
+        salesBillNo: this.detailData.salesBillNo,
+        purchaseBillSn: this.detailData.purchaseBillSn,
+        purchaseBillNo: this.detailData.purchaseBillNo,
+        stockSn: row.stockSn,
+        promotableFlag: row.isJoinActivityProduct || 0, // 可促销标记 有活动的传1,没活动的传0
+        promotionFlag: promotionFlag, // 促销标记 正品传0,促销品传1
+        warehouseSn: row.warehouseSn
+      }).then(res => {
+        if (res.status == 200) {
+          this.$message.success('产品添加成功', 2.5)
+          this.resetSearchForm(true)
+          this.$emit('insterOk', 'normal')
         }
-       
-        salesBatchInsert(params).then(res => {
-          if (res.status == 200) {
-            this.$message.success('产品导入成功', 2.5)
-            this.resetSearchForm(true)
-            this.$emit('insterOk','normal')
-          }
-        })
-      },
+        this.spinning = false
+        this.isInster = false
+      }).catch(err => {
+        this.spinning = false
+        this.isInster = false
+      })
+    },
+    closeGuideModel () {
+      this.openGuideModal = false
+    },
+    // 批量导入产品
+    hanldeOk (data, salesPromoSn) {
+      const params = {
+        salesBillSn: this.detailData.salesBillSn,
+        salesBillDetailList: data
+      }
+
+      salesBatchInsert(params).then(res => {
+        if (res.status == 200) {
+          this.$message.success('产品导入成功', 2.5)
+          this.resetSearchForm(true)
+          this.$emit('insterOk', 'normal')
+        }
+      })
     }
   }
+}
 </script>
 
 <style lang="less">
@@ -562,4 +571,4 @@
     display:flex;
     justify-content: space-between;
   }
-</style>
+</style>

+ 5 - 2
src/views/salesManagement/salesQueryNew/comps/setWarehouse.vue

@@ -38,13 +38,16 @@ export default {
   mixins: [commonMixin],
   components: { VSelect, chooseWarehouse },
   props: {
-    show: [Boolean]
+    show: [Boolean],
+    title: {
+      type: String,
+      default: '批量设置出库仓库'
+    }
   },
   data () {
     return {
       opened: this.show,
       spinning: false,
-      title: '批量设置出库仓库',
       confirmLoading: false,
       formItemLayout: {
         labelCol: { span: 4 },

+ 28 - 26
src/views/salesManagement/salesQueryNew/detail.vue

@@ -58,6 +58,8 @@
             <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
             <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
             <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="改单时间" v-if="detailData&&detailData.salesBillSource=='PURCHASE'&&detailData.submitDate">{{ detailData.submitDate }}</a-descriptions-item>
+            <a-descriptions-item label="最新提交时间" v-if="detailData&&detailData.salesBillSource=='SALES'&&detailData.submitDate">{{ detailData.submitDate }}</a-descriptions-item>
             <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
           </a-descriptions>
         </div>
@@ -112,15 +114,15 @@
         </div>
         <!-- 产品列表 -->
         <div>
-          <detailProductList 
-          ref="productList" 
-          :detailData="detailData" 
-          :warehouseSn="warehouseSn"
-          :salesBillSn="$route.params.sn || bizSn" 
-          :authCode="authCode"
-          :maxHeight="pageHeight"
-          :showCityPrice="isCityPrice">
-        </detailProductList> 
+          <detailProductList
+            ref="productList"
+            :detailData="detailData"
+            :warehouseSn="warehouseSn"
+            :salesBillSn="$route.params.sn || bizSn"
+            :authCode="authCode"
+            :maxHeight="pageHeight"
+            :showCityPrice="isCityPrice">
+          </detailProductList>
         </div>
       </a-card>
     </a-spin>
@@ -203,16 +205,16 @@ import stockOutDetail from './stockOutDetailModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
 import detailProductList from './comps/detailProductList.vue'
 // 接口
-import { 
-  salesDetailBySn, 
-  salesDetailPrint, 
-  salesDetailExcel, 
-  salesDetailTypeExcel, 
-  salesWriteAuditPass, 
-  salesWriteAuditReject, 
-  salesWriteAuditPush 
+import {
+  salesDetailBySn,
+  salesDetailPrint,
+  salesDetailExcel,
+  salesDetailTypeExcel,
+  salesWriteAuditPass,
+  salesWriteAuditReject,
+  salesWriteAuditPush
 } from '@/api/salesNew'
- 
+
 export default {
   name: 'SalesDetailNew',
   mixins: [commonMixin],
@@ -229,7 +231,7 @@ export default {
       disabled: false,
       showDsModal: false,
       showStockOut: false,
-      authCode: '',  // 权限码
+      authCode: '', // 权限码
       hasData: false, // 是否有数据
       showDetail: false,
       openModal: false,
@@ -257,7 +259,7 @@ export default {
         return shippingAddrProvinceName + shippingAddrCityName + shippingAddrCountyName + shippingAddr
       }
     },
-    pageHeight(){
+    pageHeight () {
       return window.innerHeight - 330
     }
   },
@@ -274,12 +276,12 @@ export default {
     //  重置
     resetSearchForm () {
       this.warehouseSn = undefined
-      setTimeout(()=>{
+      setTimeout(() => {
         this.searchTable()
-      },100)
+      }, 100)
     },
     // 查询数据
-    searchTable(){
+    searchTable () {
       this.$refs.productList.searchTable()
     },
     //  详情
@@ -287,7 +289,7 @@ export default {
       salesDetailBySn({ salesBillSn: this.bizSn || this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data || null
-          this.detailData.totalDiscountAmount = Number(this.detailData.totalOrigAmount||0) - Number(this.detailData.totalAmount||0)
+          this.detailData.totalDiscountAmount = Number(this.detailData.totalOrigAmount || 0) - Number(this.detailData.totalAmount || 0)
         }
         this.$refs.productList.pageInit()
       })
@@ -307,7 +309,7 @@ export default {
     // 打开审核/一键审核弹框
     handleAudit (isBatch) {
       if (isBatch) { // 一键审核
-        if(this.detailData&&this.detailData.promoFlag==1&&this.$refs.productList.outStockStr != ''){
+        if (this.detailData && this.detailData.promoFlag == 1 && this.$refs.productList.outStockStr != '') {
           this.$info({
             title: '提示',
             content: '参加促销活动的销售单,有缺货产品,不可一键审核!',
@@ -344,7 +346,7 @@ export default {
     // 审核
     auditOrder (billStatus) {
       this.spinningAudit = true
-      const auditFun = billStatus =='AUDIT_PASS' ? salesWriteAuditPass : salesWriteAuditReject
+      const auditFun = billStatus == 'AUDIT_PASS' ? salesWriteAuditPass : salesWriteAuditReject
       auditFun({
         salesBillSn: this.bizSn || this.$route.params.sn,
         billStatus: billStatus

+ 176 - 173
src/views/salesManagement/salesQueryNew/edit.vue

@@ -24,6 +24,8 @@
             <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
             <a-descriptions-item label="业务状态">{{ detailData&&detailData.billStatusDictValue || '--' }}</a-descriptions-item>
             <a-descriptions-item label="财务状态">{{ detailData&&detailData.financialStatusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="改单时间" v-if="detailData&&detailData.salesBillSource=='PURCHASE'&&detailData.submitDate">{{ detailData.submitDate }}</a-descriptions-item>
+            <a-descriptions-item label="最新提交时间" v-if="detailData&&detailData.salesBillSource=='SALES'&&detailData.submitDate">{{ detailData.submitDate }}</a-descriptions-item>
             <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks || '--' }}</a-descriptions-item>
           </a-descriptions>
         </div>
@@ -31,47 +33,47 @@
       <!-- 正常产品 -->
       <a-card size="small" :bordered="false" class="salesEdit-cont" v-if="salesBillSn">
         <div style="padding: 10px;">
-          <productNormalList 
-          ref="productNormalList" 
-          @insterOk="insterActiveOk"
-          @openCpModal="openProductModal" 
-          :showTotal="showTotal"
-          :detailData="detailData" 
-          :warehouseSn="warehouseSn" 
-          :salesBillSn="salesBillSn"></productNormalList>
+          <productNormalList
+            ref="productNormalList"
+            @insterOk="insterActiveOk"
+            @openCpModal="openProductModal"
+            :showTotal="showTotal"
+            :detailData="detailData"
+            :warehouseSn="warehouseSn"
+            :salesBillSn="salesBillSn"></productNormalList>
         </div>
       </a-card>
       <!-- 活动产品 -->
-      <a-card 
-      size="small" 
-      :bordered="false" 
-      class="salesEdit-cont" 
-      v-for="item in activeList" 
-      :key="item.promoRuleSn" 
-      v-if="activeList.length"
+      <a-card
+        size="small"
+        :bordered="false"
+        class="salesEdit-cont"
+        v-for="item in activeList"
+        :key="item.promoRuleSn"
+        v-if="activeList.length"
       >
         <div slot="title" style="display: inline-block;width:100%;">
-          <strong style="margin-right:10px;font-size:14px;">{{item.promotion.description}}</strong> ({{item.promotionRule.description}})
-          <span style="margin-left:20px;color:#00aaff;cursor: pointer;"  @click="(event) => {showDesc(event, item)}">
+          <strong style="margin-right:10px;font-size:14px;">{{ item.promotion.description }}</strong> ({{ item.promotionRule.description }})
+          <span style="margin-left:20px;color:#00aaff;cursor: pointer;" @click="(event) => {showDesc(event, item)}">
             <a-icon :type="item.showDesc ? 'eye-invisible' : 'eye'"/> 活动详情
           </span>
           <span :style="{margin:'0 20px',color:item.disabled?'#14b900':'#ff0800',cursor: 'pointer'}" @click="(event) => {disenablePromp(event, item)}">
-            <a-icon title="禁用规则" :type="item.disabled?'link':'disconnect'"/> {{item.disabled ? '启用规则' : '禁用规则'}}
+            <a-icon title="禁用规则" :type="item.disabled?'link':'disconnect'"/> {{ item.disabled ? '启用规则' : '禁用规则' }}
           </span>
         </div>
         <div slot="extra" @click="tooglePanel(item)" style="cursor: pointer;">{{ item.isActive ? '收起' : '展开' }} <a-icon type="caret-right" :rotate="item.isActive ? 90 : 0"/> </div>
         <div v-show="item.isActive" style="padding: 10px;">
-          <productList 
-          :ref="'productList-'+item.promoRuleSn" 
-          :id="item.promoRuleSn" 
-          @openCpModal="openProductModal" 
-          @insterOk="insterActiveOk"
-          @showDesc="v => showDescOk(v,item)"
-          @upActive="upActive"
-          :promo="item"
-          :detailData="detailData" 
-          :warehouseSn="warehouseSn" 
-          :salesBillSn="salesBillSn"></productList>
+          <productList
+            :ref="'productList-'+item.promoRuleSn"
+            :id="item.promoRuleSn"
+            @openCpModal="openProductModal"
+            @insterOk="insterActiveOk"
+            @showDesc="v => showDescOk(v,item)"
+            @upActive="upActive"
+            :promo="item"
+            :detailData="detailData"
+            :warehouseSn="warehouseSn"
+            :salesBillSn="salesBillSn"></productList>
         </div>
       </a-card>
     </a-spin>
@@ -89,31 +91,32 @@
               <a-button shape="round" size="small" v-if="detailData.totalDiscountAmount">优惠明细</a-button>
               <div slot="content">
                 <div v-if="yhDetail">
-                    <div 
-                    class="yhdetail" 
-                    style="min-width:300px;margin-bottom: 5px;" 
-                    v-for="(item,index) in yhDetail.promoMapList" 
+                  <div
+                    class="yhdetail"
+                    style="min-width:300px;margin-bottom: 5px;"
+                    v-for="(item,index) in yhDetail.promoMapList"
                     :key="index">
-                      <div class="yhdetail-h" style="font-weight: bold;font-size:14px;">{{ item.description }}</div>
-                      <div style="padding-left:10px;" 
-                      v-for="(sitem,sindex) in item.promoRuleMapList" 
-                      :key="sindex" 
+                    <div class="yhdetail-h" style="font-weight: bold;font-size:14px;">{{ item.description }}</div>
+                    <div
+                      style="padding-left:10px;"
+                      v-for="(sitem,sindex) in item.promoRuleMapList"
+                      :key="sindex"
                       v-if="sitem.lossAmount"
-                      >
-                        <div style="display: flex;justify-content: space-between;">
-                          <span>{{sitem.promotionRuleTypeDictValue}}:</span>
-                          <strong>¥{{ toThousands(sitem.lossAmount) }}</strong>
-                        </div>
-                        <div class="yhdetail-d" style="color:#999;">{{ sitem.description }}</div>
+                    >
+                      <div style="display: flex;justify-content: space-between;">
+                        <span>{{ sitem.promotionRuleTypeDictValue }}:</span>
+                        <strong>¥{{ toThousands(sitem.lossAmount) }}</strong>
                       </div>
+                      <div class="yhdetail-d" style="color:#999;">{{ sitem.description }}</div>
                     </div>
-                    <div class="yhdetail" style="display: flex;justify-content: space-between;">
-                      <span style="font-weight: bold;font-size:14px;">优惠金额:</span>
-                      <span style="font-weight: bold;font-size:18px;">¥{{ Number(yhDetail.totalLossAmount).toFixed(2) }}</span>
-                    </div>
+                  </div>
+                  <div class="yhdetail" style="display: flex;justify-content: space-between;">
+                    <span style="font-weight: bold;font-size:14px;">优惠金额:</span>
+                    <span style="font-weight: bold;font-size:18px;">¥{{ Number(yhDetail.totalLossAmount).toFixed(2) }}</span>
+                  </div>
                 </div>
                 <div style="text-align: center;padding: 20px;" v-else>
-                   正在加载...
+                  正在加载...
                 </div>
               </div>
             </a-popover>
@@ -133,25 +136,25 @@
     </div>
     <!-- 添加产品 -->
     <chooseProduct
-    ref="chooseProduct"
-    :openModal="showCpModal"
-    @close="closeProductModal"
-    @addProduct="insterProduct"></chooseProduct>
+      ref="chooseProduct"
+      :openModal="showCpModal"
+      @close="closeProductModal"
+      @addProduct="insterProduct"></chooseProduct>
     <!-- 价格更新弹窗 -->
-    <setPriceModal 
-    :show="priceUpdateModal" 
-    :totalRealAmount="updataData.totalRealAmount" 
-    :totalAmount="updataData.totalAmount" 
-    @ok="updatePrice" 
-    @cancel="priceUpdateModal=false"></setPriceModal>
+    <setPriceModal
+      :show="priceUpdateModal"
+      :totalRealAmount="updataData.totalRealAmount"
+      :totalAmount="updataData.totalAmount"
+      @ok="updatePrice"
+      @cancel="priceUpdateModal=false"></setPriceModal>
     <!-- 新活动窗口 -->
     <newPromoModal
-    :show="showNewActiveModal"
-    :salesBillSn="salesBillSn"
-    :newActiveList="newActiveList"
-    @ok="showNewActiveOk"
+      :show="showNewActiveModal"
+      :salesBillSn="salesBillSn"
+      :newActiveList="newActiveList"
+      @ok="showNewActiveOk"
     ></newPromoModal>
- </div>
+  </div>
 </template>
 
 <script>
@@ -161,12 +164,12 @@ import productNormalList from './comps/productNormalList.vue'
 import chooseProduct from './comps/chooseProduct.vue'
 import setPriceModal from './setPriceModal.vue'
 import newPromoModal from './newPromoModal.vue'
-import { salesDisablePromo,salesEnablePromoPromo, salesChangePromo } from '@/api/salesDetailNew'
-import { salesDetailBySn,salesPromoQueryCount, salesWriteSubmit, submitCheck, updateBatch, salesPromoQueryList, salesQueryUnPartPromo,salesPromoValidaSubmit } from '@/api/salesNew'
+import { salesDisablePromo, salesEnablePromoPromo, salesChangePromo } from '@/api/salesDetailNew'
+import { salesDetailBySn, salesPromoQueryCount, salesWriteSubmit, submitCheck, updateBatch, salesPromoQueryList, salesQueryUnPartPromo, salesPromoValidaSubmit } from '@/api/salesNew'
 export default {
   name: 'SalesNewEdit',
   mixins: [commonMixin],
-  components:{
+  components: {
     setPriceModal,
     productList,
     chooseProduct,
@@ -176,7 +179,7 @@ export default {
   data () {
     return {
       spinning: false,
-      activeList:[], // 活动列表
+      activeList: [], // 活动列表
       newActiveList: [], // 新活动列表
       activeDesKey: {},
       salesBillSn: null, // 销售单sn
@@ -196,7 +199,7 @@ export default {
     }
   },
   computed: {
-    showTotal(){
+    showTotal () {
       return this.activeList.length > 0
     },
     shippingAddress () {
@@ -216,13 +219,13 @@ export default {
     handleBack () {
       this.$router.push({ name: 'salesQueryNewList', query: { closeLastOldTab: true } })
     },
-    tooglePanel(item){
-      item.isActive=!item.isActive
+    tooglePanel (item) {
+      item.isActive = !item.isActive
       this.activeList.splice()
       // 刷新当前表格
-      if(item.isActive){
-        const row = this.$refs['productList-'+item.promoRuleSn][0]
-        row&&row.resetSearchForm()
+      if (item.isActive) {
+        const row = this.$refs['productList-' + item.promoRuleSn][0]
+        row && row.resetSearchForm()
       }
     },
     //  销售单详情
@@ -230,31 +233,31 @@ export default {
       salesDetailBySn({ salesBillSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
-          this.detailData.totalDiscountAmount = Number(this.detailData.totalOrigAmount||0) - Number(this.detailData.totalAmount||0)
+          this.detailData.totalDiscountAmount = Number(this.detailData.totalOrigAmount || 0) - Number(this.detailData.totalAmount || 0)
         }
-        if(flag){
+        if (flag) {
           this.getActiveList()
         }
       })
     },
     // 优惠明细查看
-    getPromYhDetail(){
-      salesPromoQueryCount({salesBillSn: this.$route.params.sn }).then(res => {
+    getPromYhDetail () {
+      salesPromoQueryCount({ salesBillSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.yhDetail = res.data
         }
       })
     },
     // 判断是否全部调用完
-    isAllLoadFinish(mlist){
-      const nid = setInterval(()=>{
+    isAllLoadFinish (mlist) {
+      const nid = setInterval(() => {
         const ret = []
         mlist.map(item => {
           const da = item.disabled
           ret.push(da)
         })
         // 加载完了
-        if(!ret.includes(true)){
+        if (!ret.includes(true)) {
           clearInterval(nid)
           this.spinning = false
         }
@@ -262,8 +265,8 @@ export default {
       }, 50)
     },
     // 刷新所有表格数据
-    updateAllTable(flag){
-      const activeList = this.activeList.filter(item=>item.isActive)
+    updateAllTable (flag) {
+      const activeList = this.activeList.filter(item => item.isActive)
       const mlist = []
       this.spinning = true
       // 加载正常产品列表
@@ -272,7 +275,7 @@ export default {
       // 刷新所有活动产品列表
       activeList.map(item => {
         const row = this.$refs['productList-' + item.promoRuleSn][0]
-        row&&row.resetSearchForm()
+        row && row.resetSearchForm()
         mlist.push(row)
       })
 
@@ -280,68 +283,68 @@ export default {
       this.isAllLoadFinish(mlist)
 
       // 是否刷新详情
-      if(flag){
+      if (flag) {
         this.getOrderDetail()
       }
     },
     // 获取销售单参与的活动列表
-    async getActiveList(){
+    async getActiveList () {
       // 已参与活动列表
       this.activeList = await salesPromoQueryList({ salesBillSn: this.$route.params.sn }).then(res => res.data || [])
       this.activeList.map(item => {
         item.isActive = item.enabledFlag == 1
         item.showDesc = false
         item.disabled = item.enabledFlag == 0
-        this.activeDesKey['search-'+item.promoRuleSn] = false
+        this.activeDesKey['search-' + item.promoRuleSn] = false
       })
-      
-      setTimeout(()=> {
+
+      setTimeout(() => {
         this.updateAllTable()
       }, 500)
     },
     // 获取是否有新活动
-    async getNewActive(){
-      const hasNewActive = await salesQueryUnPartPromo({ salesBillSn: this.$route.params.sn, enabledFlag: "1" }).then(res => res.data)
-      if(hasNewActive.length){
+    async getNewActive () {
+      const hasNewActive = await salesQueryUnPartPromo({ salesBillSn: this.$route.params.sn, enabledFlag: '1' }).then(res => res.data)
+      if (hasNewActive.length) {
         this.newActiveList = hasNewActive
-        this.showNewActiveModal=true
+        this.showNewActiveModal = true
       }
     },
-    showNewActiveOk(){
+    showNewActiveOk () {
       this.showNewActiveModal = false
       this.getOrderDetail(true)
     },
     // 添加产品,包括正常和活动的产品
-    closeProductModal(type){
-        this.cpCurRefId = ''
-        this.showCpModal = false
-        // 刷新表格
-        // this.insterActiveOk(['normal','promo'][type])
+    closeProductModal (type) {
+      this.cpCurRefId = ''
+      this.showCpModal = false
+      // 刷新表格
+      // this.insterActiveOk(['normal','promo'][type])
     },
     // 打开选择产品弹框
-    openProductModal(type, refId){
-        console.log(type, refId)
-        const promo = this.activeList.find(item => item.promoRuleSn == refId)
-        this.$refs.chooseProduct.pageInit(this.detailData, promo, type)
-        this.cpCurRefId = 'productList-' + refId
-        this.showCpModal = true
+    openProductModal (type, refId) {
+      console.log(type, refId)
+      const promo = this.activeList.find(item => item.promoRuleSn == refId)
+      this.$refs.chooseProduct.pageInit(this.detailData, promo, type)
+      this.cpCurRefId = 'productList-' + refId
+      this.showCpModal = true
     },
     // 添加活动产品成功的回调
-    insterActiveOk(type){
+    insterActiveOk (type) {
       console.log(type)
       const mlist = []
       this.spinning = true
-      if(type == 'promo'){
+      if (type == 'promo') {
         // 刷新正常产品列表
         this.$refs.productNormalList.resetSearchForm()
         mlist.push(this.$refs.productNormalList)
       }
-      if(type == 'normal'){
+      if (type == 'normal') {
         // 刷新活动产品列表
-        const activeList = this.activeList.filter(item=>item.isActive)
+        const activeList = this.activeList.filter(item => item.isActive)
         activeList.map(item => {
           const row = this.$refs['productList-' + item.promoRuleSn][0]
-          row&&row.resetSearchForm()
+          row && row.resetSearchForm()
           mlist.push(row)
         })
       }
@@ -350,42 +353,42 @@ export default {
       this.getOrderDetail()
     },
     // 新增产品
-    insterProduct(row, promotionFlag, type){
+    insterProduct (row, promotionFlag, type) {
       // 正常产品
-      if(type == 0){
+      if (type == 0) {
         this.$refs.productNormalList.insterProduct(row, promotionFlag)
-      }else{
+      } else {
         // 活动产品
         this.$refs[this.cpCurRefId][0].insterProduct(row, promotionFlag, type)
       }
     },
     // 更换活动
-    upActive(oldPromo,data,params){
+    upActive (oldPromo, data, params) {
       const promo = data.split('-')
       const newSn = this.activeList.find(item => item.promoRuleSn == promo[1])
       const newSalesPromoSn = newSn && newSn.salesPromoSn || ''
       salesChangePromo({
         salesPromoSn: data != 0 ? newSalesPromoSn : '',
         promoRuleSn: promo[1],
-        promotionFlag: promo[2]||'',
+        promotionFlag: promo[2] || '',
         ...params
       }).then(res => {
-        if(res.status == 200){
+        if (res.status == 200) {
           const mlist = []
           this.spinning = true
           // 刷新新参与活动
-          if(data != 0){
-            const nt = this.$refs['productList-'+promo[1]][0]
-            nt&&nt.resetSearchForm()
+          if (data != 0) {
+            const nt = this.$refs['productList-' + promo[1]][0]
+            nt && nt.resetSearchForm()
             mlist.push(nt)
           }
           // 刷新正常活动
           const pnt = this.$refs.productNormalList
-          pnt&&pnt.resetSearchForm()
+          pnt && pnt.resetSearchForm()
           mlist.push(pnt)
           // 刷新当前活动
-          const ot = this.$refs['productList-'+oldPromo.promoRuleSn][0]
-          ot&&ot.upAcitveSuccess()
+          const ot = this.$refs['productList-' + oldPromo.promoRuleSn][0]
+          ot && ot.upAcitveSuccess()
           mlist.push(ot)
 
           // 判断是否全部调用完
@@ -415,7 +418,7 @@ export default {
     // 提交销售单
     handleSubmit () {
       // 先不提交,先判断是否有价格更新  (下级创建时判断)
-      if (this.detailData&&this.detailData.salesBillSource == 'PURCHASE') {
+      if (this.detailData && this.detailData.salesBillSource == 'PURCHASE') {
         submitCheck({ salesBillSn: this.salesBillSn }).then(res => {
           if (res.status == 200) {
             if (res.data.detailList.length > 0) {
@@ -436,53 +439,53 @@ export default {
     async submitResult (data) {
       const _this = this
       // 校验活动规则
-      const vaildActive = await salesPromoValidaSubmit({salesBillSn: this.salesBillSn}).then(res => res.data)
+      const vaildActive = await salesPromoValidaSubmit({ salesBillSn: this.salesBillSn }).then(res => res.data)
       // console.log(vaildActive)
       const a = vaildActive.filter(item => item.type == 1) // 不可提交
       const b = vaildActive.filter(item => item.type == 0) // 可跳过继续提交
       // 弹出不符合规则弹框,不可提交
-      if(a.length){
+      if (a.length) {
         this.$info({
           title: '提示',
           centered: true,
-          class:'confirm-center',
-          okText:'关闭',
+          class: 'confirm-center',
+          okText: '关闭',
           width: 600,
           content: <div style="padding-top:15px;">
             <ol>
-            {a.map(item => (
-              <li style="padding:3px 0;">{item.message}</li>
-            ))}
+              {a.map(item => (
+                <li style="padding:3px 0;">{item.message}</li>
+              ))}
             </ol>
             <div style="padding:10px 0;text-align:center"><strong>请按照以上提示修改后再提交</strong></div>
           </div>
-        });
-      }else{
+        })
+      } else {
         // 弹出确认提示信息,可跳过继续提交
-        if(b.length){
+        if (b.length) {
           this.$confirm({
             title: '提示',
             centered: true,
-            class:'confirm-center',
-            okText:'提交',
+            class: 'confirm-center',
+            okText: '提交',
             width: 600,
             content: <div style="padding-top:15px;">
               <ol>
-              {b.map(item => (
-                <li style="padding:3px 0;">{item.message}</li>
-              ))}
+                {b.map(item => (
+                  <li style="padding:3px 0;">{item.message}</li>
+                ))}
               </ol>
             </div>,
-            onOk() {
+            onOk () {
               _this.submitOrder(data)
             }
-          });
-        }else{
+          })
+        } else {
           _this.submitOrder(data)
         }
       }
     },
-    async submitOrder(data){
+    async submitOrder (data) {
       this.spinning = true
       const res = await salesWriteSubmit(data)
       if (res.status == 200) {
@@ -492,45 +495,45 @@ export default {
       this.spinning = false
     },
     // 展开收缩活动详情
-    showDesc(e,item){
+    showDesc (e, item) {
       e.stopPropagation()
-      const row = this.$refs['productList-'+item.promoRuleSn][0]
-      row&&row.showDesc(item.promotionRule)
+      const row = this.$refs['productList-' + item.promoRuleSn][0]
+      row && row.showDesc(item.promotionRule)
     },
-    showDescOk(v,item){
+    showDescOk (v, item) {
       item.showDesc = v
-      if(!item.isActive){
-        const row = this.$refs['productList-'+item.promoRuleSn][0]
-        row&&row.resetSearchForm()
+      if (!item.isActive) {
+        const row = this.$refs['productList-' + item.promoRuleSn][0]
+        row && row.resetSearchForm()
         item.isActive = true
       }
       this.activeList.splice()
     },
     // 启用规则
-    enabledActive(e,item){
+    enabledActive (e, item) {
       const _this = this
       this.spinning = true
       salesEnablePromoPromo({
         salesBillSn: _this.salesBillSn,
         salesPromoSn: item.salesPromoSn
       }).then(res => {
-        if(res.status == 200){
+        if (res.status == 200) {
           item.disabled = false
           item.isActive = true
           _this.activeList.splice()
           // 禁用按钮
-          _this.$refs['productList-'+item.promoRuleSn][0].disableActive(false)
+          _this.$refs['productList-' + item.promoRuleSn][0].disableActive(false)
 
           // 刷新所有表格
           _this.updateAllTable(true)
-          
+
           _this.spinning = false
-          _this.$message.success("操作成功,请添加产品")
+          _this.$message.success('操作成功,请添加产品')
         }
       })
     },
     // 禁用规则
-    disabledActive(e,item){
+    disabledActive (e, item) {
       const _this = this
       _this.spinning = true
       salesDisablePromo({
@@ -539,43 +542,43 @@ export default {
         promoRuleSn: item.promoRuleSn,
         salesDisableType: _this.disabledActiveOption
       }).then(res => {
-        if(res.status == 200){
+        if (res.status == 200) {
           item.disabled = true
           item.isActive = false
           _this.activeList.splice()
           // 启用按钮
-          _this.$refs['productList-'+item.promoRuleSn][0].disableActive(true)
+          _this.$refs['productList-' + item.promoRuleSn][0].disableActive(true)
 
           // 刷新所有表格
           _this.updateAllTable(true)
 
           _this.disabledActiveOption = null
           _this.spinning = false
-          _this.$message.success("操作成功")
+          _this.$message.success('操作成功')
         }
       })
     },
     // 禁用启用活动规则
-    disenablePromp(e,item){
+    disenablePromp (e, item) {
       const _this = this
-      const table = _this.$refs['productList-'+item.promoRuleSn][0]
+      const table = _this.$refs['productList-' + item.promoRuleSn][0]
 
       // 是否启用规则
-      if(item.disabled){
-        this.enabledActive(e,item)
+      if (item.disabled) {
+        this.enabledActive(e, item)
         return
       }
       // 如果没有活动产品,直接禁用无需弹框提示
-      if(table.countData&&!table.countData.totalQty){
+      if (table.countData && !table.countData.totalQty) {
         _this.disabledActiveOption = 'DELETE'
-        _this.disabledActive(e,item)
+        _this.disabledActive(e, item)
         return
       }
       // 弹框提示禁用方式
       this.$confirm({
         title: '确定禁用规则?',
         centered: true,
-        class:'confirm-center',
+        class: 'confirm-center',
         content: <div>
           <div style="padding:10px 0;text-align:center;">禁用规则后,将无法享受该活动规则优惠</div>
           <div style="padding:0 0 10px 0;text-align:center;">
@@ -589,20 +592,20 @@ export default {
             </aRadioGroup>
           </div>
         </div>,
-        onOk() {
-          if(_this.disabledActiveOption){
-            _this.disabledActive(e,item)
-          }else{
-            _this.$message.info("请选择禁用方式!")
+        onOk () {
+          if (_this.disabledActiveOption) {
+            _this.disabledActive(e, item)
+          } else {
+            _this.$message.info('请选择禁用方式!')
             return true
           }
         },
-        onCancel() {
+        onCancel () {
           _this.disabledActiveOption = null
-        },
-      });
+        }
+      })
     },
-    changeDaOpt(e){
+    changeDaOpt (e) {
       this.disabledActiveOption = e.target.value
     },
     pageInit () {

+ 1 - 1
src/views/salesManagement/salesQueryNew/list.vue

@@ -412,7 +412,7 @@ export default {
       const arr = [
         { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '7%', align: 'center' },
-        { title: '提交时间', dataIndex: 'submitDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: <a-tooltip placement='top' title='第一次提交时间'>提交时间&nbsp;<a-icon type="question-circle" /></a-tooltip>, dataIndex: 'firstSubmitDate', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, sorter: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '8%', align: 'center', ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },

+ 12 - 12
src/views/salesManagement/stockPrint/list.vue

@@ -111,7 +111,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y:tableHeight, x: 1600 }"
+          :scroll="{ y:tableHeight, x: 1380 }"
           :defaultLoadData="false"
           bordered>
           <!-- 销售单号 -->
@@ -272,28 +272,28 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '110px', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '120px', align: 'center' },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '100px', align: 'center' },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '110px', align: 'center' },
         { title: '发货编号', dataIndex: 'sendNo', width: '40px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '发货说明', scopedSlots: { customRender: 'explainInfo' }, width: '80px', align: 'center', ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '130px', align: 'left', customRender: function (text) { return text || '--' } },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '130px', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', width: '100px', align: 'left', customRender: function (text) { return text || '--' } },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '100px', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '产品款数', dataIndex: 'totalCategory', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品数量', dataIndex: 'totalQty', width: '60px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '仓库', dataIndex: 'warehouseName', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '60px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '60px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '60px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '50px', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '50px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备货打印状态', width: '60px', align: 'center', scopedSlots: { customRender: 'printStatus' } },
         { title: '允许打印时间', dataIndex: 'allowPrintTime', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'stockUpPrintTimes', width: '40px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '80px', align: 'center', fixed: 'right' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '60px', align: 'center',fixed:'right'}
       ]
 
       if (this.$hasPermissions('M_stockPrintList_salesPrice')) { //  售价权限
         const ind = this.isShowWarehouse ? 10 : 9
-        arr.splice(ind, 0, { title: '开单总金额', dataIndex: 'totalAmount', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-        arr.splice(ind + 1, 0, { title: '正价总金额', dataIndex: 'normalTotalAmount', width: '80px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
-		    arr.splice(ind + 2, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '100px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(ind, 0, { title: '开单总金额', dataIndex: 'totalAmount', width: '60px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+        arr.splice(ind + 1, 0, { title: '正价总金额', dataIndex: 'normalTotalAmount', width: '60px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
+		    arr.splice(ind + 2, 0, { slots: { title: 'costTitle' }, dataIndex: 'receiveTotalAmount', width: '70px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
         arr.splice(ind + 3, 0, { title: '易损件售价', dataIndex: 'receiveYsjTotalAmount', width: '60px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
         arr.splice(ind + 4, 0, { title: '电池售价', dataIndex: 'receiveDcTotalAmount', width: '60px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
         arr.splice(ind + 5, 0, { title: '机油售价', dataIndex: 'receiveJyTotalAmount', width: '60px', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })

+ 9 - 9
src/views/salesReturnManagement/returnSchedule/list.vue

@@ -65,16 +65,14 @@
                     allowClear></v-select>
                 </a-form-model-item>
               </a-col>
-              <!-- <a-col :md="6" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-model-item label="超时环节提醒">
-                  <v-select
-                    v-model="queryParam.sendFlag"
-                    id="outboundOrderList-sendFlag"
-                    code="SEND_FLAG"
-                    placeholder="请选择提醒环节"
-                    allowClear></v-select>
+                  <a-select v-model="queryParam.checkflag" allowClear placeholder="请选择超时环节提醒状态">
+                    <a-select-option value="oneouttime">!未清点</a-select-option>
+                    <a-select-option value="twoouttime">!!未清点</a-select-option>
+                  </a-select>
                 </a-form-model-item>
-              </a-col> -->
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="handleSearch" :disabled="disabled" id="returnSchedule-refresh">查询</a-button>
@@ -165,7 +163,8 @@ export default {
         billStatus: undefined, //  业务状态
         provinceName: undefined,
         provinceSn: undefined,
-        salesReturnType: undefined// 退货类别
+        salesReturnType: undefined, // 退货类别
+        checkflag: undefined// 超时环节提醒
       },
       rules: {
         'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
@@ -295,6 +294,7 @@ export default {
       this.queryParam.provinceName = undefined
       this.queryParam.salesReturnType = undefined
       this.queryParam.goodFlag = undefined
+      this.queryParam.checkflag = undefined
       this.$refs.dealerSubareaScopeList.resetForm()
       this.$refs.table.refresh(true)
     },

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.103/ocs-admin',
+        // target: 'http://192.168.2.113:8660/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布s
+        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů