chenrui 4 年之前
父节点
当前提交
74a49008b5

+ 8 - 0
src/api/sales.js

@@ -11,6 +11,14 @@ export const salesList = (params) => {
     method: 'post'
   })
 }
+//  销售 详情
+export const salesDetail = (params) => {
+  return axios({
+    url: `/sales/findById/${params.id}`,
+    data: params,
+    method: 'get'
+  })
+}
 //  销售 打印
 export const salesPrint = (params) => {
   return axios({

+ 18 - 18
src/api/salesRerurn.js → src/api/salesReturn.js

@@ -1,8 +1,8 @@
 import { axios } from '@/utils/request'
 
 //  销售退货 列表  分页
-export const salesRerurnList = (params) => {
-  const url = `/salesRerurn/queryPage/${params.pageNo}/${params.pageSize}`
+export const salesReturnList = (params) => {
+  const url = `/salesReturn/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -12,65 +12,65 @@ export const salesRerurnList = (params) => {
   })
 }
 //  销售退货 导出
-export const salesRerurnExport = (params) => {
+export const salesReturnExport = (params) => {
   return axios({
-    url: '/salesRerurn/export',
+    url: '/salesReturn/export',
     data: params,
     method: 'post'
   })
 }
 //  销售退货 审核
-export const salesRerurnAudit = (params) => {
+export const salesReturnAudit = (params) => {
   return axios({
-    url: '/salesRerurn/audit',
+    url: '/salesReturn/audit',
     data: params,
     method: 'post'
   })
 }
 //  销售退货 收款
-export const salesRerurnPay = (params) => {
+export const salesReturnPay = (params) => {
   return axios({
-    url: '/salesRerurn/pay',
+    url: '/salesReturn/pay',
     data: params,
     method: 'post'
   })
 }
 //  销售退货 打印
-export const salesRerurnPrint = (params) => {
+export const salesReturnPrint = (params) => {
   return axios({
-    url: '/salesRerurn/print',
+    url: '/salesReturn/print',
     data: params,
     method: 'post'
   })
 }
 //  销售退货 打印预览
-export const salesRerurnprintPreview = (params) => {
+export const salesReturnprintPreview = (params) => {
   return axios({
-    url: '/salesRerurn/printPreview',
+    url: '/salesReturn/printPreview',
     data: params,
     method: 'post'
   })
 }
 //  销售退货 提交
-export const salesRerurnSubmit = (params) => {
+export const salesReturnSubmit = (params) => {
   return axios({
-    url: '/salesRerurn/submit',
+    url: '/salesReturn/submit',
     data: params,
     method: 'post'
   })
 }
 //  销售退货 保存
-export const salesRerurnSave = (params) => {
+export const salesReturnSave = (params) => {
   return axios({
-    url: '/salesRerurn/save',
+    url: '/salesReturn/save',
     data: params,
     method: 'post'
   })
 }
 //  销售退货 删除
-export const salesRerurnDel = (params) => {
+export const salesReturnDel = (params) => {
   return axios({
-    url: `/salesRerurn/delete/${params.id}`,
+    url: `/salesReturn/delete/${params.id}`,
     data: params,
     method: 'post'
   })

+ 6 - 6
src/api/salesRerurnDetail.js → src/api/salesReturnDetail.js

@@ -1,8 +1,8 @@
 import { axios } from '@/utils/request'
 
 //  销售退货详情 列表  分页
-export const salesRerurnDetailList = (params) => {
-  const url = `/salesRerurnDetail/queryPage/${params.pageNo}/${params.pageSize}`
+export const salesReturnDetailList = (params) => {
+  const url = `/salesReturnDetail/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -12,17 +12,17 @@ export const salesRerurnDetailList = (params) => {
   })
 }
 //  销售退货详情 保存
-export const salesRerurnDetailSave = (params) => {
+export const salesReturnDetailSave = (params) => {
   return axios({
-    url: '/salesRerurnDetail/save',
+    url: '/salesReturnDetail/save',
     data: params,
     method: 'post'
   })
 }
 //  销售退货详情 删除
-export const salesRerurnDetailDel = (params) => {
+export const salesReturnDetailDel = (params) => {
   return axios({
-    url: `/salesRerurnDetail/delete/${params.id}`,
+    url: `/salesReturnDetail/delete/${params.id}`,
     data: params,
     method: 'post'
   })

+ 15 - 7
src/api/urgent.js

@@ -1,6 +1,6 @@
 import { axios } from '@/utils/request'
 
-//  急件列表  有分页
+//  急件 列表  有分页
 export const urgentList = (params) => {
   const url = `/urgent/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -11,7 +11,7 @@ export const urgentList = (params) => {
     method: 'post'
   })
 }
-//  急件打印
+//  急件 打印
 export const urgentPrint = (params) => {
   return axios({
     url: '/urgent/print',
@@ -19,7 +19,7 @@ export const urgentPrint = (params) => {
     method: 'post'
   })
 }
-//  急件打印预览
+//  急件 打印预览
 export const urgentPrintPreview = (params) => {
   return axios({
     url: '/urgent/printPreview',
@@ -27,11 +27,19 @@ export const urgentPrintPreview = (params) => {
     method: 'post'
   })
 }
-//  急件冲减
+//  急件 冲减
 export const urgentWriteDown = (params) => {
   return axios({
-    url: '/urgent/writeDown',
-    data: params,
-    method: 'post'
+    url: `/urgent/writeDownById/${params.id}`,
+    data: {},
+    method: 'get'
+  })
+}
+//  急件 详情
+export const urgentDetail = (params) => {
+  return axios({
+    url: `/urgent/findById/${params.id}`,
+    data: {},
+    method: 'get'
   })
 }

+ 6 - 6
src/config/router.config.js

@@ -83,7 +83,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id',
+                path: 'detail/:id/:sn',
                 name: 'salesDetail',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesQuery/detail.vue'),
                 meta: {
@@ -177,7 +177,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id',
+                path: 'detail/:id/:sn',
                 name: 'urgentItemsOffsetDetail',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/urgentItemsOffset/detail.vue'),
                 meta: {
@@ -213,11 +213,11 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'detail/:id',
+                path: 'detail/:id/:sn',
                 name: 'salesReturnDetail',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/detail.vue'),
                 meta: {
-                  title: '退货单明细',
+                  title: '退货单详情',
                   icon: 'fund',
                   hidden: true
                   // permission: 'M_salesReturn'
@@ -228,7 +228,7 @@ export const asyncRouterMap = [
                 name: 'salesReturnNew',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/salesReturnNew.vue'),
                 meta: {
-                  title: '新退货单',
+                  title: '新退货单',
                   icon: 'fund',
                   hidden: true
                   // permission: 'M_salesReturnNew'
@@ -239,7 +239,7 @@ export const asyncRouterMap = [
                 name: 'salesReturnEdit',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesReturn/salesReturnNew.vue'),
                 meta: {
-                  title: '修改退货单',
+                  title: '编辑退货单',
                   icon: 'fund',
                   hidden: true
                   // permission: 'M_salesReturnEdit'

+ 1 - 1
src/libs/tools.js

@@ -1,5 +1,5 @@
 // 小数运算精度处理  4位小数运算后结果保留2位小数
 export const getOperationalPrecision = (num1, num2) => {
   const val = ((num1 * 10000) * (num2 * 10000) / 100000000).toFixed(2) || 0
-  return val == 0 ? 0 : val
+  return val != 0 ? val : 0
 }

+ 87 - 82
src/views/salesManagement/backorder/detail.vue

@@ -7,21 +7,25 @@
       </template>
     </a-page-header>
     <a-card size="small" :bordered="false" class="backorderDetail-cont">
-      <a-descriptions :column="3">
-        <a-descriptions-item label="客户名称">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="客户地址">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="支付方式">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="收款方式">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="联系手机">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="联系电话">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="销售单号">箭冠营销中心</a-descriptions-item>
-      </a-descriptions>
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="客户名称">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="客户地址">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="支付方式">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="收款方式">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="联系手机">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="联系电话">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="销售单号">箭冠营销中心</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
     </a-card>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">缺货总款数:<strong>1</strong>,缺货总数量:<strong>1</strong>,缺货总售价:<strong>0</strong></div>
-    </a-alert>
     <a-card size="small" :bordered="false" class="backorderDetail-cont">
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">缺货总款数:<strong>1</strong>,缺货总数量:<strong>1</strong>,缺货总售价:<strong>0</strong></div>
+      </a-alert>
       <!-- 列表 -->
       <s-table
         class="sTable"
@@ -30,85 +34,86 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
+        :scroll="{ x: 960 }"
         bordered></s-table>
     </a-card>
   </div>
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  export default{
-    components: { STable, VSelect },
-    data(){
-      return{
-        queryParam: {
-          
-        },
-        disabled: false, //  查询、重置按钮是否可操作
-        brandData: [],  //  产品品牌  下拉数据
-        typeData: [],  //  产品类别  下拉数据
-        // 表头
-        columns: [
-          { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-          { title: '产品编码', dataIndex: 'creatDate', align: 'center' },
-          { title: '产品名称', dataIndex: 'custNahme', align: 'center', ellipsis: true },
-          { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
-          { title: '售价', dataIndex: 'custsNsagme', align: 'center' },
-          { title: '缺货数量', dataIndex: 'custsNagme', align: 'center' },
-          { title: '单位', dataIndex: 'warehouse', align: 'center' },
-          { title: '售价小计', dataIndex: 'warehouseLoc', align: 'center' }
-        ],
-        // 加载数据方法 必须为 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', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-              ],
-              count: 10
-            }
-            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
-            resolve(data)
-          })
-        },
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      queryParam: {
+
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      brandData: [], //  产品品牌  下拉数据
+      typeData: [], //  产品类别  下拉数据
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' }
+      ],
+      // 加载数据方法 必须为 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', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
+            ],
+            count: 10
+          }
+          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
+          resolve(data)
+        })
       }
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
     },
-    methods: {
-      //  重置
-      resetSearchForm () {
-        this.queryParam.orderBundleNo = ''
-        this.queryParam.orderBundle.custMobile = ''
-        this.queryParam.bundleName = ''
-        this.queryParam.itemName = ''
-        this.oldTime = undefined
-        this.newTime = undefined
-        this.$refs.table.refresh(true)
-      },
-      //  提交
-      handleSubmit(){},
-      //  返回列表
-      handleBack(){
-        this.$router.push({ path: '/salesManagement/backorder/list'})
-      },
+    //  提交
+    handleSubmit () {},
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/backorder/list' })
     }
   }
+}
 </script>
 
 <style lang="less">

+ 36 - 31
src/views/salesManagement/backorder/list.vue

@@ -7,18 +7,25 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="审核时间">
               <a-range-picker
-                  style="width:100%"
-                  id="backorderList-creatTime"
-                  :disabledDate="disabledDate"
-                  v-model="time"
-                  :format="dateFormat"
-                  :placeholder="['开始时间', '结束时间']" />
-              </a-form-item>
+                style="width:100%"
+                id="backorderList-creatTime"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称">
-              <a-select id="backorderList-bundleName" placeholder="请选择" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
+              <a-select
+                id="backorderList-bundleName"
+                placeholder="请选择"
+                allowClear
+                v-model="queryParam.dataSourceNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
                 <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
               </a-select>
             </a-form-item>
@@ -54,10 +61,11 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
+      :scroll="{ x: 1120 }"
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" @click="handleDetail(record)" id="backorderList-detail-btn">详情</a-button>
+        <a-button size="small" type="link" @click="handleDetail(record)" id="backorderList-detail-btn">详情</a-button>
       </template>
     </s-table>
   </a-card>
@@ -70,24 +78,24 @@ export default {
   components: { STable, VSelect },
   data () {
     return {
-      advanced: false,  // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
         bundleName: '', //  供应商名称
-        state: undefined,  //  状态
+        state: undefined //  状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
-      time: [],  //  创建时间
+      time: [], //  创建时间
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '销售单号', dataIndex: 'productType', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购单号', dataIndex: 'inventosryMoney', width: 180, align: 'center' },
-        { title: '客户名称', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '缺货款数', dataIndex: 'psroductBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '缺货数量', dataIndex: 'productBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '缺货售价', dataIndex: 'invdentoryNum', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'inventoryMoney', width: 180, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 140, align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '缺货款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '缺货售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -102,7 +110,7 @@ export default {
         //   return data
         // })
         const _this = this
-        return new Promise(function(resolve, reject){
+        return new Promise(function (resolve, reject) {
           const data = {
             pageNo: 1,
             pageSize: 10,
@@ -118,7 +126,7 @@ export default {
           resolve(data)
         })
       },
-      brandData: [],
+      brandData: []
     }
   },
   methods: {
@@ -126,7 +134,7 @@ export default {
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()
     },
-    filterOption(input, option) {
+    filterOption (input, option) {
     	return (
     		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
     	)
@@ -142,9 +150,9 @@ export default {
       this.$refs.table.refresh(true)
     },
     //  详情
-    handleDetail(row){
-      this.$router.push({ path: `/salesManagement/backorder/detail/${row.id}`})
-    },
+    handleDetail (row) {
+      this.$router.push({ path: `/salesManagement/backorder/detail/${row.id}` })
+    }
   }
 }
 </script>
@@ -153,9 +161,6 @@ export default {
   .backorderList-wrap{
     .sTable{
       margin-top: 20px;
-      table{
-        width: auto;
-      }
     }
   }
-</style>
+</style>

+ 124 - 122
src/views/salesManagement/examineVerify/detail.vue

@@ -14,28 +14,34 @@
     </a-page-header>
     <!-- 急件单信息 -->
     <a-card size="small" :bordered="false" class="examineVerifyDetail-info-wrapper">
-      <a-descriptions :column="4">
-        <a-descriptions-item label="客户名称">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="客户地址">陕西省西安市未央区凤城八路</a-descriptions-item>
-        <a-descriptions-item label="支付方式">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="收款方式">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="联系手机">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="联系电话">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="备注" span="2">名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达</a-descriptions-item>
-        <a-descriptions-item label="销售单号">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="制单人">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="业务员">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="审核状态">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="完结状态">名称思密达</a-descriptions-item>
-      </a-descriptions>
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="客户名称">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="客户地址">陕西省西安市未央区凤城八路</a-descriptions-item>
+            <a-descriptions-item label="支付方式">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="收款方式">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="联系手机">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="联系电话">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="备注" span="2">名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达名称思密达</a-descriptions-item>
+            <a-descriptions-item label="销售单号">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="制单人">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="业务员">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="审核状态">名称思密达</a-descriptions-item>
+            <a-descriptions-item label="完结状态">名称思密达</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
     </a-card>
-    <!-- 合计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div class="ftext" slot="message">总款数:<strong>998</strong>;总数量:<strong>2009</strong>;总数量:<strong>2009</strong>;急件总款数:<strong>2009</strong>;急件总数量:<strong>2009</strong>。</div>
-      <div class="ftext" slot="message">总售价:<strong>998</strong>;总成本:<strong>2009</strong>;总毛利:<strong>2009</strong>;折后总售价:<strong>2009</strong>;折扣:<strong>2009%</strong>;折扣金额:<strong>2009</strong>。</div>
-    </a-alert>
     <!-- 表格 -->
     <a-card size="small" :bordered="false" class="examineVerifyDetail-table-wrapper">
+      <!-- 合计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">
+          总款数:<strong>998</strong>;总数量:<strong>2009</strong>;总数量:<strong>2009</strong>;急件总款数:<strong>2009</strong>;急件总数量:<strong>2009</strong>。<br/>
+          总售价:<strong>998</strong>;总成本:<strong>2009</strong>;总毛利:<strong>2009</strong>;折后总售价:<strong>2009</strong>;折扣:<strong>2009%</strong>;折扣金额:<strong>2009</strong>。
+        </div>
+      </a-alert>
       <s-table
         class="sTable"
         ref="table"
@@ -43,108 +49,109 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
+        :scroll="{ x: 1660 }"
         bordered>
         <!-- 库存数量 -->
         <template slot="inventoryQuantity" slot-scope="text, record">
-          <span :class="[record.inventoryQuantity < record.quantityNotOffset ? 'red' : '']">{{record.inventoryQuantity}}</span>
+          <span :class="[record.inventoryQuantity < record.quantityNotOffset ? 'red' : '']">{{ record.inventoryQuantity }}</span>
         </template>
       </s-table>
     </a-card>
   </div>
-  
+
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  export default {
-    components: { STable, VSelect },
-    data () {
-      return {
-        columns: [
-          { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-          { title: '产品编码', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-          { title: '产品名称', dataIndex: 'productOldNum', width: 160, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-          { title: '原厂编码', dataIndex: 'productBrand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '成本价', dataIndex: 'productsBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '售价', dataIndex: 'productssBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '折后售价', dataIndex: 'prodsuctssBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '销售数量', dataIndex: 'inventoryNum', width: 180, align: 'center', ellipsis: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '单位', dataIndex: 'inventoryMoneys', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '售价小计', dataIndex: 'inventoryMoneyss', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '折后小计', dataIndex: 'invesntoryMoneyss', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '折扣金额', dataIndex: 'indventoryMoneyss', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-          { title: '仓库', dataIndex: 'productBrawnd', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '仓位', dataIndex: 'productBradnd', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-          { title: '销售类型', dataIndex: 'product2Brand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        ],
-        // 加载数据方法 必须为 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', productNum: 'jgqp11111111111', inventoryQuantity: 0, quantityNotOffset: 3, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-              ]
-            }
-            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
-            resolve(data)
-          })
-        },
-      }
-    },
-    methods: {
-      //  返回
-      handleBack(){
-        this.$router.push({ path: '/salesManagement/examineVerify/list' })
-      },
-      //  冲减
-      handleSubmit(){
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后售价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' },
+        { title: '折后小计', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center' },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
+        { title: '销售类型', dataIndex: 'salesBillType', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 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
-        this.$confirm({
-          title: '提示',
-          content: '确定要进行冲减吗?',
-          okText: '确定',
-          cancelText: '取消',
-		  centered: true,
-          onOk () {
-            // delectRolePower({
-            //   id: row.id
-            // }).then(res => {
-            //   console.log(res, 'res1111')
-            //   if (res.status == 200) {
-            //     _this.$message.success(res.message)
-            //     _this.$refs.table.refresh()
-            //   }
-            // })
+        return new Promise(function (resolve, reject) {
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', productNum: 'jgqp11111111111', inventoryQuantity: 0, quantityNotOffset: 3, productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
+            ]
           }
+          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
+          resolve(data)
         })
-      },
-      //  快速打印
-      handlePrint(){
-        
-      },
-      //  打印预览
-      handlePreview(){
-        
-      },
+      }
+    }
+  },
+  methods: {
+    //  返回
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/examineVerify/list' })
+    },
+    //  冲减
+    handleSubmit () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要进行冲减吗?',
+        okText: '确定',
+        cancelText: '取消',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  快速打印
+    handlePrint () {
+
+    },
+    //  打印预览
+    handlePreview () {
+
     }
   }
+}
 </script>
 
 <style lang="less">
@@ -152,26 +159,21 @@
     .examineVerifyDetail-info-wrapper{
       margin: 15px 0;
       .item-cont {
-      	margin-bottom: 15px;
-      	display: flex;
-      	.item-label {
-      		width: 115px;
-      		font-size: 14px;
-      		color: rgba(0, 0, 0, 0.85);
-      		flex-shrink: 0;
-      	}
-      	.item-main {
-      		flex-grow: 1;
+        margin-bottom: 15px;
+        display: flex;
+        .item-label {
+          width: 115px;
+          font-size: 14px;
+          color: rgba(0, 0, 0, 0.85);
+          flex-shrink: 0;
+        }
+        .item-main {
+          flex-grow: 1;
           word-break: break-all;
-      	}
+        }
       }
     }
     .examineVerifyDetail-table-wrapper{
-      .sTable{
-        table{
-          width: auto;
-        }
-      }
       .red{
         color: #ed1c24;
       }

+ 40 - 40
src/views/salesManagement/examineVerify/list.vue

@@ -7,20 +7,26 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="创建时间">
               <a-range-picker
-                  style="width:100%"
-                  id="examineVerifyList-bundleNamesss"
-                  :disabledDate="disabledDate"
-                  v-model="queryParam.brand"
-                  :format="dateFormat"
-                  :placeholder="['开始时间', '结束时间']" />
-              </a-form-item>
+                style="width:100%"
+                id="examineVerifyList-bundleNamesss"
+                :disabledDate="disabledDate"
+                v-model="queryParam.brand"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称">
-            	<a-select placeholder="请选择" allowClear v-model="queryParam.name" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
-            		<a-select-option v-for="item in custData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
-            	</a-select>
+              <a-select
+                placeholder="请选择"
+                allowClear
+                v-model="queryParam.name"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <a-select-option v-for="item in custData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -78,6 +84,7 @@
       :columns="columns"
       :data="loadData"
       :showPagination="false"
+      :scroll="{ x: 1680 }"
       bordered>
       <!-- 状态 -->
       <template slot="status" slot-scope="text, record">
@@ -85,8 +92,9 @@
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button type="primary" size="small" @click="handleExamine(record)" id="examineVerifyList-examine-btn" style="margin: 0 0 10px 8px;">备货审核</a-button>
-        <a-button size="small" @click="handleDetail(record)" id="examineVerifyList-detail-btn" style="margin: 0 0 0 8px;">详情</a-button>
+        <a-button size="small" type="link" @click="handleExamine(record)" id="examineVerifyList-examine-btn" style="margin: 0 0 10px 8px;">备货审核</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDetail(record)" id="examineVerifyList-detail-btn" style="margin: 0 0 0 8px;">详情</a-button>
       </template>
     </s-table>
   </a-card>
@@ -102,22 +110,24 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
         bundleName: '', //  品牌名称
-        state: undefined, //  状态
+        state: undefined //  状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '创建时间', dataIndex: 'nso', width: 70, align: 'center' },
-        { title: '关联单号', dataIndex: 'productName', align: 'center', ellipsis: true },
-        { title: '出库类型', dataIndex: 'productOldNum', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'inventoryMoney', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '总款数', dataIndex: 'inventsoryMoney', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总数量', dataIndex: 'inventoryModney', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'inventoryaMoney', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核时间', dataIndex: 'inventoryMongey', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核状态', scopedSlots: { customRender: 'status' }, width: 180, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '单据来源', dataIndex: 'creasteDate', width: 100, align: 'center' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '备货时间', dataIndex: 'audsitTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', scopedSlots: { customRender: 'status' }, width: 110, align: 'center' },
+        { title: '打印状态', dataIndex: 'audsitTime', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印次数', dataIndex: 'audsitTsime', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
       ],
       selectedRowKeys: [], // Check here to configure the default column
       loading: false,
@@ -134,7 +144,7 @@ export default {
         //   return data
         // })
         const _this = this
-        return new Promise(function(resolve, reject){
+        return new Promise(function (resolve, reject) {
           const data = {
             pageNo: 1,
             pageSize: 10,
@@ -150,7 +160,7 @@ export default {
           resolve(data)
         })
       },
-      custData: [],  //  客户 下拉数据
+      custData: [] //  客户 下拉数据
     }
   },
   computed: {
@@ -163,10 +173,10 @@ export default {
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()
     },
-    filterOption(input, option) {
-    	return (
-    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    	)
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     },
     //  重置
     resetSearchForm () {
@@ -220,13 +230,3 @@ export default {
   }
 }
 </script>
-
-<style lang="less">
-  .examineVerifyList-wrap{
-    .sTable{
-      table{
-        width: auto;
-      }
-    }
-  }
-</style>

+ 8 - 19
src/views/salesManagement/giftRecord/list.vue

@@ -137,30 +137,19 @@ export default {
       return date && date.valueOf() > Date.now()
     },
     filterOption (input, option) {
-    	return (
-    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    	)
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
+      this.queryParam.productCode = ''
+      this.queryParam.productOrigCode = ''
+      this.queryParam.salesBillNo = ''
+      this.queryParam.customerName = undefined
+      this.time = []
       this.$refs.table.refresh(true)
     }
   }
 }
 </script>
-
-<style lang="less">
-  .giftRecordList-wrap{
-    .sTable{
-      table{
-        width: auto;
-      }
-    }
-  }
-</style>

+ 1 - 4
src/views/salesManagement/outboundOrder/list.vue

@@ -91,7 +91,7 @@
       <template slot="action" slot-scope="text, record">
         <a-button size="small" type="link" @click="handleOutbound(record)" id="outboundOrderList-out-btn">出库</a-button>
         <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDetail(record)" style="margin-left: 10px;" id="outboundOrderList-detail-btn">明细</a-button>
+        <a-button size="small" type="link" @click="handleDetail(record)" style="margin-left: 10px;" id="outboundOrderList-detail-btn">详情</a-button>
       </template>
     </s-table>
   </a-card>
@@ -223,9 +223,6 @@ export default {
   .outboundOrderList-wrap{
     .sTable{
       margin-top: 20px;
-      table{
-        width: auto;
-      }
     }
     .red{
       color: #ed1c24;

+ 89 - 85
src/views/salesManagement/quotation/detail.vue

@@ -13,22 +13,25 @@
       </template>
     </a-page-header>
     <a-card size="small" :bordered="false" class="quotationDetail-cont">
-      <a-descriptions :column="3">
-        <a-descriptions-item label="客户名称">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="客户地址">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="报价单号">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="联系手机">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="联系电话">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="备注">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="业务员">箭冠营销中心</a-descriptions-item>
-        <a-descriptions-item label="制单人">箭冠营销中心</a-descriptions-item>
-      </a-descriptions>
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="客户名称">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="客户地址">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="报价单号">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="联系电话">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="备注">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="业务员">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="制单人">箭冠营销中心</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
     </a-card>
-    <!-- 总计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div slot="message">总款数:<strong>1</strong>,总数量:<strong>1</strong>,总赠品数量:<strong>0</strong>,总售价:<strong>14</strong>,总成本:<strong>6.33</strong>,总毛利: <strong>6</strong></div>
-    </a-alert>
     <a-card size="small" :bordered="false" class="quotationDetail-cont">
+      <!-- 总计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px">
+        <div slot="message">总款数:<strong>1</strong>,总数量:<strong>1</strong>,总赠品数量:<strong>0</strong>,总售价:<strong>14</strong>,总成本:<strong>6.33</strong>,总毛利: <strong>6</strong></div>
+      </a-alert>
       <!-- 列表 -->
       <s-table
         class="sTable"
@@ -37,87 +40,88 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
+        :scroll="{ x: 1160 }"
         bordered></s-table>
     </a-card>
   </div>
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  export default{
-    components: { STable, VSelect },
-    data(){
-      return{
-        queryParam: {
-          
-        },
-        disabled: false, //  查询、重置按钮是否可操作
-        brandData: [],  //  产品品牌  下拉数据
-        typeData: [],  //  产品类别  下拉数据
-        // 表头
-        columns: [
-          { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-          { title: '产品编码', dataIndex: 'creatDate', align: 'center' },
-          { title: '产品名称', dataIndex: 'custNahme', align: 'center', ellipsis: true },
-          { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
-          { title: '品牌', dataIndex: 'custsN2agme', align: 'center' },
-          { title: '成本价', dataIndex: 'transferOutQuantity', align: 'center' },
-          { title: '销售价', dataIndex: 'custsNsagme', align: 'center' },
-          { title: '数量', dataIndex: 'custsNagme', align: 'center' },
-          { title: '单位', dataIndex: 'warehouse', align: 'center' },
-          { title: '售价小计', dataIndex: 'warehouseLoc', align: 'center' }
-        ],
-        // 加载数据方法 必须为 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', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-              ],
-              count: 10
-            }
-            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
-            resolve(data)
-          })
-        },
+import { STable, VSelect } from '@/components'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      queryParam: {
+
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      brandData: [], //  产品品牌  下拉数据
+      typeData: [], //  产品类别  下拉数据
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'producstOrigCode', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' }
+      ],
+      // 加载数据方法 必须为 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', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
+            ],
+            count: 10
+          }
+          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
+          resolve(data)
+        })
       }
+    }
+  },
+  methods: {
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
     },
-    methods: {
-      //  重置
-      resetSearchForm () {
-        this.queryParam.orderBundleNo = ''
-        this.queryParam.orderBundle.custMobile = ''
-        this.queryParam.bundleName = ''
-        this.queryParam.itemName = ''
-        this.oldTime = undefined
-        this.newTime = undefined
-        this.$refs.table.refresh(true)
-      },
-      //  提交
-      handleSubmit(){},
-      //  返回列表
-      handleBack(){
-        this.$router.push({ path: '/salesManagement/quotation/list'})
-      },
+    //  提交
+    handleSubmit () {},
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/quotation/list' })
     }
   }
+}
 </script>
 
 <style lang="less">

+ 49 - 49
src/views/salesManagement/quotation/list.vue

@@ -7,18 +7,25 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="创建时间">
               <a-range-picker
-                  style="width:100%"
-                  id="quotationList-creatTime"
-                  :disabledDate="disabledDate"
-                  v-model="time"
-                  :format="dateFormat"
-                  :placeholder="['开始时间', '结束时间']" />
-              </a-form-item>
+                style="width:100%"
+                id="quotationList-creatTime"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
+            </a-form-item>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称">
-              <a-select id="quotationList-bundleName" placeholder="请选择" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
+              <a-select
+                id="quotationList-bundleName"
+                placeholder="请选择"
+                allowClear
+                v-model="queryParam.dataSourceNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
                 <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
               </a-select>
             </a-form-item>
@@ -48,7 +55,7 @@
     </div>
     <!-- 操作按钮 -->
     <div class="table-operator">
-      <a-button id="quotationList-add" type="primary" @click="handleAdd()">新增报价单</a-button>
+      <a-button id="quotationList-add" type="primary" @click="handleAdd">新增报价单</a-button>
     </div>
     <!-- 列表 -->
     <s-table
@@ -58,16 +65,19 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
+      :scroll="{ x: 1310 }"
       bordered>
       <!-- 是否转销售单 -->
       <template slot="invenstoryNum" slot-scope="text, record">
-        <span>{{record.invenstoryNum == 1 ? '是' : '否'}}</span>
+        <span>{{ record.invenstoryNum == 1 ? '是' : '否' }}</span>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="primary" @click="handleEdit(record)" id="quotationList-edit-btn">编辑</a-button>
-        <a-button size="small" @click="handleDetail(record)" id="quotationList-detail-btn" style="margin: 0 0 10px 8px">详情</a-button>
-        <a-button size="small" type="danger" @click="handleDel(record)" id="quotationList-del-btn" style="margin: 0 0 0 8px">删除</a-button>
+        <a-button size="small" type="link" @click="handleEdit(record)" id="quotationList-edit-btn">编辑</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDetail(record)" id="quotationList-detail-btn">详情</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDel(record)" id="quotationList-del-btn">删除</a-button>
       </template>
     </s-table>
     <!-- 选择基本信息弹框 -->
@@ -83,25 +93,25 @@ export default {
   components: { STable, VSelect, basicInfoModal },
   data () {
     return {
-      advanced: false,  // 高级搜索 展开/关闭
+      advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
         bundleName: '', //  供应商名称
-        state: undefined,  //  状态
+        state: undefined //  状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
-      time: [],  //  创建时间
+      time: [], //  创建时间
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '创建时间', dataIndex: 'inventoryMoney', width: 180, align: 'center' },
-        { title: '报价单号', dataIndex: 'inventosryMoney', width: 180, align: 'center' },
-        { title: '关联销售单号', dataIndex: 'productType', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '总款数', dataIndex: 'productBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总数量', dataIndex: 'psroductBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总价格', dataIndex: 'invdentoryNum', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '是否转销售单', scopedSlots: { customRender: 'invenstoryNum' }, width: 180, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 240, align: 'center' }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'inventoryMoney', width: 160, align: 'center' },
+        { title: '报价单号', dataIndex: 'inventosryMoney', width: 140, align: 'center' },
+        { title: '关联销售单号', dataIndex: 'productType', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'productBrand', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'psroductBrand', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总价格', dataIndex: 'invdentoryNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '是否转销售单', scopedSlots: { customRender: 'invenstoryNum' }, width: 120, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -116,7 +126,7 @@ export default {
         //   return data
         // })
         const _this = this
-        return new Promise(function(resolve, reject){
+        return new Promise(function (resolve, reject) {
           const data = {
             pageNo: 1,
             pageSize: 10,
@@ -133,7 +143,7 @@ export default {
         })
       },
       brandData: [],
-      openModal: false, // 基本信息弹框是否显示
+      openModal: false // 基本信息弹框是否显示
     }
   },
   methods: {
@@ -141,10 +151,10 @@ export default {
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()
     },
-    filterOption(input, option) {
-    	return (
-    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    	)
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     },
     //  重置
     resetSearchForm () {
@@ -157,23 +167,23 @@ export default {
       this.$refs.table.refresh(true)
     },
     //  基本信息  保存
-    handleOk(){
+    handleOk () {
       this.$router.push({ path: `/salesManagement/quotation/add` })
     },
     //  新增
-    handleAdd(){
+    handleAdd () {
       this.openModal = true
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ path: `/salesManagement/quotation/edit/${row.id}`})
+      this.$router.push({ path: `/salesManagement/quotation/edit/${row.id}` })
     },
     //  详情
-    handleDetail(row){
-      this.$router.push({ path: `/salesManagement/quotation/detail/${row.id}`})
+    handleDetail (row) {
+      this.$router.push({ path: `/salesManagement/quotation/detail/${row.id}` })
     },
     //  删除
-    handleDel(row){
+    handleDel (row) {
       const _this = this
       this.$confirm({
         title: '提示',
@@ -192,17 +202,7 @@ export default {
           // })
         }
       })
-    },
+    }
   }
 }
 </script>
-
-<style lang="less">
-  .quotationList-wrap{
-    .sTable{
-      table{
-        width: auto;
-      }
-    }
-  }
-</style>

+ 64 - 60
src/views/salesManagement/salesQuery/detail.vue

@@ -22,29 +22,28 @@
     <a-card size="small" :bordered="false" class="salesDetail-cont">
       <a-collapse :activeKey="['1']">
         <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions size="small" :column="3">
-            <a-descriptions-item label="客户名称">张三的</a-descriptions-item>
-            <a-descriptions-item label="客户地址">山西省太原市阿斯加德法律静安寺水电费</a-descriptions-item>
-            <a-descriptions-item label="支付方式">货到付款</a-descriptions-item>
-            <a-descriptions-item label="收款方式">现金</a-descriptions-item>
-            <a-descriptions-item label="联系手机">13709146191</a-descriptions-item>
-            <a-descriptions-item label="联系电话">13709146191</a-descriptions-item>
-            <a-descriptions-item label="备注">备注备注备注备注备注</a-descriptions-item>
-            <a-descriptions-item label="销售单号">34242sdf234234</a-descriptions-item>
-            <a-descriptions-item label="制单人">王明</a-descriptions-item>
-            <a-descriptions-item label="业务员">李四</a-descriptions-item>
-            <a-descriptions-item label="审核状态">未审核</a-descriptions-item>
-            <a-descriptions-item label="完结状态">未完结</a-descriptions-item>
+          <a-descriptions size="small" :column="3" v-if="detailData">
+            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="客户地址">{{ detailData.shippingAddressProvinceName || '--' }}{{ detailData.shippingAddressCityName || '--' }}{{ detailData.shippingAddressCountyName || '--' }}{{ detailData.shippingAddress || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="支付方式">{{ detailData.payType || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收款方式">{{ detailData.settleStyleSn || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="联系电话">{{ detailData.consigneeTel || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="销售单号">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="制单人">{{ detailData.operatorName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务员">{{ detailData.salesManName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ detailData.auditStatus || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ detailData.financialStatus || '--' }}</a-descriptions-item>
           </a-descriptions>
         </a-collapse-panel>
       </a-collapse>
     </a-card>
     <a-card size="small" :bordered="false" class="pages-wrap">
       <!-- alert -->
-      <a-alert type="info" style="margin-bottom: 15px;">
+      <a-alert type="info" style="margin-bottom: 15px;" v-if="detailData">
         <div slot="message">
-          总款数:<strong>12</strong>;总数量:<strong>12</strong>;总赠品数量:<strong>12</strong>;急件总款数:<strong>12</strong>;急件总数量:<strong>12</strong>;<br/>
-          总售价:<strong>12</strong>;总成本:<strong>12</strong>;总毛利:<strong>12</strong>;折后总售价:<strong>12</strong>;折扣:<strong>12%</strong>;折扣金额:<strong>12</strong>;
+          总款数:<strong>{{ detailData.totalCategory || 0 }}</strong>;总数量:<strong>{{ detailData.totalQty || 0 }}</strong>;总赠品数量:<strong>{{ detailData.totalGiftNum || 0 }}</strong>;急件总款数:<strong>{{ detailData.urgentTotalCategory || 0 }}</strong>;急件总数量:<strong>{{ detailData.urgentTotalQty || 0 }}</strong>;<br/>
+          总售价:<strong>{{ detailData.totalAmount || 0 }}</strong>;总成本:<strong>{{ detailData.totalCost || 0 }}</strong>;总毛利:<strong>{{ detailData.grossProfit || 0 }}</strong>;折后总售价:<strong>{{ detailData.discountedAmount || 0 }}</strong>;折扣:<strong>{{ detailData.discountRate || 0 }}%</strong>;折扣金额:<strong>{{ detailData.discountAmount || 0 }}</strong>;
         </div>
       </a-alert>
       <!-- 列表 -->
@@ -57,23 +56,19 @@
         :data="loadData"
         :scroll="{ x: 1660 }"
         bordered>
-        <!-- 状态 -->
-        <template slot="state" slot-scope="text, record">
-          <a-tag :color="record.state==1?'green':'red'" >{{ record.state==1? '已出库': '未出库' }}</a-tag>
-        </template>
       </s-table>
     </a-card>
   </div>
 </template>
 
 <script>
+import { getOperationalPrecision } from '@/libs/tools.js'
 import { STable, VSelect } from '@/components'
+import { salesDetail } from '@/api/sales'
+import { salesDetailList } from '@/api/salesDetail'
 export default {
   name: 'SalesDetail',
-  components: {
-    STable,
-    VSelect
-  },
+  components: { STable, VSelect },
   data () {
     return {
       disabled: false,
@@ -90,58 +85,67 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'salerNo', width: 140, align: 'center' },
-        { title: '产品名称', dataIndex: 'storeNo', align: 'center' },
-        { title: '原厂编码', dataIndex: 'custName', width: 140, align: 'center' },
-        { title: '成本价', dataIndex: 'totalP', width: 100, align: 'center' },
-        { title: '售价', dataIndex: 'totalNums', width: 100, align: 'center' },
-        { title: '折后售价', dataIndex: 'totalPrice', width: 100, align: 'center' },
-        { title: '销售数量', dataIndex: 'payType', width: 100, align: 'center' },
-        { title: '单位', dataIndex: 'mementPay', width: 100, align: 'center' },
-        { title: '售价小计', dataIndex: 'isJj', width: 100, align: 'center' },
-        { title: '折后小计', dataIndex: 'status', width: 100, align: 'center' },
-        { title: '折扣金额', dataIndex: 'shDate', width: 100, align: 'center' },
-        { title: '仓库', dataIndex: 'statsus', width: 100, align: 'center' },
-        { title: '仓位', dataIndex: 'stadtus', width: 100, align: 'center' },
-        { title: '销售类型', dataIndex: 'stadatus', width: 100, align: 'center' }
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后售价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' },
+        { title: '折后小计', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center' },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center' },
+        { title: '销售类型', dataIndex: 'salesBillType', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 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', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ],
-            count: 10
-          }
+        return salesDetailList(Object.assign(parameter, { salesBillSn: this.$route.params.sn })).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
+            const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
+            const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
+            const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
+            const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
+            data.list[i].productCode = productCode || '--'
+            data.list[i].productName = productName || '--'
+            data.list[i].productOrigCode = productOrigCode || '--'
+            data.list[i].productOrigUnit = productOrigUnit || '--'
+            data.list[i].warehouseName = data.list[i].warehouseEntity && data.list[i].warehouseEntity.name || '--'
+            data.list[i].warehouseLocationName = data.list[i].warehouseLocationEntity && data.list[i].warehouseLocationEntity.name || '--'
+            // 售价小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].salePriceSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
-      }
+      },
+      detailData: null //  详情数据
     }
   },
   methods: {
     //  返回
     handleBack () {
       this.$router.push({ path: '/salesManagement/salesQuery/list' })
+    },
+    //  详情
+    getDetail () {
+      salesDetail({ id: this.$route.params.id }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+        } else {
+          this.detailData = null
+        }
+      })
     }
+  },
+  mounted () {
+    this.getDetail()
   }
 }
 </script>

+ 63 - 33
src/views/salesManagement/salesQuery/list.vue

@@ -6,16 +6,22 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="创建时间">
-              <a-range-picker v-model="queryParam.reatDate" id="salesManagementList-creatDate"/>
+              <a-range-picker
+                style="width:100%"
+                id="salesManagementList-creatDate"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-select
-                id="salesManagementList-customeName"
+                id="salesManagementList-buyerName"
                 placeholder="请选择客户"
                 allowClear
-                v-model="queryParam.dataSourceNo"
+                v-model="queryParam.buyerName"
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
@@ -25,13 +31,13 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="销售单号">
-              <a-input id="salesManagementList-salesNo" v-model.trim="queryParam.salesNo" allowClear placeholder="请输入销售单号"/>
+              <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
             </a-form-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-item label="采购单号">
-                <a-input id="salesManagementList-storeNo" v-model.trim="queryParam.storeNo" allowClear placeholder="请输入采购单号"/>
+                <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -48,22 +54,33 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="收款方式">
                 <v-select
-                  v-model="queryParam.paymentType"
-                  ref="paymentType"
-                  id="salesManagementList-paymentType"
+                  v-model="queryParam.settleStyle"
+                  ref="settleStyle"
+                  id="salesManagementList-settleStyle"
                   code="PAYMENT_TYPE"
                   placeholder="请选择收款方式"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="单据状态">
+              <a-form-item label="业务状态">
                 <v-select
-                  v-model="queryParam.billStatus"
-                  ref="billStatus"
-                  id="salesManagementList-billStatus"
+                  v-model="queryParam.auditStatus"
+                  ref="auditStatus"
+                  id="salesManagementList-auditStatus"
                   code="PAYMENT_TYPE"
-                  placeholder="请选择单据状态"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="财务状态">
+                <v-select
+                  v-model="queryParam.financialStatus"
+                  ref="financialStatus"
+                  id="salesManagementList-financialStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择财务状态"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
@@ -83,7 +100,7 @@
     </div>
     <!-- 操作按钮 -->
     <div class="table-operator">
-      <a-button type="primary" @click="handleNew">新增销售单</a-button>
+      <a-button type="primary" @click="handleAdd">新增销售单</a-button>
     </div>
     <!-- alert -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
@@ -121,8 +138,8 @@
       </template>
     </s-table>
     <!-- 选择客户弹框 -->
-    <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></chooseCustom>
-    </choose-custom-modal></a-card>
+    <choose-custom-modal :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></choose-custom-modal>
+  </a-card>
 </template>
 
 <script>
@@ -134,30 +151,38 @@ export default {
   components: { STable, VSelect, chooseCustomModal },
   data () {
     return {
-      mdl: {},
-      // 高级搜索 展开/关闭
-      advanced: false,
+      advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
       openModal: false, // 选择客户弹框是否显示
       customeList: [],
       // 查询参数
-      queryParam: {},
+      queryParam: {
+        buyerName: undefined, //  客户名称
+        salesBillNo: '', //  销售单号
+        purchaseBillNo: '', //  采购单号
+        payType: undefined, //  支付方式
+        settleStyle: undefined, //  收款方式
+        auditStatus: undefined, //  业务状态
+        financialStatus: undefined //  财务状态
+      },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
         { title: '销售单号', dataIndex: 'salesBillNo', width: 140, align: 'center' },
-        { title: '采购单号', dataIndex: 'storeNo', width: 140, align: 'center' },
+        { title: '采购单号', dataIndex: 'purchaseBillNo', width: 140, align: 'center' },
         { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '总款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '支付方式', dataIndex: 'payType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款方式', dataIndex: 'settleStyleSn', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款方式', dataIndex: 'settleStyle', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '急件', dataIndex: 'urgentFlag', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', scopedSlots: { customRender: 'auditStatus' }, width: 110, align: 'center' },
-        { title: '财务状态', dataIndex: 'financialStatus', width: 110, align: 'center' },
+        { title: '财务状态', scopedSlots: { customRender: 'financialStatus' }, width: 110, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 260, align: 'center', fixed: 'right' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -175,10 +200,13 @@ export default {
       }
     }
   },
-  created () {
-  },
   methods: {
-    handleNew () {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 新增
+    handleAdd () {
       this.openModal = true
     },
     // 选择客户成功
@@ -229,7 +257,7 @@ export default {
     },
     // 详情
     handleDetail (row) {
-      this.$router.push({ path: `/salesManagement/salesQuery/detail/${row.id}` })
+      this.$router.push({ path: `/salesManagement/salesQuery/detail/${row.id}/${row.salesBillSn}` })
     },
     // 编辑
     handleEdit (row) {
@@ -253,12 +281,14 @@ export default {
       })
     },
     resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
+      this.queryParam.buyerName = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.purchaseBillNo = ''
+      this.queryParam.payType = undefined
+      this.queryParam.settleStyle = undefined
+      this.queryParam.auditStatus = undefined
+      this.queryParam.financialStatus = undefined
+      this.time = []
       this.$refs.table.refresh(true)
     },
     filterOption (input, option) {

+ 0 - 10
src/views/salesManagement/salesQuery/queryPart.vue

@@ -222,13 +222,3 @@ export default {
   }
 }
 </script>
-
-<style lang="less">
-  .productInfoList-wrap{
-    .sTable{
-      table{
-        width: auto;
-      }
-    }
-  }
-</style>

+ 84 - 162
src/views/salesManagement/salesReturn/detail.vue

@@ -1,77 +1,39 @@
 <template>
-  <div>
-    <a-affix>
-      <a-page-header
-        :ghost="false"
-        @back="() => $router.go(-1)"
-      >
-        <template slot="subTitle">
-          <a href="javascript:;" @click="() => $router.go(-1)">返回列表</a>
-          <a-button size="small" style="margin-left:50px" key="0">
-            编辑
-          </a-button>
-          <a-button size="small" type="danger" style="margin-left:20px" key="1">
-            销售导出
-          </a-button>
-        </template>
-        <template slot="extra">
-          <a-button key="4">
-            打印预览
-          </a-button>
-          <a-button key="5" type="primary">
-            快速打印
-          </a-button>
-        </template>
-        <a-descriptions size="small" :column="4">
-          <a-descriptions-item label="客户名称">
-            张三的
-          </a-descriptions-item>
-          <a-descriptions-item label="客户地址">
-            山西省太原市阿斯加德法律静安寺水电费
-          </a-descriptions-item>
-          <a-descriptions-item label="支付方式">
-            货到付款
-          </a-descriptions-item>
-          <a-descriptions-item label="收款方式">
-            现金
-          </a-descriptions-item>
-          <a-descriptions-item label="联系手机">
-            13709146191
-          </a-descriptions-item>
-          <a-descriptions-item label="联系电话">
-            13709146191
-          </a-descriptions-item>
-          <a-descriptions-item label="备注">
-            备注备注备注备注备注
-          </a-descriptions-item>
-          <a-descriptions-item label="退货单号">
-            34242sdf234234
-          </a-descriptions-item>
-          <a-descriptions-item label="审核状态">
-            未审核
-          </a-descriptions-item>
-          <a-descriptions-item label="完结状态">
-            未完结
-          </a-descriptions-item>
-        </a-descriptions>
-      </a-page-header>
-    </a-affix>
-
+  <div class="salesReturnDetail-wrap">
+    <a-page-header :ghost="false" @back="handleBack" class="salesReturnDetail-cont">
+      <template slot="subTitle">
+        <a href="javascript:;" @click="handleBack">返回列表</a>
+      </template>
+      <template slot="extra">
+        <a-button key="3" id="salesReturnDetail-preview-btn">打印预览</a-button>
+        <a-button key="4" type="primary" id="salesReturnDetail-print-btn">快速打印</a-button>
+        <a-button key="5" id="salesReturnDetail-export-btn">导出</a-button>
+      </template>
+    </a-page-header>
+    <!-- 基础信息 -->
+    <a-card size="small" :bordered="false" class="salesReturnDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions size="small" :column="3" v-if="detailData">
+            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="客户地址">{{ detailData.shippingAddressProvinceName || '--' }}{{ detailData.shippingAddressCityName || '--' }}{{ detailData.shippingAddressCountyName || '--' }}{{ detailData.shippingAddress || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="支付方式">{{ detailData.payType || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收款方式">{{ detailData.settleStyleSn || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="联系电话">{{ detailData.consigneeTel || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="退货单号">{{ detailData.salesBillNo || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="业务状态">{{ detailData.auditStatus || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="财务状态">{{ detailData.financialStatus || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
     <a-card size="small" :bordered="false" class="pages-wrap">
       <!-- alert -->
-      <a-alert type="info">
+      <a-alert type="info" style="margin-bottom: 15px;" v-if="detailData">
         <div slot="message">
-          <div>
-            <span>总款数:1;</span>
-            <span>总数量:6;</span>
-            <span>废品数量:3;</span>
-          </div>
-          <div>
-            <span>退货总金额:11;</span>
-            <span>折扣金额:8;</span>
-            <span>折扣:0.00%;</span>
-            <span>折后金额:0.00;</span>
-          </div>
+          总款数:<strong>{{ detailData.totalCategory || 0 }}</strong>;总数量:<strong>{{ detailData.totalQty || 0 }}</strong>;废品数量:<strong>{{ detailData.totalGiftNum || 0 }}</strong>;<br/>
+          退货总金额:<strong>{{ detailData.totalAmount || 0 }}</strong>;折扣金额:<strong>{{ detailData.totalCost || 0 }}</strong>;折扣:<strong>{{ detailData.discountRate || 0 }}%</strong>;折后金额:<strong>{{ detailData.discountAmount || 0 }}</strong>;
         </div>
       </a-alert>
       <!-- 列表 -->
@@ -82,7 +44,7 @@
         :rowKey="(record) => record.id"
         :columns="columns"
         :data="loadData"
-        :scroll="{ x: 1500, y: 300 }"
+        :scroll="{ x: 1500 }"
         bordered>
       </s-table>
     </a-card>
@@ -90,120 +52,80 @@
 </template>
 
 <script>
+import { getOperationalPrecision } from '@/libs/tools.js'
 import { STable, VSelect } from '@/components'
+import { salesReturnDetail } from '@/api/salesReturn'
+import { salesReturnDetailList } from '@/api/salesReturnDetail'
 export default {
-  name: 'SalesDetail',
-  components: {
-    STable,
-    VSelect
-  },
+  name: 'SalesReturnDetail',
+  components: { STable, VSelect },
   data () {
     return {
       disabled: false,
       // 表头
       columns: [
-        {
-          title: '序号',
-          dataIndex: 'no',
-          align: 'center',
-          width: 100
-        },
-        {
-          title: '产品编码',
-          dataIndex: 'salerNo',
-          align: 'center'
-        },
-        {
-          title: '产品名称',
-          dataIndex: 'storeNo',
-          align: 'center'
-        },
-        {
-          title: '原厂编码',
-          dataIndex: 'custName',
-          align: 'center'
-        },
-        {
-          title: '售价',
-          dataIndex: 'totalNums',
-          align: 'center'
-        },
-        {
-          title: '折后售价',
-          dataIndex: 'totalPrice',
-          align: 'center'
-        },
-        {
-          title: '退货数量',
-          dataIndex: 'payType',
-          align: 'center'
-        },
-        {
-          title: '废品数量',
-          dataIndex: 'shDate',
-          align: 'center'
-        },
-        {
-          title: '入库数量',
-          dataIndex: 'status',
-          align: 'center'
-        },
-        {
-          title: '退货金额小计',
-          dataIndex: 'isJj',
-          align: 'center'
-        },
-        {
-          title: '折扣金额',
-          dataIndex: 'status',
-          align: 'center'
-        },
-        {
-          title: '折后退货金额小计',
-          dataIndex: 'status',
-          align: 'center'
-        }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后售价', dataIndex: 'discountedPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '废品数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退货金额小计', dataIndex: 'saleReturnSubtotal', width: 100, align: 'center' },
+        { title: '折扣金额', dataIndex: 'discountAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '折后退货金额小计', dataIndex: 'discountedAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       // 加载数据方法 必须为 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', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ],
-            count: 10
-          }
+        return salesReturnDetailList(Object.assign(parameter, { salesReturnSn: this.$route.params.sn })).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
+            const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
+            const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
+            const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
+            data.list[i].productCode = productCode || '--'
+            data.list[i].productName = productName || '--'
+            data.list[i].productOrigCode = productOrigCode || '--'
+            // 折后退货金额小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].saleReturnSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
           }
-          _this.disabled = false
-          resolve(data)
+          this.disabled = false
+          return data
         })
       }
     }
+  },
+  methods: {
+    //  返回
+    handleBack () {
+      this.$router.push({ path: '/salesManagement/salesReturn/list' })
+    },
+    //  详情
+    getDetail () {
+      salesReturnDetail({ id: this.$route.params.id }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+        } else {
+          this.detailData = null
+        }
+      })
+    }
+  },
+  mounted () {
+    this.getDetail()
   }
 }
 </script>
 
 <style lang="less">
-  .pages-wrap{
-    margin-top: 15px;
-    .sTable{
-      margin-top: 15px;
+  .salesReturnDetail-wrap{
+    .salesReturnDetail-cont{
+      margin-bottom: 15px;
     }
   }
 </style>

+ 107 - 135
src/views/salesManagement/salesReturn/list.vue

@@ -5,21 +5,33 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="创建时间">
-              <a-range-picker v-model="queryParam.creatDate" id="salesReturn-creatDate"/>
+              <a-range-picker
+                style="width:100%"
+                id="salesReturn-creatDate"
+                :disabledDate="disabledDate"
+                v-model="time"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="审核时间">
-              <a-range-picker v-model="queryParam.shDate" id="salesReturn-shDate"/>
+              <a-range-picker
+                style="width:100%"
+                id="salesReturn-examineTime"
+                :disabledDate="disabledDate"
+                v-model="examineTime"
+                :format="dateFormat"
+                :placeholder="['开始时间', '结束时间']" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
               <a-select
-                id="salesReturn-customeName"
+                id="salesReturn-dealerName"
                 placeholder="请选择客户"
                 allowClear
-                v-model="queryParam.dataSourceNo"
+                v-model="queryParam.dealerName"
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
@@ -30,7 +42,7 @@
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
               <a-form-item label="退货单号">
-                <a-input id="salesReturn-salesNo" v-model.trim="queryParam.salesNo" allowClear placeholder="请输入销售单号"/>
+                <a-input id="salesReturn-salesReturnNo" v-model.trim="queryParam.salesReturnNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -49,7 +61,7 @@
             <span class="table-page-search-submitButtons">
               <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
               <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
-              <a @click="toggleAdvanced" style="margin-left: 8px">
+              <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -60,16 +72,11 @@
     </div>
     <!-- 操作按钮 -->
     <div class="table-operator">
-      <a-button type="primary" @click="handleNew()">新建退货单</a-button>
+      <a-button type="primary" @click="handleAdd">新增退货单</a-button>
     </div>
     <!-- alert -->
-    <a-alert type="warning">
-      <div slot="message">
-        <span>退货总金额:14.00 元;</span>
-        <span>总单数:6;</span>
-        <span>总款数:3;</span>
-        <span>总数量:7;</span>
-      </div>
+    <a-alert type="info" style="margin-bottom: 15px;">
+      <div slot="message">退货总金额:<strong>14.00</strong>元;总单数:<strong>6</strong>;总款数:<strong>6</strong>;总数量:<strong>6</strong>;</div>
     </a-alert>
     <!-- 列表 -->
     <s-table
@@ -79,35 +86,22 @@
       :rowKey="(record) => record.id"
       :columns="columns"
       :data="loadData"
-      :scroll="{ x: 1500, y: 300 }"
+      :scroll="{ x: 1480 }"
       bordered>
       <!-- 状态 -->
       <template slot="state" slot-scope="text, record">
-        <span>{{ record.state == 1 ? '已启用' : '已禁用' }}</span>
+        <a-tag :color="record.state=='FINISH'?'green':'red'" >{{ record.state=='FINISH'? '已启用': '已禁用' }}</a-tag>
       </template>
       <!-- 操作 -->
-      <span slot="action" slot-scope="text, record">
-        <template>
-          <a href="javascript:;" id="salesReturn-auth-btn">审核</a>
-          <a-divider type="vertical" />
-        </template>
-        <a-dropdown>
-          <a class="ant-dropdown-link">
-            更多 <a-icon type="down" />
-          </a>
-          <a-menu slot="overlay">
-            <a-menu-item >
-              <a id="salesReturn-view-btn" href="javascript:;" @click="handleView(record)">明细</a>
-            </a-menu-item>
-            <a-menu-item>
-              <a id="salesReturn-edit-btn" href="javascript:;" @click="handleEdit(record)">修改</a>
-            </a-menu-item>
-            <a-menu-item>
-              <a id="salesReturn-del-btn" href="javascript:;" @click="handleDel(record)">删除</a>
-            </a-menu-item>
-          </a-menu>
-        </a-dropdown>
-      </span>
+      <template slot="action" slot-scope="text, record">
+        <a-button size="small" type="link" @click="handleEexamine(record)" id="salesReturn-eexamine-btn">审核</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDetail(record)" id="salesReturn-detail-btn">详情</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleEdit(record)" id="salesReturn-edit-btn">编辑</a-button>
+        <a-divider type="vertical" style="margin: 0;" />
+        <a-button size="small" type="link" @click="handleDel(record)" id="salesReturn-del-btn">删除</a-button>
+      </template>
     </s-table>
     <!-- 选择客户弹框 -->
     <chooseCustom :show="openModal" @ok="chooseCustomOk" @cancel="openModal=false"></chooseCustom>
@@ -117,7 +111,7 @@
 <script>
 import { STable, VSelect } from '@/components'
 import chooseCustom from './chooseCustom.vue'
-// import { getRoleList, getServiceList } from '@/api/manage'
+import { salesReturnList } from '@/api/salesReturn'
 export default {
   name: 'TableList',
   components: {
@@ -127,121 +121,106 @@ export default {
   },
   data () {
     return {
-      mdl: {},
       // 高级搜索 展开/关闭
       advanced: false,
       disabled: false, //  查询、重置按钮是否可操作
+      dateFormat: 'YYYY-MM-DD',
+      time: [], //  创建时间
+      examineTime: [], //  审核时间
       openModal: false, // 选择客户弹框是否显示
       customeList: [],
       // 查询参数
-      queryParam: {},
+      queryParam: {
+        dealerName: undefined, //  客户名称
+        salesReturnNo: undefined //  销售退货单号
+      },
       // 表头
       columns: [
-        {
-          title: '创建时间',
-          dataIndex: 'creatDate',
-          align: 'center'
-        },
-        {
-          title: '销售退货单号',
-          dataIndex: 'salerNo',
-          align: 'center'
-        },
-        {
-          title: '客户名称',
-          dataIndex: 'custName',
-          align: 'center'
-        },
-        {
-          title: '总款数',
-          dataIndex: 'totalP',
-          align: 'center'
-        },
-        {
-          title: '总数量',
-          dataIndex: 'totalNums',
-          align: 'center'
-        },
-        {
-          title: '退款总金额',
-          dataIndex: 'totalPrice',
-          align: 'center'
-        },
-        {
-          title: '是否抓单',
-          dataIndex: 'mementPay',
-          align: 'center'
-        },
-        {
-          title: '审核时间',
-          dataIndex: 'shDate',
-          align: 'center'
-        },
-        {
-          title: '状态',
-          dataIndex: 'status',
-          align: 'center'
-        },
-        {
-          title: '操作',
-          width: '200px',
-          key: 'operation',
-          fixed: 'right',
-          align: 'center',
-          scopedSlots: { customRender: 'action' }
-        }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center' },
+        { title: '销售退货单号', dataIndex: 'salesReturnNo', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总款数', dataIndex: 'totalCategory', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总数量', dataIndex: 'totalQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '退款总金额', dataIndex: 'totalAmount', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '是否抓单', dataIndex: 'grabFlag', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditTime', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', scopedSlots: { customRender: 'state' }, width: 110, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 220, 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', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ],
-            count: 10
-          }
+        return salesReturnList(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
-          resolve(data)
+          this.disabled = false
+          return data
         })
       }
     }
   },
-  created () {
-  },
   methods: {
-    handleNew () {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    handleAdd () {
       this.openModal = true
     },
     // 选择客户成功
     chooseCustomOk (data) {
       this.$router.push({ name: 'salesReturnNew' })
     },
-    handleEdit (record) {
-      this.$router.push({ name: 'salesReturnEdit', params: { id: record.id } })
+    // 详情
+    handleDetail (row) {
+      this.$router.push({ path: `/salesManagement/salesReturn/detail/${row.id}/${row.salesReturnSn}` })
     },
-    handleView (record) {
-      this.$router.push({ name: 'salesReturnDetail', params: { id: record.id } })
+    // 编辑
+    handleEdit (row) {
+      this.$router.push({ path: `/salesManagement/salesReturn/edit/${row.id}` })
     },
-    handleDel () {},
-    toggleAdvanced () {
-      this.advanced = !this.advanced
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?',
+        centered: true,
+        onOk () {
+          // salesDel({ id: row.id }).then(res => {
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  审核
+    handleEexamine (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要审核吗?',
+        okText: '审核通过',
+        cancelText: '审核不通过',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
     },
     resetSearchForm () {
       this.queryParam.orderBundleNo = ''
@@ -253,17 +232,10 @@ export default {
       this.$refs.table.refresh(true)
     },
     filterOption (input, option) {
-    	return (
-    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    	)
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     }
   }
 }
 </script>
-<style lang="less">
-  .salesReturn-wrap{
-    .sTable{
-      margin-top: 15px;
-    }
-  }
-</style>

+ 0 - 10
src/views/salesManagement/salesReturn/queryPart.vue

@@ -219,13 +219,3 @@ export default {
   }
 }
 </script>
-
-<style lang="less">
-  .productInfoList-wrap{
-    .sTable{
-      table{
-        width: auto;
-      }
-    }
-  }
-</style>

+ 86 - 54
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -8,41 +8,45 @@
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
-        <a-button key="3" type="danger" @click="handleSubmit" id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
+        <a-button key="3" type="danger" v-if="!isWriteDown" @click="handleSubmit" id="urgentItemsOffsetDetail-btn-submit">冲减</a-button>
         <a-button key="2" @click="handlePreview" id="urgentItemsOffsetDetail-btn-preview">打印预览</a-button>
         <a-button key="1" type="primary" @click="handlePrint" id="urgentItemsOffsetDetail-btn-print">快速打印</a-button>
       </template>
     </a-page-header>
     <!-- 急件单信息 -->
     <a-card size="small" :bordered="false" class="urgentItemsOffsetDetail-info-wrapper">
-      <a-descriptions :column="3">
-        <a-descriptions-item label="客户名称">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="客户地址">陕西省西安市未央区凤城八路</a-descriptions-item>
-        <a-descriptions-item label="支付方式">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="联系手机">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="联系电话">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="收款方式">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="急件单号">名称思密达</a-descriptions-item>
-        <a-descriptions-item label="完结状态">名称思密达</a-descriptions-item>
-      </a-descriptions>
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3" v-if="detailData">
+            <a-descriptions-item label="客户名称">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="客户地址">{{ detailData.shippingAddressProvinceName || '--' }}{{ detailData.shippingAddressCityName || '--' }}{{ detailData.shippingAddressCountyName || '--' }}{{ detailData.shippingAddress || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="支付方式">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="联系电话">{{ detailData.consigneeTel || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="收款方式">{{ detailData.buyerName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="急件单号">{{ detailData.urgentBillNo || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="状态">{{ detailData.statusDictValue || '--' }}</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
     </a-card>
-    <!-- 合计 -->
-    <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div class="ftext" slot="message">总款数:<strong>998</strong>;总数量:<strong>2009</strong>。</div>
-    </a-alert>
     <!-- 表格 -->
     <a-card size="small" :bordered="false" class="urgentItemsOffsetDetail-table-wrapper">
+      <!-- 合计 -->
+      <a-alert type="info" showIcon style="margin-bottom:15px" v-if="detailData">
+        <div class="ftext" slot="message">总款数:<strong>{{ detailData.totalCategory || 0 }}</strong>;总数量:<strong>{{ detailData.totalQty || 0 }}</strong>。</div>
+      </a-alert>
       <s-table
         class="sTable"
         ref="table"
         size="default"
         :rowKey="(record) => record.id"
-        :columns="unColumns"
+        :columns="isWriteDown ? columns : unColumns"
         :data="loadData"
+        :scroll="{ x: isWriteDown ? 1330 : '100%' }"
         bordered>
         <!-- 库存数量 -->
         <template slot="inventoryQuantity" slot-scope="text, record">
-          <span :class="[record.inventoryQuantity < record.quantityNotOffset ? 'red' : '']">{{ record.inventoryQuantity }}</span>
+          <span :class="[record.stockEntity.currentStockQty < record.qty ? 'red' : '']" :style="{fontWeight: record.stockEntity.currentStockQty < record.qty?'bold':''}">{{ record.stockEntity.currentStockQty }}</span>
         </template>
       </s-table>
     </a-card>
@@ -51,6 +55,8 @@
 </template>
 
 <script>
+import { getOperationalPrecision } from '@/libs/tools.js'
+import { urgentDetail } from '@/api/urgent'
 import { urgentDetailList } from '@/api/urgentDetail'
 import { STable, VSelect } from '@/components'
 export default {
@@ -58,40 +64,58 @@ export default {
   data () {
     return {
       unColumns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productOldNum', width: 160, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productBrand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '库存数量', scopedSlots: { customRender: 'inventoryQuantity' }, width: 200, align: 'center' },
-        { title: '未冲减数量', dataIndex: 'quantityNotOffset', width: 180, align: 'center', ellipsis: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'inventoryMoneys', width: 180, align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 160, align: 'center' },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 200, align: 'center' },
+        { title: '库存数量', scopedSlots: { customRender: 'inventoryQuantity' }, width: 100, align: 'center' },
+        { title: '未冲减数量', dataIndex: 'qty', width: 110, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center' }
       ],
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'productName', width: 200, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productOldNum', width: 160, align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productBrand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入库时间', dataIndex: 'product2Brand', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓库', dataIndex: 'productBrawnd', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '仓位', dataIndex: 'productBradnd', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'productsBrand', width: 200, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '已冲减数量', dataIndex: 'inventoryNum', width: 180, align: 'center', ellipsis: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'inventoryMoneys', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本小计', dataIndex: 'inventoryMoneyss', width: 180, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
+        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center', ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true },
+        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center' },
+        { title: '入库时间', dataIndex: 'stockInDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '成本价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已冲减数量', dataIndex: 'qty', width: 110, align: 'center', ellipsis: true, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center' },
+        { title: '成本小计', dataIndex: 'costSubtotal', width: 100, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return urgentDetailList(Object.assign(parameter, this.queryParam)).then(res => {
+        return urgentDetailList(Object.assign(parameter, { urgentBillSn: this.$route.params.sn })).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
+            const productCode = (data.list[i].productEntity && data.list[i].productEntity.code) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.code)
+            const productName = (data.list[i].productEntity && data.list[i].productEntity.name) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.name)
+            const productOrigCode = (data.list[i].productEntity && data.list[i].productEntity.origCode) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.origCode)
+            const productOrigUnit = (data.list[i].productEntity && data.list[i].productEntity.unit) || (data.list[i].dealerProductEntity && data.list[i].dealerProductEntity.unit)
+            data.list[i].productCode = productCode || '--'
+            data.list[i].productName = productName || '--'
+            data.list[i].productOrigCode = productOrigCode || '--'
+            data.list[i].productOrigUnit = productOrigUnit || '--'
+            data.list[i].warehouseName = data.list[i].warehouseEntity && data.list[i].warehouseEntity.name || '--'
+            data.list[i].warehouseLocationName = data.list[i].warehouseLocationEntity && data.list[i].warehouseLocationEntity.name || '--'
+            // 成本小计  由于数据库内小数位数为4位,页面则需显示2位。因此会做小数运算精度处理
+            data.list[i].costSubtotal = getOperationalPrecision(data.list[i].price, data.list[i].qty)
           }
           this.disabled = false
           return data
         })
-      }
+      },
+      detailData: null //  详情数据
+    }
+  },
+  computed: {
+    isWriteDown () {
+      return this.detailData && this.detailData.status == 'FINISH'
     }
   },
   methods: {
@@ -99,6 +123,16 @@ export default {
     handleBack () {
       this.$router.push({ path: '/salesManagement/urgentItemsOffset/list' })
     },
+    //  详情
+    getDetail () {
+      urgentDetail({ id: this.$route.params.id }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+        } else {
+          this.detailData = null
+        }
+      })
+    },
     //  冲减
     handleSubmit () {
       const _this = this
@@ -107,7 +141,7 @@ export default {
         content: '确定要进行冲减吗?',
         okText: '确定',
         cancelText: '取消',
-		  centered: true,
+        centered: true,
         onOk () {
           // delectRolePower({
           //   id: row.id
@@ -129,6 +163,9 @@ export default {
     handlePreview () {
 
     }
+  },
+  mounted () {
+    this.getDetail()
   }
 }
 </script>
@@ -138,26 +175,21 @@ export default {
     .urgentItemsOffsetDetail-info-wrapper{
       margin: 15px 0;
       .item-cont {
-      	margin-bottom: 15px;
-      	display: flex;
-      	.item-label {
-      		width: 115px;
-      		font-size: 14px;
-      		color: rgba(0, 0, 0, 0.85);
-      		flex-shrink: 0;
-      	}
-      	.item-main {
-      		flex-grow: 1;
+        margin-bottom: 15px;
+        display: flex;
+        .item-label {
+          width: 115px;
+          font-size: 14px;
+          color: rgba(0, 0, 0, 0.85);
+          flex-shrink: 0;
+        }
+        .item-main {
+          flex-grow: 1;
           word-break: break-all;
-      	}
+        }
       }
     }
     .urgentItemsOffsetDetail-table-wrapper{
-      .sTable{
-        table{
-          width: auto;
-        }
-      }
       .red{
         color: #ed1c24;
       }

+ 40 - 19
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -5,7 +5,7 @@
       <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-item label="审核时间">
+            <a-form-item label="创建时间">
               <a-range-picker
                 style="width:100%"
                 id="urgentItemsOffsetList-creatTime"
@@ -19,10 +19,10 @@
           <a-col :md="6" :sm="24">
             <a-form-item label="客户名称">
               <a-select
-                id="urgentItemsOffsetList-bundleName"
+                id="urgentItemsOffsetList-buyerName"
                 placeholder="请选择"
                 allowClear
-                v-model="queryParam.dataSourceNo"
+                v-model="queryParam.buyerName"
                 :showSearch="true"
                 option-filter-prop="children"
                 :filter-option="filterOption">
@@ -32,13 +32,24 @@
           </a-col>
           <a-col :md="6" :sm="24">
             <a-form-item label="销售单号">
-              <a-input id="urgentItemsOffsetList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入销售单号"/>
+              <a-input id="urgentItemsOffsetList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
             </a-form-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-item label="采购单号">
-                <a-input id="urgentItemsOffsetList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入采购单号"/>
+              <a-form-item label="急件单号">
+                <a-input id="urgentItemsOffsetList-urgentBillNo" v-model.trim="queryParam.urgentBillNo" allowClear placeholder="请输入急件单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select
+                  v-model="queryParam.status"
+                  ref="status"
+                  id="chainTransferInList-status"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择状态"
+                  allowClear></v-select>
               </a-form-item>
             </a-col>
           </template>
@@ -65,7 +76,7 @@
       bordered>
       <!-- 状态 -->
       <template slot="status" slot-scope="text, record">
-        <a-tag :color="record.status==1?'green':'red'" >{{ record.status==1? '已冲减': '待冲减' }}</a-tag>
+        <a-tag :color="record.status=='FINISH'?'green':record.status=='WAIT'?'red':''">{{ record.statusDictValue }}</a-tag>
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
@@ -76,6 +87,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { urgentList } from '@/api/urgent'
 import { STable, VSelect } from '@/components'
 export default {
@@ -84,8 +96,10 @@ export default {
     return {
       advanced: false, // 高级搜索 展开/关闭
       queryParam: { //  查询条件
-        bundleName: '', //  供应商名称
-        state: undefined //  状态
+        buyerName: undefined, //  客户名称
+        salesBillNo: '', //  销售单号
+        urgentBillNo: '', //  急件单号
+        status: undefined //  状态
       },
       disabled: false, //  查询、重置按钮是否可操作
       dateFormat: 'YYYY-MM-DD',
@@ -106,6 +120,14 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
+        // 创建时间
+        if (this.time && this.time.length > 0) {
+          this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
+          this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
+        } else {
+          this.queryParam.beginDate = undefined
+          this.queryParam.endDate = undefined
+        }
         return urgentList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
@@ -124,23 +146,22 @@ export default {
       return date && date.valueOf() > Date.now()
     },
     filterOption (input, option) {
-    	return (
-    		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    	)
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
+      this.queryParam.buyerName = undefined
+      this.queryParam.salesBillNo = ''
+      this.queryParam.urgentBillNo = ''
+      this.queryParam.status = undefined
+      this.time = []
       this.$refs.table.refresh(true)
     },
     //  详情
     handleDetail (row) {
-      this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.id}` })
+      this.$router.push({ path: `/salesManagement/urgentItemsOffset/detail/${row.id}/${row.urgentBillSn}` })
     }
   }
 }