Browse Source

销售单接口对接

lilei 4 years ago
parent
commit
8a2208251e

+ 9 - 0
src/api/customer.js

@@ -28,6 +28,15 @@ export const custSave = params => {
   })
 }
 
+// 根据sn修改客户信息
+export const updateByCustomerSn = params => {
+  return axios({
+    url: '/cust/updateByCustomerSn',
+    data: params,
+    method: 'post'
+  })
+}
+
 // 客户详情
 export const custFindById = params => {
   return axios({

+ 8 - 0
src/api/sales.js

@@ -99,6 +99,14 @@ export const salesInsert = (params) => {
     method: 'post'
   })
 }
+//  销售 修改
+export const salesUpdate = (params) => {
+  return axios({
+    url: '/sales/update',
+    data: params,
+    method: 'post'
+  })
+}
 //  销售 删除
 export const salesDel = (params) => {
   return axios({

+ 20 - 4
src/api/salesDetail.js

@@ -11,10 +11,26 @@ export const salesDetailList = (params) => {
     method: 'post'
   })
 }
-//  销售详情 保存
-export const salesDetailSave = (params) => {
+//  销售详情 新增配件
+export const salesDetailInsert = (params) => {
   return axios({
-    url: '/salesDetail/save',
+    url: '/salesDetail/insert',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 修改价格
+export const salesDetailUpdatePrice = (params) => {
+  return axios({
+    url: '/salesDetail/updatePrice',
+    data: params,
+    method: 'post'
+  })
+}
+//  销售详情 修改数量
+export const salesDetailUpdateQty = (params) => {
+  return axios({
+    url: '/salesDetail/updateQty',
     data: params,
     method: 'post'
   })
@@ -30,7 +46,7 @@ export const salesDetailDel = (params) => {
 //  销售详情 整单删除
 export const salesDetailDelAll = (params) => {
   return axios({
-    url: `/salesDetail/deleteAll/${params.id}`,
+    url: `/salesDetail/deleteBySalesBillSn/${params.salesBillSn}`,
     data: params,
     method: 'post'
   })

+ 12 - 0
src/api/stock.js

@@ -38,3 +38,15 @@ export const stockDetailCount = (params) => {
     method: 'post'
   })
 }
+
+//  库存 详情列表  分页
+export const querySumByProductLocation = (params) => {
+  const url = `/stock/detail/querySumByProductLocation/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 59 - 47
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -32,7 +32,7 @@
                 <a-select-option v-for="item in custAllList" :key="item.customerSn" :title="item.id">{{ item.customerName }}</a-select-option>
               </template>
             </a-auto-complete>
-            </a-button></a-form-model-item>
+          </a-form-model-item>
         </a-col>
         <a-col :span="16">
           <a-form-model-item><a-button type="dashed" icon="plus">
@@ -46,22 +46,22 @@
             <a-row :gutter="15">
               <!-- 客户地址 -->
               <a-col span="8">
-                <a-form-model-item prop="provinceSn">
-                  <a-select id="chooseCustom-provinceSn" @change="getCityList" v-model="form.provinceSn" placeholder="请选择省">
+                <a-form-model-item prop="shippingAddressProvinceSn">
+                  <a-select id="chooseCustom-provinceSn" @change="getCityList" v-model="form.shippingAddressProvinceSn" placeholder="请选择省">
                     <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
               <a-col span="8">
-                <a-form-model-item prop="citySn">
-                  <a-select id="chooseCustom-citySn" @change="getAreaList" v-model="form.citySn" placeholder="请选择市">
+                <a-form-model-item prop="shippingAddressCitySn">
+                  <a-select id="chooseCustom-citySn" @change="getAreaList" v-model="form.shippingAddressCitySn" placeholder="请选择市">
                     <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-model-item>
               </a-col>
               <a-col span="8">
-                <a-form-model-item prop="countySn">
-                  <a-select id="chooseCustom-countySn" @change="areaCharged" v-model="form.countySn" placeholder="请选择区/县">
+                <a-form-model-item prop="shippingAddressCountySn">
+                  <a-select id="chooseCustom-countySn" @change="areaCharged" v-model="form.shippingAddressCountySn" placeholder="请选择区/县">
                     <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
                   </a-select>
                 </a-form-model-item>
@@ -149,8 +149,8 @@
           </a-form-model-item>
         </a-col>
         <a-col :span="8">
-          <a-form-model-item label="铺货出库" prop="distributionFalg">
-            <v-select code="FLAG" id="chooseCustom-distributionFalg" v-model="form.distributionFalg" allowClear placeholder="请选择"></v-select>
+          <a-form-model-item label="铺货出库" prop="distributionFlag">
+            <v-select code="FLAG" id="chooseCustom-distributionFlag" v-model="form.distributionFlag" allowClear placeholder="请选择"></v-select>
           </a-form-model-item>
         </a-col>
       </a-row>
@@ -180,8 +180,8 @@
 
 <script>
 import { getArea } from '@/api/data'
-import { custAllList, custFindById, custSave } from '@/api/customer'
-import { salesInsert } from '@/api/sales'
+import { custAllList, custFindById, custSave, updateByCustomerSn } from '@/api/customer'
+import { salesInsert, salesUpdate } from '@/api/sales'
 import { getUserAllList } from '@/api/power-user'
 import { VSelect } from '@/components'
 export default {
@@ -203,11 +203,11 @@ export default {
         buyerSn: '', // 客户sn
         consigneeTel: '', //  联系电话
         consigneeName: '', //  联系人
-        provinceSn: undefined, //  省
+        shippingAddressProvinceSn: undefined, //  省
         shippingAddressProvinceName: '',
-        citySn: undefined, // 市
+        shippingAddressCitySn: undefined, // 市
         shippingAddressCityName: '',
-        countySn: undefined, // 区
+        shippingAddressCountySn: undefined, // 区
         shippingAddressCountyName: '',
         shippingAddress: '', //  详细地址
         fax: '', //  客户传真
@@ -219,11 +219,10 @@ export default {
         settleStyle: '', //  收款方式
         salesManSn: undefined, //  业务员
         salesManName: '',
-        distributionFalg: '0', // 铺货出库
+        distributionFlag: '0', // 铺货出库
         salesTragetType: 'C',
         remarks: '' //  备注
       },
-      custInfo: {}, // 客户信息
       rules: {
         buyerSn: [
           { required: true, message: '请输入客户名称', trigger: ['change', 'blur'] }
@@ -231,13 +230,13 @@ export default {
         consigneeTel: [
           { required: true, message: '请输入联系电话', trigger: 'blur' }
         ],
-        provinceSn: [
+        shippingAddressProvinceSn: [
           { required: true, message: '请选择省', trigger: 'change' }
         ],
-        citySn: [
+        shippingAddressCitySn: [
           { required: true, message: '请选择市', trigger: 'change' }
         ],
-        countySn: [
+        shippingAddressCountySn: [
           { required: true, message: '请选择区/县', trigger: 'change' }
         ],
         shippingAddress: [
@@ -252,7 +251,7 @@ export default {
         settleStyle: [
           { required: true, message: '请选择收款方式', trigger: 'change' }
         ],
-        distributionFalg: [
+        distributionFlag: [
           { required: true, message: '请选择是否铺货出库', trigger: 'change' }
         ]
         // salesManSn: [
@@ -265,7 +264,8 @@ export default {
       addrDistrictList: [], //  区下拉
       userList: [], // 业务员 下拉
       custId: undefined, // 客户id
-      isEdit: true //  是否可编辑
+      isEdit: true, //  是否可编辑
+      interId: null
     }
   },
   methods: {
@@ -275,6 +275,7 @@ export default {
     },
     // 客户 select
     custSelect (v) {
+      console.log(v, 'custSelect')
       const cust = this.custAllList.find(item => item.customerSn == v)
       this.custId = cust.id
       this.form.buyerName = cust.customerName
@@ -283,18 +284,20 @@ export default {
     },
     // 客户 change
     custChange (val) {
-      if (val == undefined || val == '') {
-        this.$refs.ruleForm.resetFields()
-      }
+      console.log(val, 'custChange')
+      this.$refs.ruleForm.resetFields()
       this.custId = undefined
       this.isEdit = true
     },
     // 编辑客户信息
     editCust (data) {
       console.log(data)
-      if (data.provinceSn) { this.getArea('city', data.provinceSn) }
-      if (data.citySn) { this.getArea('district', data.citySn) }
-      this.form = data
+      if (data.shippingAddressProvinceSn) { this.getArea('city', data.shippingAddressProvinceSn) }
+      if (data.shippingAddressCitySn) { this.getArea('district', data.shippingAddressCitySn) }
+      this.form = Object.assign(this.form, data)
+      // this.interId = setInterval(() => {
+
+      // }, 100)
     },
     //  获取详情
     getDetail () {
@@ -308,11 +311,11 @@ export default {
             buyerSn: data.customerSn, // 客户sn
             consigneeTel: data.contactTel, //  联系电话
             consigneeName: data.contactName, //  联系人
-            provinceSn: data.provinceSn, //  省
+            shippingAddressProvinceSn: data.provinceSn, //  省
             shippingAddressProvinceName: data.provinceName,
-            citySn: data.citySn, // 市
+            shippingAddressCitySn: data.citySn, // 市
             shippingAddressCityName: data.cityName,
-            countySn: data.countySn, // 区
+            shippingAddressCountySn: data.countySn, // 区
             shippingAddressCountyName: data.countyName,
             shippingAddress: data.customerAddr, //  详细地址
             fax: data.fax, //  客户传真
@@ -322,8 +325,6 @@ export default {
             priceType: data.priceType, //  价格类型
             settleStyle: data.settleStyleSn //  收款方式
           })
-          // 临时存储客户信息
-          this.custInfo = data
         } else {
           this.$message.error('获取客户信息失败')
           this.$refs.ruleForm.resetFields()
@@ -333,16 +334,16 @@ export default {
     },
     // 保存客户信息
     handleSaveCust () {
-      custSave({
-        id: this.custInfo.id,
+      updateByCustomerSn({
+        customerSn: this.form.buyerSn,
         customerName: this.form.buyerName,
         contactTel: this.form.consigneeTel, //  联系电话
         contactName: this.form.consigneeName, //  联系人
-        provinceSn: this.form.provinceSn, //  省
+        provinceSn: this.form.shippingAddressProvinceSn, //  省
         provinceName: this.form.shippingAddressProvinceName,
-        citySn: this.form.citySn, // 市
+        citySn: this.form.shippingAddressCitySn, // 市
         cityName: this.form.shippingAddressCityName,
-        countySn: this.form.countySn, // 区
+        countySn: this.form.shippingAddressCountySn, // 区
         countyName: this.form.shippingAddressCountyName,
         customerAddr: this.form.shippingAddress, //  详细地址
         dispatchType: this.form.dispatchType, //  配送方式
@@ -366,13 +367,24 @@ export default {
           // 新建销售单
           const form = this.form
           console.log(form, 'save data')
-          salesInsert(form).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$emit('ok', res.data)
-              _this.cancel()
-            }
-          })
+          // 编辑
+          if (this.form.id) {
+            salesUpdate(form).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.$emit('ok', res.data)
+                _this.cancel()
+              }
+            })
+          } else {
+            salesInsert(form).then(res => {
+              if (res.status == 200) {
+                _this.$message.success(res.message)
+                _this.$emit('ok', res.data)
+                _this.cancel()
+              }
+            })
+          }
         } else {
           console.log('error submit!!')
           return false
@@ -410,9 +422,9 @@ export default {
       console.log(val, '-------------')
       this.addrCityList = []
       this.addrDistrictList = []
-      this.form.citySn = undefined
+      this.form.shippingAddressCitySn = undefined
       this.form.shippingAddressCityName = ''
-      this.form.countySn = undefined
+      this.form.shippingAddressCountySn = undefined
       this.form.shippingAddressCountyName = ''
       this.form.shippingAddress = ''
       this.form.shippingAddressCountyName = this.addrProvinceList.find(item => item.id == val).name
@@ -421,7 +433,7 @@ export default {
     // 获取区县列表
     getAreaList (val) {
       this.addrDistrictList = []
-      this.form.countySn = undefined
+      this.form.shippingAddressCountySn = undefined
       this.form.shippingAddressCountyName = ''
       this.form.shippingAddress = ''
       this.form.shippingAddressCityName = this.addrCityList.find(item => item.id == val).name

+ 3 - 3
src/views/salesManagement/salesQuery/detail.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="salesDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="salesDetail-cont">
+    <a-page-header :ghost="false" :backIcon="false" class="salesDetail-cont">
       <template slot="subTitle">
-        <a href="javascript:;" @click="handleBack">返回列表</a>
+        <a href="javascript:;" @click="handleBack"><a-icon type="left"></a-icon>返回列表</a>
       </template>
       <template slot="extra">
         <span>打印字段:</span>
@@ -131,7 +131,7 @@ export default {
   methods: {
     //  返回
     handleBack () {
-      this.$router.push({ path: '/salesManagement/salesQuery/list' })
+      this.$router.push({ name: 'salesQueryList' })
     },
     //  详情
     getDetail () {

+ 68 - 49
src/views/salesManagement/salesQuery/edit.vue

@@ -15,7 +15,7 @@
     </a-page-header>
     <a-card size="small" :bordered="false" class="salesEdit-cont">
       <!-- 查询配件列表 -->
-      <queryPart></queryPart>
+      <queryPart @add="insterProduct"></queryPart>
     </a-card>
     <a-card size="small" :bordered="false" class="salesEdit-cont">
       <!-- 总计 -->
@@ -27,10 +27,10 @@
         <a-col :span="18">
           <a-form-model layout="inline" :model="productForm" @submit="handleSearch">
             <a-form-model-item label="产品编码">
-              <a-input v-model="productForm.productNo" placeholder="输入产品编码" />
+              <a-input v-model="productForm.code" placeholder="输入产品编码" />
             </a-form-model-item>
             <a-form-model-item label="产品名称">
-              <a-input v-model="productForm.productName" placeholder="输入产品名称" />
+              <a-input v-model="productForm.name" placeholder="输入产品名称" />
             </a-form-model-item>
             <a-form-model-item>
               <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
@@ -41,7 +41,7 @@
         <a-col :span="6">
           <div style="float:right;overflow: hidden;">
             <a-button size="small" id="salesEdit-dru">导入明细</a-button>
-            <a-button size="small" type="primary" style="margin-left: 10px" id="salesEdit-del-all">整单删除</a-button>
+            <a-button size="small" type="primary" @click="delSalerDetailAll" style="margin-left: 10px" id="salesEdit-del-all">整单删除</a-button>
           </div>
         </a-col>
       </a-row>
@@ -53,7 +53,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1560 }"
+        :scroll="{ x: 1560, y: 150 }"
         bordered>
         <!-- 售价 -->
         <template slot="price" slot-scope="text, record">
@@ -69,12 +69,16 @@
         <template slot="salesNums" slot-scope="text, record">
           <a-input-number
             id="salesEdit-salesNums"
-            :value="record.salesNums"
+            :value="record.qty"
             :precision="0"
             :min="0"
             :max="999999"
             placeholder="请输入" />
         </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button size="small" type="link" @click="handleDel(record)" id="productInfoList-Del">删除</a-button>
+        </template>
       </s-table>
     </a-card>
     <!-- 选择客户弹框 -->
@@ -87,74 +91,49 @@ import { STable, VSelect } from '@/components'
 import queryPart from './queryPart.vue'
 import chooseCustomModal from './chooseCustomModal.vue'
 import { salesDetail } from '@/api/sales'
+import { salesDetailList, salesDetailInsert, salesDetailUpdatePrice, salesDetailUpdateQty, salesDetailDel, salesDetailDelAll } from '@/api/salesDetail'
 export default {
   name: 'SalesDetail',
   components: { STable, VSelect, queryPart, chooseCustomModal },
   data () {
     return {
       orderId: null, // 销售单id
+      salesBillSn: null, // 销售单sn
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 客户弹框
       detailData: null, // 订单基础数据
       dataSource: [],
       productForm: {
-        productNo: '',
-        productName: ''
+        code: '',
+        name: ''
       },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productNo', width: 140, align: 'center', sorter: true },
-        { title: '产品名称', dataIndex: 'productName', align: 'center' },
-        { title: '原厂编码', dataIndex: 'ycNo', width: 140, align: 'center' },
-        { title: '品牌', dataIndex: 'productBrand', width: 100, align: 'center', sorter: true },
-        { title: '仓库', dataIndex: 'cangku', width: 100, align: 'center', sorter: true },
-        { title: '仓位', dataIndex: 'cangwei', width: 100, align: 'center' },
-        { title: '辅助单位', dataIndex: 'pzdw', width: 100, align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: 140, align: 'center', sorter: true },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', align: 'center' },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: 140, align: 'center' },
+        { title: '品牌', dataIndex: 'dealerProductEntity.productBrandName', width: 100, align: 'center', sorter: true },
+        { title: '仓库', dataIndex: 'warehouseEntity.name', width: 100, align: 'center', sorter: true },
+        { title: '仓位', dataIndex: 'warehouseLocationEntity.name', width: 100, align: 'center' },
         { title: '售价', scopedSlots: { customRender: 'price' }, width: 150, align: 'center' },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: 150, align: 'center' },
-        { title: '单位', dataIndex: 'dw', width: 100, align: 'center' },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: 100, align: 'center' },
         { title: '售价小计', dataIndex: 'xj', width: 100, align: 'center' },
-        { title: '折后小计', dataIndex: 'zhxj', width: 100, align: 'center' }
+        { title: '折后小计', dataIndex: 'zhxj', width: 100, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              {
-                id: '1',
-                productNo: 'jgqp11111111111',
-                productName: '产品1',
-                ycNo: 'jgqp111123545',
-                productBrand: '箭冠品牌',
-                productType: '产品分类1',
-                price: 5.6,
-                salesNums: 12
-              }
-            ],
-            count: 10
-          }
+        return salesDetailList(Object.assign(parameter, this.productForm)).then(res => {
+          const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
           }
-          _this.disabled = false
-          _this.dataSource = data.list
-          resolve(data)
+          this.disabled = false
+          return data
         })
       }
     }
@@ -183,11 +162,50 @@ export default {
       this.$refs.custModal.editCust(this.detailData)
     },
     //  重置
-    resetSearchForm () {},
+    resetSearchForm () {
+      this.$refs.table.refresh()
+    },
     //  返回
     handleBack () {
       this.$router.push({ path: '/salesManagement/salesQuery/list' })
     },
+    // 整单删除
+    delSalerDetailAll () {
+      salesDetailDelAll({ salesBillSn: this.detailData.salesBillSn }).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm()
+        }
+        this.$message.info(res.message)
+      })
+    },
+    // 删除产品
+    handleDel (row) {
+      salesDetailDel({ id: row.id }).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm()
+        }
+        this.$message.info(res.message)
+      })
+    },
+    // 添加产品
+    insterProduct (row) {
+      console.log(row)
+      salesDetailInsert({
+        productSn: row.productSn,
+        price: row.dealerProduct.cityPrice,
+        qty: row.salesNums,
+        salesBillSn: this.detailData.salesBillSn,
+        salesBillNo: this.detailData.salesBillNo,
+        warehouseSn: row.warehouseSn,
+        warehouseLocationSn: row.warehouseLocationSn,
+        stockSn: row.stockSn
+      }).then(res => {
+        console.log(res)
+        if (res.status == 200) {
+          this.resetSearchForm()
+        }
+      })
+    },
     //  详情
     getOrderDetail () {
       salesDetail({ id: this.$route.params.id }).then(res => {
@@ -203,6 +221,7 @@ export default {
     next(vm => {
       // 获取销售单详情
       vm.getOrderDetail()
+      vm.orderId = vm.$route.params.id
     })
   }
 }

+ 25 - 28
src/views/salesManagement/salesQuery/queryPart.vue

@@ -6,17 +6,17 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="产品编码">
-              <a-input id="productInfoList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+              <a-input id="productInfoList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="产品名称">
-              <a-input id="productInfoList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+              <a-input id="productInfoList-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="原厂编码">
-              <a-input id="productInfoList-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
+              <a-input id="productInfoList-origCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
             </a-form-item>
           </a-col>
           <template v-if="advanced">
@@ -31,7 +31,7 @@
                   placeholder="请选择产品品牌"
                   id="productInfoList-productBrandSn"
                   allowClear
-                  v-model="queryParam.productBrandSn"
+                  v-model="queryParam.brandSn"
                   :showSearch="true"
                   option-filter-prop="children"
                   :filter-option="filterOption">
@@ -59,7 +59,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="仓库">
-                <v-select code="CHECK_ENABLE_STATE" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择仓库"></v-select>
+                <v-select code="CHECK_ENABLE_STATE" id="productInfoList-state" v-model="queryParam.warehouseSn" allowClear placeholder="请选择仓库"></v-select>
               </a-form-item>
             </a-col>
           </template>
@@ -88,13 +88,13 @@
       :columns="columns"
       :data="loadData"
       :customRow="handleClickRow"
-      :scroll="{ x: 1530 }"
+      :scroll="{ x: 1530, y: 150 }"
       bordered>
       <!-- 售价 -->
       <template slot="price" slot-scope="text, record">
         <a-input-number
           id="productInfoList-price"
-          :value="record.terminalPrice"
+          :value="record.dealerProduct.cityPrice"
           :precision="0"
           :min="0"
           :max="999999"
@@ -125,7 +125,7 @@
 <script>
 import { productBrandQuery } from '@/api/productBrand'
 import { productTypeQuery } from '@/api/productType'
-import { productList } from '@/api/product'
+import { querySumByProductLocation } from '@/api/stock'
 import productSalesRecordModal from './productSalesRecordModal.vue'
 import { STable, VSelect } from '@/components'
 export default {
@@ -136,16 +136,15 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       productType: [],
       queryParam: { //  查询条件
-        pageSize: 5,
-        code: '', //  产品编码
-        name: '', //  产品名称
-        origCode: '', //  原厂编码
+        productCode: '', //  产品编码
+        productName: '', //  产品名称
+        productOrigCode: '', //  原厂编码
         sysFlag: '1',
-        productBrandSn: undefined, //  产品品牌
+        brandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        onlineFalg: undefined //  状态
+        warehouseSn: undefined //  仓库
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
@@ -153,22 +152,21 @@ export default {
       productTypeList: [], //  产品类别  下拉数据
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '产品编码', dataIndex: 'code', width: 140, align: 'center', sorter: true },
-        { title: '产品名称', dataIndex: 'name', align: 'center' },
-        { title: '原厂编码', dataIndex: 'origCode', width: 140, align: 'center' },
-        { title: '品牌', dataIndex: 'productBrandName', width: 100, align: 'center', sorter: true },
-        { title: '仓库', dataIndex: 'cangku', width: 100, align: 'center', sorter: true },
-        { title: '仓位', dataIndex: 'cangwei', width: 100, align: 'center' },
-        { title: '辅助单位', dataIndex: 'pzdw', width: 100, align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', sorter: true },
+        { title: '产品名称', dataIndex: 'productName', align: 'center' },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center' },
+        { title: '品牌', dataIndex: 'brandName', width: 100, align: 'center', sorter: true },
+        { title: '仓库', dataIndex: 'warehouseSn', width: 100, align: 'center', sorter: true },
+        { title: '仓位', dataIndex: 'warehouseLocationSn', width: 100, align: 'center' },
         { title: '售价', scopedSlots: { customRender: 'price' }, width: 150, align: 'center' },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: 150, align: 'center' },
-        { title: '单位', dataIndex: 'dw', width: 100, align: 'center' },
+        { title: '单位', dataIndex: 'unit', width: 100, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return productList(Object.assign(parameter, this.queryParam)).then(res => {
+        return querySumByProductLocation(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
@@ -202,14 +200,13 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.code = ''
-      this.queryParam.name = ''
-      this.queryParam.origCode = ''
-      this.queryParam.productBrandSn = undefined
+      this.queryParam.productName = ''
+      this.queryParam.productOrigCode = ''
+      this.queryParam.brandSn = undefined
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
-      this.queryParam.onlineFalg = undefined
+      this.queryParam.warehouseSn = undefined
       this.productType = []
       this.$refs.table.refresh(true)
     },

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

@@ -72,7 +72,7 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1280 }"
+      :scroll="{ x: 1280, y: 300 }"
       bordered>
       <!-- 状态 -->
       <template slot="status" slot-scope="text, record">