Przeglądaj źródła

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

李磊 3 lat temu
rodzic
commit
1667061441

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

@@ -149,8 +149,8 @@ export default {
   },
   watch: {
     '$route': function (newVal, oldVal) {
-      console.log(newVal, oldVal)
       if (newVal.name == oldVal.name) { return }
+      console.log(newVal, oldVal)
       // 解决页面地址相同参数不同时打开多个页签问题(例 详情页id或sn不同时)
       const index = this.tabsList.indexOf(newVal.name)
       if (index < 0) { // 不存在
@@ -162,7 +162,10 @@ export default {
         const oa = oldVal.meta.title.indexOf('详情') >= 0
         const ob = oldVal.meta.title.indexOf('新增') >= 0
         const oc = oldVal.meta.title.indexOf('编辑') >= 0
-        if (na || nb || nc || oa || ob || oc) {
+        // 是否时同一个父级菜单下的页面
+        const hasChildren = newVal.matched[2].name == oldVal.matched[2].name
+        console.log(newVal.matched[2].name, oldVal.matched[2].name, hasChildren)
+        if ((na || nb || nc || oa || ob || oc) && hasChildren) {
           // 替换当前页签
           this.replaceTab(newVal, oldVal)
           // 从列表打开新增,编辑
@@ -186,7 +189,8 @@ export default {
       this.activeKey = newVal.name
     },
     activeKey: function (newPathKey) {
-      this.$router.push({ name: newPathKey })
+      const pages = this.pages.find(item => item.name == newPathKey)
+      this.$router.push({ name: newPathKey, params: pages.params })
     }
   },
   render () {

+ 3 - 1
src/components/newThem.less

@@ -6,4 +6,6 @@
 @menu-item-height: 30px;
 @collapse-header-padding: 6px 8px;
 @table-padding-vertical: 5px;
-@table-padding-horizontal: 5px;
+@table-padding-horizontal: 5px;
+@border-color-base: #dedede;
+@border-color-split: #dedede;

+ 2 - 1
src/libs/JGPrint.js

@@ -24,9 +24,10 @@ export const JGPrint = function (data, type, printerType) {
       return
     }
     LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
-    LODOP.ADD_PRINT_HTM('0', '0', 'RightMargin:0cm', 'BottomMargin:0cm', data)
+    LODOP.SET_PRINT_MODE("POS_BASEON_PAPER",true) // 可使输出以纸张边缘为基点
     LODOP.SET_PRINT_PAGESIZE(3, 2090, 45, '') // 这里3表示纵向打印且纸高“按内容的高度”;2140表示纸宽214.0mm;60表示页底空白6.0mm
     // LODOP.SET_PRINT_PAGESIZE(1, 2090, 1000, '')
+    LODOP.ADD_PRINT_HTM('0', '0', '595pt', 1000, data)
     if (type == 'preview') {
       LODOP.PREVIEW()
     }

+ 8 - 2
src/views/allocationManagement/storeTransferOut/edit.vue

@@ -92,7 +92,13 @@
               bordered>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="storeTransferOutEdit-add-btn">添加</a-button>
+                <a-button
+                  size="small"
+                  :disabled="record.currentQty==0"
+                  type="primary"
+                  class="button-primary"
+                  @click="handleAdd(record)"
+                  id="storeTransferOutEdit-add-btn">添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>
@@ -235,7 +241,7 @@ export default {
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return productQuery(Object.assign(parameter, this.queryParam)).then(res => {
+        return productQuery(Object.assign(parameter, this.queryParam, { 'currentQtyFlag': 0 })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {

+ 22 - 5
src/views/purchasingManagement/purchaseOrder/chooseImportModal.vue

@@ -10,12 +10,12 @@
     :width="900">
     <div class="chooseImport-con">
       <!-- 可导入数据 -->
-      <p class="">可导入数据{{ loadData.length }}条</p>
+      <p class="chooseImport-tit">可导入数据{{ loadData.length }}条</p>
       <a-table
         class="sTable"
         ref="table"
         size="small"
-        :rowKey="(record) => record.allocateSn"
+        :rowKey="(record) => record.purchaseBillSn"
         :columns="nowColumns"
         :dataSource="loadData"
         :loading="loading"
@@ -25,11 +25,12 @@
       </a-table>
       <a-divider />
       <!-- 不可导入数据 -->
-      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <p class="chooseImport-tit red">不可导入数据{{ unLoadData.length }}条</p>
       <a-table
-        class="unTable"
+        class="unTable sTable"
         ref="unTable"
         size="small"
+        :rowClassName="(record, index) => 'yellowBg-row'"
         :rowKey="(record) => record.errorDesc"
         :columns="nowUnColumns"
         :dataSource="unLoadData"
@@ -148,9 +149,22 @@ export default {
 }
 </script>
 
-<style lang="less" scoped>
+<style lang="less">
   .chooseImport-modal{
     .chooseImport-con{
+      .chooseImport-tit{
+        font-size: 14px;
+        font-weight: bold;
+      }
+      .unTable{
+        box-shadow: 0px 0px 4px rgb(89,89,89,.9);
+        .ant-table-bordered .ant-table-tbody > tr > td, .ant-table-bordered .ant-table-thead > tr > th{
+          border-right: 1px solid #595959;
+        }
+        .ant-table-tbody > tr > td, .ant-table-thead > tr > th{
+          border-bottom: 1px solid #595959;
+        }
+      }
       .red{
         color: #f30;
       }
@@ -163,4 +177,7 @@ export default {
       }
     }
   }
+  .yellowBg-row{
+    background-color: #ffe58f;
+  }
 </style>

+ 1 - 1
src/views/purchasingManagement/purchaseOrder/receivingAddress/chooseAddressModal.vue

@@ -102,7 +102,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
         { title: '收货人', scopedSlots: { customRender: 'consignee' }, width: '24%', align: 'center', ellipsis: true },
-        { title: '手机号码', dataIndex: 'consigneeTel', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '联系电话', dataIndex: 'consigneeTel', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收货地址', dataIndex: 'address', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '24%', align: 'center' },
         { title: '选择', scopedSlots: { customRender: 'choose' }, width: '10%', align: 'center' }

+ 3 - 3
src/views/purchasingManagement/purchaseOrder/receivingAddress/editAddressModal.vue

@@ -25,12 +25,12 @@
             placeholder="请输入收货人(最多30个字符)"
             allowClear />
         </a-form-model-item>
-        <a-form-model-item label="收货人电话" prop="consigneeTel">
+        <a-form-model-item label="联系电话" prop="consigneeTel">
           <a-input
             id="editAddress-phone"
             :maxLength="30"
             v-model="form.consigneeTel"
-            placeholder="请输入收货人电话(最多30个字符)"
+            placeholder="请输入联系电话(最多30个字符)"
             allowClear />
         </a-form-model-item>
         <a-form-model-item label="所在地区" required style="margin: 0;">
@@ -112,7 +112,7 @@ export default {
           { required: true, message: '请输入收货人', trigger: 'change' }
         ],
         consigneeTel: [
-          { required: true, message: '请输入收货人电话', trigger: 'change' }
+          { required: true, message: '请输入联系电话', trigger: 'change' }
         ],
         provinceSn: [
           { required: true, message: '请选择省', trigger: 'change' }

+ 13 - 6
src/views/salesManagement/salesQuery/edit.vue

@@ -453,18 +453,25 @@ export default {
       }
       // 库存不足时
       if (row.currentQty < row.salesNums) {
-        this.$confirm({
+        _this.$confirm({
           title: '提示',
           content: '库存不足,确认添加为急件吗?',
           centered: true,
           closable: true,
           onOk () {
-            _this.saveNewProduct(row)
+            _this.isPutCostDyPrice(row)
           }
         })
-      } else if (row.putCost > row.salePrice) {
+      } else {
+        _this.isPutCostDyPrice(row)
+      }
+    },
+    // 判断售价低于成本价
+    isPutCostDyPrice (row) {
+      const _this = this
+      if (row.putCost > row.price) {
         // 销售价低于成本价
-        this.$confirm({
+        _this.$confirm({
           title: '提示',
           content: '售价低于成本价,确认要添加吗?',
           centered: true,
@@ -474,7 +481,7 @@ export default {
           }
         })
       } else {
-        this.saveNewProduct(row)
+        _this.saveNewProduct(row)
       }
     },
     // 保存添加的产品到销售列表
@@ -488,7 +495,7 @@ export default {
         cost: row.putCost,
         // productCode: row.productCode,
         // productOrigCode: row.productOrigCode,
-        price: row.salePrice,
+        price: row.price,
         qty: row.salesNums,
         salesBillSn: this.detailData.salesBillSn,
         salesBillNo: this.detailData.salesBillNo,

+ 24 - 7
src/views/salesManagement/salesQuery/queryPart.vue

@@ -121,15 +121,17 @@
       bordered>
       <!-- 售价 -->
       <template slot="salePrice" slot-scope="text, record">
-        <div @dblclick.stop>
+        <div style="display: flex;align-items: center;" @dblclick.stop>
           <a-input-number
             size="small"
-            v-model="record.salePrice"
+            v-model="record.price"
             :precision="2"
             :min="0"
             :max="999999"
             style="width: 100%;"
             placeholder="请输入" />
+          <span style="color: red;margin: 0 2px;font-size: 14px;" v-if="record.origSalePriceFlag == 1">原</span>
+          <span v-else>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
         </div>
       </template>
       <!-- 销售数量 -->
@@ -280,16 +282,16 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
         { 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: 'brandName', width: '11%', 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: 'currentQty', width: '6%', 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: '7%', align: 'center' },
-        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '7%', align: 'center' },
+        { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '6%', align: 'center' },
         { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
       ]
       if (this.cost) {
@@ -329,6 +331,7 @@ export default {
             data.list[i].no = no + i + 1
             data.list[i].salesNums = 1
             data.list[i].currentQty = data.list[i].currentQty || 0
+            data.list[i].price = data.list[i].lastSalePrice ? data.list[i].lastSalePrice : data.list[i].salePrice
           }
           if (!params.vinCode) {
             _this.vinInfoData = null
@@ -407,7 +410,21 @@ export default {
     },
     // 选择配件
     handleAdd (row) {
-      this.$emit('add', row)
+      const _this = this
+      console.log(row.price, row.lastSalePrice, row.salePrice, row.lastSalePrice < row.salePrice)
+      if (row.lastSalePrice && (row.price < row.salePrice)) {
+        _this.$confirm({
+          title: '提示',
+          content: '售价低于定价,是否仍继续添加?',
+          centered: true,
+          closable: true,
+          onOk () {
+            _this.$emit('add', row)
+          }
+        })
+      } else {
+        _this.$emit('add', row)
+      }
     },
     // 销售记录
     handleDetail (row) {

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.151:80/qpls-md',
+        // target: 'http://192.168.16.103:8503/qpls-md',
         target: 'http://p.iscm.360arrow.com/qpls-md', //  Ô¤·¢²¼
         // target: 'http://qpls-md.360arrow.com/qpls-md', //  Éú²ú
         // ws: false,