瀏覽代碼

Merge branch 'deploy_0804' of jianguan-web/qpls-md-html into master

李磊 3 年之前
父節點
當前提交
b87ee26061

+ 10 - 7
src/components/MultiTab/MultiTab.vue

@@ -143,14 +143,8 @@ export default {
   },
   watch: {
     '$route': function (newVal, oldVal) {
-      // 父页面(列表)进入子页面(编辑、详情)再返回至父页面时关闭子页面页签   子页面点击“返回列表”
-      if (oldVal && oldVal.name && newVal.query.closeLastOldTab) {
-        if (oldVal.name.indexOf('List') == -1) { // 要关闭的页面不能是列表页
-          this.remove(oldVal.name) // 关闭子页面
-        }
-      }
-      this.activeKey = newVal.name
       const index = this.tabsList.indexOf(newVal.name)
+      if (newVal.name == oldVal.name) { return }
       // 解决页面地址相同参数不同时打开多个页签问题(例 详情页id或sn不同时)
       if (index < 0) { // 不存在
         this.tabsList.push(newVal.name)
@@ -160,8 +154,17 @@ export default {
         this.pages.splice(index, 1, newVal)
         this.$store.state.app.isNewTab = false
       }
+      // 父页面(列表)进入子页面(编辑、详情)再返回至父页面时关闭子页面页签   子页面点击“返回列表”
+      if (oldVal && oldVal.name && newVal.query.closeLastOldTab) {
+        if (oldVal.name.indexOf('List') == -1) { // 要关闭的页面不能是列表页
+          this.remove(oldVal.name) // 关闭子页面
+          this.$store.state.app.isNewTab = !(oldVal.meta.title.indexOf('详情') >= 0)
+        }
+      }
+      this.activeKey = newVal.name
     },
     activeKey: function (newPathKey) {
+      console.log(newPathKey, 'newVal')
       const row = this.pages.find(item => item.name == newPathKey)
       if (row.fullPath.indexOf('/list') == -1) {
         this.$router.push({ path: row.fullPath })

+ 1 - 0
src/components/Table/index.js

@@ -123,6 +123,7 @@ export default {
     this.localPagination = ['auto', true].includes(this.showPagination) && Object.assign({}, this.localPagination, {
       current: localPageNum,
       pageSize: this.pageSize,
+      pageSizeOptions:['5','10', '20', '30', '40'],
       showTotal: total => `共 ${total} 条记录`,
       showSizeChanger: this.showSizeChanger
     }) || false

+ 10 - 4
src/components/custom.less

@@ -6,7 +6,7 @@ body{
     font-size: 12px!important;
   }
   .ant-form-item-label > label{
-    color: #333!important;
+    color: #000!important;
   }
 }
 // 查询条件样式
@@ -139,7 +139,7 @@ body{
       .ant-table-header tr th, .ant-table-thead tr th{
         background: #fafafa!important;
         font-weight: bold;
-        color: #333!important;
+        color: #000!important;
         padding: 5px 5px 2px!important;
       }
     }
@@ -147,14 +147,20 @@ body{
   .ant-table-row{
     .ant-table-row-cell-break-word, td{
       padding: 2px 4px!important;
-      color: #333!important;
+      color: #000!important;
     }
   }
   .ant-pagination.ant-table-pagination{
     margin: 10px 0 0;
   }
-  .ant-table-small > .ant-table-content > .ant-table-body{
+  .ant-table-small > .ant-table-content .ant-table-body{
     margin: 0;
+    tr:hover{
+      td{
+        background: #ffb60a;
+        color: #fff;
+      }
+    }
   }
 }
 .sTable.fixPagination{

+ 12 - 2
src/components/global.less

@@ -674,6 +674,16 @@ body {
 }
 
 // btn-link
+.ant-btn-link.button-default {
+  color: #1b1b1b;
+  &:hover, &:focus {
+    color: #66696d;
+  }
+ 
+  &:active, &.active {
+    color: #8e8f91;
+  }
+}
 .ant-btn-link.button-primary {
   color: #39f;
   &:hover, &:focus {
@@ -708,9 +718,9 @@ body {
 }
  
 .ant-btn-link.button-warning {
-  color: #e89105;
+  color: #aa6a02;
   &:hover, &:focus {
-    color: #ffb60a;
+    color: #c68d07;
   }
  
   &:active, &.active {

+ 2 - 9
src/libs/JGPrint.js

@@ -23,16 +23,9 @@ export const JGPrint = function (data, type, printerType) {
       })
       return
     }
-    const rx = /<body[^>]*>([\s\S]+?)<\/body>/i///
-    let m = rx.exec(data)
-    if (m) m = m[1]
     LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
-    LODOP.SET_PRINT_PAGESIZE(3, '2100', '60', '') // 这里3表示纵向打印且纸高“按内容的高度”;2140表示纸宽214.0mm;60表示页底空白6.0mm
-    LODOP.ADD_PRINT_HTM('0', '0', 'RightMargin:0.1cm', 'BottomMargin:0.1cm', m)
-    // LODOP.ADD_PRINT_TABLE(0, 0, '100%', '100%', m)
-    // LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data)
-    // LODOP.SET_PRINT_STYLEA(0, 'PDFScalMode', 1)
-    // LODOP.SET_PRINT_PAGESIZE(3, 0, 0, '')
+    LODOP.ADD_PRINT_HTM('0', '0', 'RightMargin:0.1cm', 'BottomMargin:0.1cm', data)
+    LODOP.SET_PRINT_PAGESIZE(3, 2140, '60', '') // 这里3表示纵向打印且纸高“按内容的高度”;2140表示纸宽214.0mm;60表示页底空白6.0mm
     if (type == 'preview') {
       LODOP.PREVIEW()
     }

+ 1 - 0
src/views/common/custList.vue

@@ -8,6 +8,7 @@
     style="width: 100%"
     :filter-option="false"
     :not-found-content="fetching ? undefined : null"
+    :dropdownMatchSelectWidth="false"
     @search="fetchUser"
     @change="handleChange"
     allowClear

+ 13 - 13
src/views/productManagement/productInfoJg/list.vue

@@ -34,7 +34,7 @@
                 </a-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <!-- <a-col :md="6" :sm="24">
               <a-form-item label="产品分类">
                 <a-cascader
                   @change="changeProductType"
@@ -47,12 +47,12 @@
                   placeholder="请选择产品分类"
                   allowClear />
               </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
+            </a-col> -->
+            <!-- <a-col :md="6" :sm="24">
               <a-form-item label="状态">
                 <v-select code="ONLINE_FLAG" id="productInfoList-onlineFalg" v-model="queryParam.onlineFalg" allowClear placeholder="请选择状态"></v-select>
               </a-form-item>
-            </a-col>
+            </a-col> -->
           </template>
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
@@ -131,7 +131,7 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        onlineFalg: undefined //  状态
+        onlineFalg: '1'
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
@@ -183,7 +183,7 @@ export default {
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''
       this.queryParam.productTypeSn3 = ''
-      this.queryParam.onlineFalg = undefined
+      this.queryParam.onlineFalg = '1'
       this.productType = []
       this.$refs.table.refresh(true)
     },
@@ -191,18 +191,18 @@ export default {
     getColumns () {
       this.columns = [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'code', align: 'center', width: 120, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', align: 'center', width: 250, customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'origCode', align: 'center', width: 120, customRender: function (text) { return text || '--' } },
-        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: 80, align: 'center' },
-        { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' }
+        { title: '原厂编码', dataIndex: 'origCode', align: 'center', width: 120, customRender: function (text) { return (!text || text == ' ') ? '--' : text } },
+        { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: 80, align: 'center' }
+        // { title: '产品品牌', dataIndex: 'productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 120, align: 'center' }
       ]
       const cArr = [
         { title: '终端价', dataIndex: 'terminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '车主价', dataIndex: 'carOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'onlineFalgDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '状态', dataIndex: 'onlineFalgDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
       ]
       getCurrentDealer().then(res => {

+ 3 - 1
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -81,7 +81,8 @@
                 :columns="columns"
                 :data="loadData"
                 :defaultLoadData="false"
-                :scroll="{ y:300 }"
+                :scroll="{ y:170 }"
+                :pageSize="10"
                 bordered>
                 <!-- 产品图片 -->
                 <template slot="imageUrl" slot-scope="text, record">
@@ -184,6 +185,7 @@
                 :columns="chooseColumns"
                 :data="chooseLoadData"
                 :defaultLoadData="false"
+                :pageSize="10"
                 :scroll="{ y: 300 }"
                 bordered>
                 <!-- 采购数量 -->

+ 3 - 1
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -47,7 +47,8 @@
               :columns="columns"
               :data="loadData"
               :defaultLoadData="false"
-              :scroll="{ y: 300 }"
+              :pageSize="10"
+              :scroll="{ y: 140 }"
               bordered>
               <!-- 自定义表头 -->
               <template slot="refundableQtyTitle">
@@ -101,6 +102,7 @@
               :columns="chooseColumns"
               :data="chooseLoadData"
               :defaultLoadData="false"
+              :pageSize="10"
               :scroll="{ y: 300 }"
               bordered>
               <!-- 退货数量 -->

+ 41 - 25
src/views/salesManagement/salesQuery/edit.vue

@@ -5,8 +5,8 @@
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-          <span style="margin: 0 10px;color: #666;">销售单号:{{ detailData&&detailData.salesBillNo || '--' }}</span>
-          <span style="margin: 0 15px;color: #666;">客户名称:{{ detailData&&detailData.buyerName || '--' }}</span>
+          <a style="margin: 0 15px;color: #666;font-size: 18px;font-weight: 600;">单号:{{ detailData&&detailData.salesBillNo || '--' }}</a>
+          <span style="margin: 0 10px;color: #666;">客户名称:{{ detailData&&detailData.buyerName || '--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_salesPrint')">
@@ -45,7 +45,7 @@
                   :min="0"
                   :precision="2"
                   :max="999999"/>
-                <a-button size="small" type="primary" @click="salesDiscount" class="button-info">打折</a-button>
+                <a-button size="small" type="primary" class="button-primary" @click="salesDiscount">打折</a-button>
               </div>
               <div>
                 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
@@ -80,14 +80,20 @@
               </a-form-model>
             </a-col>
             <a-col :span="6">
-              <div style="float:right;overflow: hidden;">
+              <div style="float:right;overflow: hidden;margin-top: 5px;">
                 <a-button
-                  size="small"
                   type="primary"
-                  @click="delSalerDetailAll"
+                  @click="delSalerOrder"
                   :loading="delLoading"
-                  style="margin-left: 10px"
+                  style="margin-right: 10px"
                   id="salesEdit-del-all">整单删除</a-button>
+                <a-button
+                  style="padding: 0 25px;"
+                  type="primary"
+                  :disabled="spinning"
+                  class="button-primary"
+                  @click="handleSubmit()"
+                  id="productInfoList-handleSubmit">提交</a-button>
               </div>
             </a-col>
           </a-row>
@@ -100,8 +106,8 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y: 300 }"
           :defaultLoadData="false"
+          :pageSize="5"
           :rowClassName="(record, index) => record.cost > record.price ? 'redBg-row':''"
           bordered>
           <!-- 产品编码 -->
@@ -141,7 +147,7 @@
           <template slot="action" slot-scope="text, record">
             <a-button
               size="small"
-              type="primary"
+              type="link"
               :loading="delLoading"
               class="button-error"
               @click="handleDel(record)"
@@ -150,16 +156,7 @@
         </s-table>
       </a-card>
     </a-spin>
-    <div class="affix-cont">
-      <a-button
-        size="large"
-        style="padding: 0 60px;"
-        type="primary"
-        :disabled="spinning"
-        class="button-primary"
-        @click="handleSubmit()"
-        id="productInfoList-handleSubmit">提交</a-button>
-    </div>
+    <!-- <div class="affix-cont"></div> -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
   </div>
@@ -170,7 +167,7 @@ import { STable, VSelect } from '@/components'
 import queryPart from './queryPart.vue'
 import chooseCustomModal from './chooseCustomModal.vue'
 import { stockByProductSn } from '@/api/stock'
-import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport } from '@/api/sales'
+import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales'
 import { salesDetailList, salesDetailInsert, salesDetailUpdatePrice, salesDetailUpdateQty, salesDetailDel, salesDetailDelAll } from '@/api/salesDetail'
 import Print from '@/views/common/print.vue'
 import { hdPrint } from '@/libs/JGPrint'
@@ -284,7 +281,7 @@ export default {
         id: record.id,
         qty: record.qty
       }).then(res => {
-        this.resetSearchForm(true)
+        this.resetSearchForm(false)
         if (res.status == 200) {
           this.$message.info(res.message)
         }
@@ -302,7 +299,7 @@ export default {
           productSn: record.productSn,
           price: record.price
         }).then(res => {
-          this.resetSearchForm(true)
+          this.resetSearchForm(false)
           if (res.status == 200) {
             this.$message.info(res.message)
             this.spinning = false
@@ -363,7 +360,27 @@ export default {
         }
       })
     },
-    // 整单删除
+    // 删除销售单
+    delSalerOrder () {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认删除该销售单吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          salesDel({ id: _this.orderId }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.handleBack()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    // 删除已选产品
     delSalerDetailAll () {
       const _this = this
       this.$confirm({
@@ -402,7 +419,7 @@ export default {
           _this.spinning = true
           salesDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
-              _this.resetSearchForm(true)
+              _this.resetSearchForm(false)
             }
             _this.$message.info(res.message)
             _this.delLoading = false
@@ -544,7 +561,6 @@ export default {
   .salesEdit-wrap{
     position: relative;
     height: 100%;
-    padding-bottom: 51px;
     box-sizing: border-box;
     >.ant-spin-nested-loading{
       overflow-y: scroll;

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

@@ -111,7 +111,8 @@
         </template>
         <!-- 急件 -->
         <template slot="oosFlag" slot-scope="text, record">
-          <a-tag :color="record.oosFlag==1?'red':'#ccc'" style="margin-right: 0;" >{{ record.oosFlagDictValue }}</a-tag>
+          <a-tag v-if="record.oosFlag==1" color="red" style="margin-right: 0;" >{{ record.oosFlagDictValue }}</a-tag>
+          <span v-else>{{ record.oosFlagDictValue }}</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
@@ -440,6 +441,7 @@ export default {
     }
   },
   activated () {
+    console.log(this.$store.state.app.isNewTab)
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()

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

@@ -116,7 +116,8 @@
       :data="loadData"
       :customRow="handleClickRow"
       :defaultLoadData="false"
-      :scroll="{ y: 300 }"
+      :pageSize="10"
+      :scroll="{ y: 144 }"
       bordered>
       <!-- 售价 -->
       <template slot="salePrice" slot-scope="text, record">
@@ -148,14 +149,14 @@
       <template slot="action" slot-scope="text, record">
         <a-button
           size="small"
-          type="primary"
-          class="button-info"
+          type="link"
+          class="button-primary"
           @click="handleAdd(record)"
           id="productInfoList-edit-btn">添加</a-button>
         <a-button
           size="small"
-          type="primary"
-          class="button-success"
+          type="link"
+          class="button-primary"
           @click="handleDetail(record)"
           id="productInfoList-detail-btn"
           style="margin-left: 5px;">销售记录</a-button>
@@ -210,7 +211,7 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        warehouseSn: undefined //  仓库
+        warehouseSn: undefined //  仓库
       },
       priceType: '',
       buyerSn: '',
@@ -280,13 +281,15 @@ export default {
     columns () {
       const arr = [
         { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'productName', width: '14%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'brandName', width: '10%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '库存数量', dataIndex: 'currentQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: '9%', align: 'center' },
-        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '9%', align: 'center' },
+        { title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: '7%', align: 'center' },
+        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '7%', align: 'center' },
         { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
       ]
       if (this.cost) {
@@ -334,7 +337,7 @@ export default {
           data = {
             list: [],
             pageNo: 1,
-            pageSize: 20
+            pageSize: 10
           }
         }
         _this.disabled = false

+ 2 - 1
src/views/salesManagement/salesReturn/queryPart.vue

@@ -47,7 +47,8 @@
       :data="loadData"
       :customRow="handleClickRow"
       :defaultLoadData="false"
-      :scroll="{ y: 300 }"
+      :pageSize="10"
+      :scroll="{ y: 144 }"
       bordered>
       <!-- 价格 -->
       <template slot="price" slot-scope="text, record">{{ text }}</template>

+ 6 - 1
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -91,6 +91,7 @@
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"
+          :pageSize="10"
           :scroll="{ y: 300 }"
           bordered>
           <!-- 本次退货数量 -->
@@ -451,6 +452,7 @@ export default {
         'productSn': row.productSn,
         'celQty': row.celQty,
         'hasReturnQty': row.hasReturnQty,
+        'qty': 1,
         'warehouseLocationSn': row.warehouseLocationSn,
         'warehouseSn': row.warehouseSn
       }
@@ -460,10 +462,13 @@ export default {
         params.qty = row.qty
       } else {
         params.salesQty = row.qty
+        // 默认仓库
+        params.warehouseLocationSn = '100000000165'
+        params.warehouseSn = '100000000156'
       }
       this.spinning = true
       salesReturnSaveProduct(params).then(res => {
-        this.resetSearchForm(true)
+        this.resetSearchForm(type != 'edit')
         this.isInster = false
         this.spinning = false
       })

+ 3 - 1
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -93,6 +93,7 @@
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"
+          :pageSize="10"
           :scroll="{ y: 300 }"
           bordered>
           <!-- 本次退货数量 -->
@@ -438,6 +439,7 @@ export default {
         'cost': row.cost,
         'productSn': row.productSn,
         'celQty': row.celQty,
+        'qty': row.qty - row.hasReturnQty,
         'hasReturnQty': row.hasReturnQty,
         'warehouseLocationSn': row.warehouseLocationSn,
         'warehouseSn': row.warehouseSn
@@ -451,7 +453,7 @@ export default {
       }
       this.spinning = true
       salesReturnSaveProduct(params).then(res => {
-        this.resetSearchForm(true)
+        this.resetSearchForm(type != 'edit')
         this.$refs.queryPart.refreshData()
         this.isInster = false
         this.spinning = false