Parcourir la source

Merge branch 'develop_yh17_fencang' of jianguan-web/jg-ocs-html into develop_yh18

李磊 il y a 2 ans
Parent
commit
d0a57fbc7d

+ 2 - 2
src/views/Home.vue

@@ -15,10 +15,10 @@
       v-model="openResetPwd">
       <ResetPwd />
     </a-modal>
-    <!-- 产品上线提醒 -->
+    <!-- 产品上线提醒 -->
     <a-modal
       class="newProductTips"
-      :title="'产品'+(onlineFalg=='1'?'上':'下')+'线提醒'"
+      :title="'产品'+(onlineFalg=='1'?'上':'下')+'线提醒'"
       :width="800"
       centered
       :footer="null"

+ 11 - 10
src/views/allocationManagement/transferOut/basicInfoModal.vue

@@ -135,6 +135,7 @@ export default {
     detailData: Object
   },
   data () {
+    this.lastFetchId = 0
     this.fetchUser = debounce(this.fetchUser, 800)
     return {
       isShow: this.openModal, //  是否打开弹框
@@ -235,18 +236,18 @@ export default {
       console.log(val, opt, '------------')
       this.form.productBrandName = opt ? opt.brandName : ''
     },
-    // 搜索经销商
-    fetchUser (value) {
-      console.log('fetching user', value)
+    fetchUser (dealerName) {
+      if (dealerName == '') return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.dealerData = []
       this.fetching = true
-      dealerSubareaScopeList({ nameLike: value, pageNo: 1, pageSize: 20 }).then(res => {
-        if (res.status == 200) {
-          this.dealerData = res.data && res.data.list ? res.data.list : []
-          this.fetching = false
-        } else {
-          this.dealerData = []
-          this.fetching = false
+      dealerSubareaScopeList({ nameLike: dealerName.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
         }
+        this.dealerData = res.data && res.data.list ? res.data.list : []
+        this.fetching = false
       })
     },
     // 调往对象名称经销商  change

+ 17 - 8
src/views/reportData/receivedSendStorageReport/index.vue

@@ -7,7 +7,7 @@
         :rules="rules"
         :model="form">
         <a-row :gutter="15">
-          <a-col :md="5" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="选择周期" prop="time">
               <div class="monthBox" style="display:flex;align-item:center;">
                 <a-month-picker
@@ -31,26 +31,31 @@
               </div>
             </a-form-model-item>
           </a-col>
-          <a-col :md="4" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="产品编码">
               <a-input id="receivedSendStorageReport-queryWord" v-model.trim="queryParam.product.code" allowClear placeholder="请输入产品编码"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="5" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="产品名称">
               <a-input id="receivedSendStorageReport-name" v-model.trim="queryParam.product.name" allowClear placeholder="请输入产品名称"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="5" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="产品品牌">
               <ProductBrand id="receivedSendStorageReport-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
             </a-form-model-item>
           </a-col>
-          <a-col :md="5" :sm="24">
+          <a-col :md="6" :sm="24">
             <a-form-model-item label="产品分类">
               <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="receivedSendStorageReport-productType"></productTypeAll>
             </a-form-model-item>
           </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="仓库">
+              <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+            </a-form-item>
+          </a-col>
           <a-col :md="24" :sm="24" style="margin-bottom: 10px;display:flex;align-item:center;justify-content:center;">
             <a-button type="primary" @click="testForm('search')" :disabled="disabled" id="receivedSendStorageReport-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="receivedSendStorageReport-reset">重置</a-button>
@@ -121,11 +126,12 @@ import reportModal from '@/views/common/reportModal.vue'
 import { queryDetailReportPage, exportDetailReport, queryReportCount } from '@/api/reportData'
 import { hdExportExcel } from '@/libs/exportExcel'
 import gatherList from './list'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 import moment from 'moment'
 export default {
   name: 'PriceDifferenceDetailReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, ProductBrand, gatherList, productTypeAll, reportModal },
+  components: { STable, VSelect, ProductBrand, gatherList, productTypeAll, reportModal, chooseWarehouse },
   data () {
     return {
       moment,
@@ -139,7 +145,8 @@ export default {
         productBrandSn: undefined,
         productTypeSn1: undefined,
         productTypeSn2: undefined,
-        productTypeSn3: undefined
+        productTypeSn3: undefined,
+        warehouseSn: undefined
       },
       form: {
         time: []
@@ -159,11 +166,12 @@ export default {
       columns: [
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '二级分类', dataIndex: 'productTypeName2', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '三级分类', dataIndex: 'productTypeName3', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productUnit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '期初结存数量', dataIndex: 'beginQty', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '期初结存单价', dataIndex: 'beginPrice', width: '12%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '期初结存金额', dataIndex: 'beginAmount', width: '12%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
@@ -305,6 +313,7 @@ export default {
       this.queryParam.productTypeSn1 = undefined
       this.queryParam.productTypeSn2 = undefined
       this.queryParam.productTypeSn3 = undefined
+      this.queryParam.warehouseSn = undefined
       this.$refs.table.clearTable()
       this.productType = []
       this.totalData = null

+ 88 - 59
src/views/salesManagement/salesQuery/edit.vue

@@ -47,60 +47,64 @@
           </div>
         </a-alert>
         <!-- 筛选条件 -->
-        <a-row :gutter="15">
-          <a-col :span="24">
-            <div class="table-page-search-wrapper" style="position: relative;width: 100%;">
-              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                <a-row :gutter="15">
-                  <a-col :md="5" :sm="24">
-                    <a-form-item label="出库仓库" prop="warehouseSn">
-                      <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="5" :sm="24">
-                    <a-form-item label="产品编码" prop="productCode">
-                      <a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="5" :sm="24">
-                    <a-form-item label="产品名称" prop="productName">
-                      <a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="3" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
-                    <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
-                  </a-col>
-                  <a-col :md="6" :sm="24" style="text-align: right;">
-                    <span>已选{{ selectTotal }}项</span>
-                    <a-dropdown>
-                      <a-menu slot="overlay" @click="handleMenuClick">
-                        <a-menu-item key="0">
-                          仓库设置
-                        </a-menu-item>
-                        <a-menu-item key="1">
-                          删除已选项
-                        </a-menu-item>
-                        <a-menu-item key="2">
-                          全部删除
-                        </a-menu-item>
-                      </a-menu>
-                      <a-button
-                        style="margin:0 15px;"
-                        type="primary"
-                        ghost
-                        id="salesEdit-plDel-btn"> 批量操作 <a-icon type="down" /> </a-button>
-                    </a-dropdown>
-                    <a-button
-                      type="default"
-                      id="salesEdit-import-btn"
-                      @click="openGuideModal=true">导入产品</a-button>
-                  </a-col>
-                </a-row>
-              </a-form>
-            </div>
-          </a-col>
-        </a-row>
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="4" :sm="24">
+                <a-form-item label="出库仓库" prop="warehouseSn">
+                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="产品编码" prop="productCode">
+                  <a-input id="salesEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="产品名称" prop="productName">
+                  <a-input id="salesEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="品牌">
+                  <ProductBrand id="salesEdit-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="产品分类">
+                  <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="salesEdit-productType"></productTypeAll>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesEdit-reset">重置</a-button>
+              </a-col>
+              <a-col :md="24" :sm="24" style="text-align:right;">
+                <span>已选{{ selectTotal }}项</span>
+                <a-dropdown>
+                  <a-menu slot="overlay" @click="handleMenuClick">
+                    <a-menu-item key="0">
+                      仓库设置
+                    </a-menu-item>
+                    <a-menu-item key="1">
+                      删除已选项
+                    </a-menu-item>
+                    <a-menu-item key="2">
+                      全部删除
+                    </a-menu-item>
+                  </a-menu>
+                  <a-button
+                    style="margin:0 15px;"
+                    type="primary"
+                    ghost> 批量操作 <a-icon type="down" /> </a-button>
+                </a-dropdown>
+                <a-button
+                  type="default"
+                  @click="openGuideModal=true">导入产品</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
         <!-- 已选配件列表 -->
         <s-table
           class="sTable"
@@ -236,12 +240,24 @@ import ImportGuideModal from './importGuideModal.vue'
 import setWarehouse from './setWarehouse.vue'
 import setPriceModal from './setPriceModal.vue'
 import chooseWarehouse from '@/views/common/chooseWarehouse'
+import ProductBrand from '@/views/common/productBrand.js'
+import productTypeAll from '@/views/common/productTypeAll.js'
 import { salesModify, salesDetailBySn, salesWriteSubmit, getPromoacActiveList, deleteAll, submitCheck, updateBatch, updateWarehouse } from '@/api/sales'
 import { salesDetailStockList, salesDetailInsert, salesDetailUpdateQty, salesDetailDel, salesDetailBatchDel, salesDetailDelAll, addPromoGoods, salesBatchInsert } from '@/api/salesDetail'
 export default {
   name: 'SalesEdit',
   mixins: [commonMixin],
-  components: { STable, VSelect, queryPart, queryPromotable, ChooseActive, ImportGuideModal, chooseWarehouse, setWarehouse, setPriceModal },
+  components: { STable,
+    VSelect,
+    queryPart,
+    queryPromotable,
+    ChooseActive,
+    ImportGuideModal,
+    chooseWarehouse,
+    setWarehouse,
+    setPriceModal,
+    ProductBrand,
+    productTypeAll },
   data () {
     return {
       spinning: false,
@@ -285,8 +301,13 @@ export default {
       queryParam: {
         warehouseSn: undefined,
         productCode: '',
-        productName: ''
+        productName: '',
+        productBrandSn: undefined,
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
       },
+      productType: [],
       rowSelectionInfo: null,
       priceUpdateModal: false, // 价格更新弹窗
       updataData: {
@@ -357,6 +378,12 @@ export default {
         _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] : ''
+    },
     // 选择仓库
     handleWarehouse (val) {
       this.warehouseSn = val
@@ -481,6 +508,11 @@ export default {
       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.refresh(!!flag)
       this.getPromoacActiveList()
       this.getOrderDetail(false)
@@ -790,9 +822,6 @@ export default {
         }
       }
     }
-    .redBg-row{
-      background-color: #f5cdc8;
-    }
   }
 
 </style>

+ 38 - 12
src/views/salesManagement/waitDispatch/dsModal.vue

@@ -22,15 +22,28 @@
           <a-form-model-item label="客户名称">
             <span>{{ detailData ? detailData.buyerName : '--' }}</span>
           </a-form-model-item>
-          <a-form-model-item label="收货客户名称" extra="如果收货客户和下单客户相同,则不需要选择收货客户名称">
-            <dealerSubareaScopeList ref="dealerSubareaScopeList" defValKey="buyerSn" @change="custChange" v-model="form.receiverSn" />
-          </a-form-model-item>
-          <a-form-model-item label="收货地址" prop="dealerRecevieAddressSn" v-if="form.receiverSn">
-            <div style="display:flex;padding-top:6px;">
-              <div style="width:80%;flex-grow:1;line-height: 24px;">{{ chooseAddr }}</div>
-              <a-button size="small" type="link" @click="openAddrModal = true">{{ addressVal }} >></a-button>
-            </div>
-          </a-form-model-item>
+          <div v-if="!receiverDisabled">
+            <a-form-model-item label="收货客户名称" extra="如果收货客户和下单客户相同,则不需要选择收货客户名称">
+              <dealerSubareaScopeList ref="dealerSubareaScopeList" defValKey="buyerSn" @change="custChange" v-model="form.receiverSn" />
+            </a-form-model-item>
+            <a-form-model-item label="收货地址" prop="dealerRecevieAddressSn" v-if="form.receiverSn">
+              <div style="display:flex;padding-top:6px;">
+                <div style="width:80%;flex-grow:1;line-height: 24px;">{{ chooseAddr }}</div>
+                <a-button size="small" type="link" @click="openAddrModal = true">{{ addressVal }} >></a-button>
+              </div>
+            </a-form-model-item>
+          </div>
+          <div v-else>
+            <a-form-model-item label="收货客户名称" v-if="detailData&&detailData.receiverName">
+              {{ detailData.receiverName }}
+            </a-form-model-item>
+            <a-form-model-item label="收货客户名称" v-else>
+              --
+            </a-form-model-item>
+            <a-form-model-item label="收货地址">
+              {{ chooseAddr }}
+            </a-form-model-item>
+          </div>
           <a-form-model-item label="发货编号" prop="sendNo">
             <a-input
               id="dealerAccountEdit-phone"
@@ -121,7 +134,8 @@ export default {
       addressVal: '选择地址', //  选择地址/更换地址
       chooseAddr: '', //  当前已选地址信息
       openAddrModal: false, // 选择地址弹框是否显示
-      addressId: undefined
+      addressId: undefined,
+      receiverDisabled: false
     }
   },
   methods: {
@@ -168,6 +182,7 @@ export default {
       const _this = this
       _this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          _this.form.buyerName = _this.detailData.buyerName
           const formData = JSON.parse(JSON.stringify(_this.form))
           _this.$emit('ok', formData)
           _this.isShow = false
@@ -190,6 +205,15 @@ export default {
     //  获取详情
     setDetail (data) {
       this.detailData = data
+      if (data && data.dispatchBillCount * 1 > 0) {
+        this.receiverDisabled = true
+        this.form.receiverSn = data.receiverSn
+        this.form.receiverName = data.receiverName
+        if (data.salesBillExtEntity) {
+          const address = (data.salesBillExtEntity.shippingAddrProvinceName ? (data.salesBillExtEntity.shippingAddrProvinceName + '-') : '') + (data.salesBillExtEntity.shippingAddrCityName ? (data.salesBillExtEntity.shippingAddrCityName + '-') : '') + (data.salesBillExtEntity.shippingAddrCountyName ? (data.salesBillExtEntity.shippingAddrCountyName + '-') : '') + data.salesBillExtEntity.shippingAddr
+          this.chooseAddr = (data.salesBillExtEntity.consigneeName || '') + '(' + (data.salesBillExtEntity.consigneeTel || '-') + ')' + ' ' + (address || '')
+        }
+      }
     },
     // 重置表单
     resetForm () {
@@ -204,8 +228,10 @@ export default {
         dealerRecevieAddressSn: '',
         explainInfo: ''
       }
-      this.$refs.dealerSubareaScopeList.resetForm()
-      this.verifyFun(this.addressId)
+      if (!this.receiverDisabled) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+        this.verifyFun(this.addressId)
+      }
     }
   },
   watch: {

+ 5 - 2
src/views/salesManagement/waitDispatch/edit.vue

@@ -182,9 +182,9 @@ export default {
             this.$nextTick(() => {
               _this.$refs.table.refresh()
             })
-          }else{
+          } else {
             this.dataSource = []
-             this.$refs.table.clearTable()
+            this.$refs.table.clearTable()
           }
         } else {
           this.totalData = null
@@ -354,6 +354,9 @@ export default {
     handleDispatch () {
       if (this.dataSource.length) {
         this.showDsModal = true
+        this.detailData.dispatchBillCount = this.totalData.dispatchBillCount
+        this.detailData.receiverName = this.totalData.receiverName ? this.totalData.receiverName : ''
+        this.detailData.receiverSn = this.totalData.receiverSn ? this.totalData.receiverSn : ''
         this.$refs.dsModal.setDetail(this.detailData)
       } else {
         this.$message.warning('请选择待下推产品')