Explorar el Código

Merge branch 'master' of http://121.40.253.172:3000/pengyue/jsh_erp into dev_huangjunjie

huang hace 1 semana
padre
commit
0abef30283

+ 1 - 1
jshERP-web/package.json

@@ -10,6 +10,7 @@
   },
   "dependencies": {
     "@antv/data-set": "^0.11.2",
+    "@chenfengyuan/vue-qrcode": "1.0.2",
     "@tinymce/tinymce-vue": "^2.0.0",
     "ant-design-vue": "1.5.2",
     "area-data": "^5.0.6",
@@ -36,7 +37,6 @@
     "vue-ls": "^3.2.0",
     "vue-photo-preview": "^1.1.3",
     "vue-print-nb-jeecg": "^1.0.9",
-    "vue-qr": "^4.0.9",
     "vue-router": "^3.0.1",
     "vue-splitpane": "^1.0.4",
     "vuedraggable": "^2.20.0",

+ 4 - 2
jshERP-web/src/components/jeecgbiz/modal/JSelectMaterialModal2.vue

@@ -326,12 +326,14 @@ export default {
     // 触发屏幕自适应
     resetScreenSize() {
       let realScreenWidth = window.screen.width
-      this.modalWidth = realScreenWidth < 1600 ? '1300px' : '1550px'
+      this.modalWidth = realScreenWidth < 1600 ? '100%' : '1550px'
       let screenWidth = document.body.clientWidth
       if (screenWidth < 500) {
         this.scrollTrigger = { x: 800 }
       } else {
-        this.scrollTrigger = {}
+        this.scrollTrigger = {
+          x: 'max-content',
+        }
       }
     },
     showModal(barCode) {

+ 20 - 6
jshERP-web/src/mixins/JeecgListMixin.js

@@ -471,6 +471,8 @@ export const JeecgListMixin = {
     },
     //拖拽组件
     handleDrag(column) {
+      const draggingMap = {};
+      const draggingState = Vue.observable(draggingMap);
       return {
         header: {
           cell: (h, props, children) => {
@@ -483,26 +485,38 @@ export const JeecgListMixin = {
             if (!col || !col.width) {
               return h('th', { ...restProps }, [...children])
             }
-
+            let thDom = null;
+            const onDrag = x => {
+              draggingState[key] = 0;
+              col.width = Math.max(x, 1);
+            };
+            const onDragstop = () => {
+              draggingState[key] = thDom.getBoundingClientRect().width;
+              console.log('onDragstop', draggingState[key])
+            };
             const dragProps = {
               key: col.dataIndex || col.key,
               class: 'table-draggable-handle',
               attrs: {
                 w: 10,
-                x: col.width,
+                x: draggingState[key] || col.width,
                 z: 1,
                 axis: 'x',
                 draggable: true,
                 resizable: false,
               },
               on: {
-                dragging: (x, y) => {
-                  col.width = Math.max(x, 1)
-                },
+                dragging: onDrag,
+                dragstop: onDragstop
               },
             }
             const drag = h(VueDraggableResizable, { ...dragProps })
-            return h('th', { ...restProps, class: 'resize-table-th' }, [...children, drag])
+            return h('th', { ...restProps, class: 'resize-table-th',directives: [
+              {
+                name: 'ant-ref',
+                value: r => (thDom = r)
+              }
+            ], }, [...children, drag])
           },
         },
       }

+ 150 - 135
jshERP-web/src/views/bill/dialog/BillDetail.vue

@@ -61,23 +61,23 @@
       <template v-if="billType === '零售出库'">
         <section ref="print" id="retailOutPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="会员卡号">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款类型">
                 {{ model.payType }}
               </a-form-item>
@@ -119,7 +119,7 @@
                 </a-table>
               </div>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-row class="form-row" :gutter="24">
                 <a-col :lg="24" :md="6" :sm="6">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据金额">
@@ -170,23 +170,23 @@
       <template v-else-if="billType === '零售退货入库'">
         <section ref="print" id="retailBackPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="会员卡号">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
                 <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
               </a-form-item>
@@ -204,6 +204,7 @@
                   :loading="loading"
                   :columns="columns"
                   :dataSource="dataSource"
+                  :scroll="{ x: '100%' }"
                 >
                   <template slot="customBarCode" slot-scope="text, record">
                     <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">
@@ -226,7 +227,7 @@
                 </a-table>
               </div>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-row class="form-row" :gutter="24">
                 <a-col :lg="24" :md="6" :sm="6">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据金额">
@@ -269,18 +270,18 @@
       <template v-else-if="billType === '请购单'">
         <section ref="print" id="purchaseApplyPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6"> </a-col>
-            <a-col :span="6"> </a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"> </a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"> </a-col>
           </a-row>
           <div :style="tableWidth">
             <a-table
@@ -292,6 +293,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -329,23 +331,23 @@
       <template v-else-if="billType === '采购订单'">
         <section ref="print" id="purchaseOrderPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6" v-if="model.linkApply">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24" v-if="model.linkApply">
               <a-form-item
                 :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
                 :wrapperCol="wrapperCol"
@@ -354,18 +356,19 @@
                 <a @click="myHandleDetail(model.linkApply)">{{ model.linkApply }}</a>
               </a-form-item>
             </a-col>
-            <a-col :span="6" v-if="model.linkNumber">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24" v-if="model.linkNumber">
               <a-form-item v-if="purchaseBySaleFlag" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
                 {{ model.linkNumber }}
               </a-form-item>
             </a-col>
           </a-row>
-          <div :style="tableWidth">
+          <div style="width: 100%">
             <a-table
               ref="table"
               size="middle"
               bordered
               rowKey="id"
+              :scroll="{ x: '100%' }"
               :pagination="false"
               :loading="loading"
               :columns="columns"
@@ -402,17 +405,17 @@
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
                 {{ model.discount }}%
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款优惠">
                 {{ model.discountMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item
                 :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
                 :wrapperCol="wrapperCol"
@@ -421,25 +424,22 @@
                 {{ model.discountLastMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6"></a-col>
-          </a-row>
-          <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
                 {{ model.accountName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="支付订金">
                 {{ model.changeAmount }}
               </a-form-item>
             </a-col>
-            <a-col :lg="6" :md="12" :sm="24">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="二维码">
-                <vue-qr :text="model.number" :size="200" />
+                <!-- <vue-qr :text="model.number" :size="200" /> -->
+                <vue-qrcode :value="model.number" :options="{ width: 200, margin:1 }"></vue-qrcode>
               </a-form-item>
             </a-col>
-            <a-col :span="6"></a-col>
           </a-row>
         </section>
       </template>
@@ -447,23 +447,23 @@
       <template v-else-if="billType === '采购入库'">
         <section ref="print" id="purchaseInPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
                 <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
               </a-form-item>
@@ -512,17 +512,17 @@
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
                 {{ model.discount }}%
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款优惠">
                 {{ model.discountMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item
                 :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
                 :wrapperCol="wrapperCol"
@@ -531,39 +531,40 @@
                 {{ model.discountLastMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
                 {{ model.otherMoney }}
               </a-form-item>
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
                 {{ model.accountName }}
               </a-form-item>
             </a-col>
-            <a-col v-if="model.deposit" :span="6">
+            <a-col v-if="model.deposit" :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="扣除订金">
                 {{ model.deposit }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次付款">
                 {{ model.changeAmount }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
                 {{ model.debt }}
               </a-form-item>
             </a-col>
-            <a-col :lg="6" :md="12" :sm="24">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="二维码">
-                <vue-qr :text="model.number" :size="200" />
+                <!-- <vue-qr :text="model.number" :size="200" /> -->
+                <vue-qrcode :value="model.number" :options="{ width: 200,margin:2 }"></vue-qrcode>
               </a-form-item>
             </a-col>
-            <a-col v-if="model.hasBackFlag" :span="6">
+            <a-col v-if="model.hasBackFlag" :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退货单号">
                 <template v-for="(item, index) in linkNumberList">
                   <a @click="myHandleDetail(item.number)">{{ item.number }}</a
@@ -573,7 +574,7 @@
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col v-if="financialBillNoList.length" :span="6">
+            <a-col v-if="financialBillNoList.length" :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款单号">
                 <template v-for="(item, index) in financialBillNoList">
                   <a @click="myHandleFinancialDetail(item.billNo)">{{ item.billNo }}</a
@@ -588,23 +589,23 @@
       <template v-else-if="billType === '采购退货出库'">
         <section ref="print" id="purchaseBackPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
                 <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
               </a-form-item>
@@ -620,6 +621,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -652,17 +654,17 @@
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
                 {{ model.discount }}%
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退款优惠">
                 {{ model.discountMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item
                 :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
                 :wrapperCol="wrapperCol"
@@ -671,29 +673,29 @@
                 {{ model.discountLastMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
                 {{ model.otherMoney }}
               </a-form-item>
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
                 {{ model.accountName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次退款">
                 {{ model.changeAmount }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
                 {{ model.debt }}
               </a-form-item>
             </a-col>
-            <a-col :span="6"> </a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"> </a-col>
           </a-row>
         </section>
       </template>
@@ -701,23 +703,23 @@
       <template v-else-if="billType === '销售订单'">
         <section ref="print" id="saleOrderPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
                 {{ model.salesManStr }}
               </a-form-item>
@@ -733,6 +735,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%'}"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -765,17 +768,17 @@
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
                 {{ model.discount }}%
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款优惠">
                 {{ model.discountMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item
                 :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
                 :wrapperCol="wrapperCol"
@@ -784,25 +787,26 @@
                 {{ model.discountLastMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
                 {{ model.accountName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收取订金">
                 {{ model.changeAmount }}
               </a-form-item>
             </a-col>
-            <a-col :lg="6" :md="12" :sm="24">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="二维码">
-                <vue-qr :text="model.number" :size="200" />
+                <!-- <vue-qr :text="model.number" :size="200" /> -->
+                <vue-qrcode :value="model.number" :options="{ width: 200,margin:2 }"></vue-qrcode>
               </a-form-item>
             </a-col>
-            <a-col :span="6"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
         </section>
       </template>
@@ -810,23 +814,23 @@
       <template v-else-if="billType === '销售出库'">
         <section ref="print" id="saleOutPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联订单">
                 <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
               </a-form-item>
@@ -842,6 +846,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -874,17 +879,17 @@
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
                 {{ model.discount }}%
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款优惠">
                 {{ model.discountMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item
                 :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
                 :wrapperCol="wrapperCol"
@@ -893,39 +898,40 @@
                 {{ model.discountLastMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
                 {{ model.otherMoney }}
               </a-form-item>
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
                 {{ model.accountName }}
               </a-form-item>
             </a-col>
-            <a-col v-if="model.deposit" :span="6">
+            <a-col v-if="model.deposit" :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="扣除订金">
                 {{ model.deposit }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次收款">
                 {{ model.changeAmount }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="二维码">
-                <vue-qr :text="model.number" :size="200" />
+                <!-- <vue-qr :text="model.number" :size="200" /> -->
+                <vue-qrcode :value="model.number" :options="{ width: 200,margin:2 }"></vue-qrcode>
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
                 {{ model.debt }}
               </a-form-item>
             </a-col>
-            <a-col v-if="model.hasBackFlag" :span="6">
+            <a-col v-if="model.hasBackFlag" :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退货单号">
                 <template v-for="(item, index) in linkNumberList">
                   <a @click="myHandleDetail(item.number)">{{ item.number }}</a
@@ -935,12 +941,12 @@
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
                 {{ model.salesManStr }}
               </a-form-item>
             </a-col>
-            <a-col v-if="financialBillNoList.length" :span="6">
+            <a-col v-if="financialBillNoList.length" :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款单号">
                 <template v-for="(item, index) in financialBillNoList">
                   <a @click="myHandleFinancialDetail(item.billNo)">{{ item.billNo }}</a
@@ -955,23 +961,23 @@
       <template v-else-if="billType === '销售退货入库'">
         <section ref="print" id="saleBackPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
                 <a @click="myHandleDetail(model.linkNumber)">{{ model.linkNumber }}</a>
               </a-form-item>
@@ -987,6 +993,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -1019,17 +1026,17 @@
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠率">
                 {{ model.discount }}%
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="退款优惠">
                 {{ model.discountMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item
                 :labelCol="{ xs: { span: 24 }, sm: { span: 6 } }"
                 :wrapperCol="wrapperCol"
@@ -1038,29 +1045,29 @@
                 {{ model.discountLastMoney }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="其它费用">
                 {{ model.otherMoney }}
               </a-form-item>
             </a-col>
           </a-row>
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算账户">
                 {{ model.accountName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次退款">
                 {{ model.changeAmount }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="本次欠款">
                 {{ model.debt }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="销售人员">
                 {{ model.salesManStr }}
               </a-form-item>
@@ -1072,23 +1079,23 @@
       <template v-else-if="billType === '其它入库'">
         <section ref="print" id="otherInPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item v-if="model.billType" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
                 {{ model.linkNumber }} {{ model.billType }}
               </a-form-item>
@@ -1107,6 +1114,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -1144,23 +1152,23 @@
       <template v-else-if="billType === '其它出库'">
         <section ref="print" id="otherOutPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="客户">
                 <a-input v-decorator="['id']" hidden />
                 {{ model.organName }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item v-if="model.billType" :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
                 {{ model.linkNumber }} {{ model.billType }}
               </a-form-item>
@@ -1179,6 +1187,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -1216,18 +1225,18 @@
       <template v-else-if="billType === '调拨出库'">
         <section ref="print" id="allocationOutPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6"></a-col>
-            <a-col :span="6"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <div :style="tableWidth">
             <a-table
@@ -1277,18 +1286,18 @@
       <template v-else-if="billType === '组装单'">
         <section ref="print" id="assemblePrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6"></a-col>
-            <a-col :span="6"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <div :style="tableWidth">
             <a-table
@@ -1300,6 +1309,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -1337,18 +1347,18 @@
       <template v-else-if="billType === '拆卸单'">
         <section ref="print" id="disassemblePrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6"></a-col>
-            <a-col :span="6"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <div :style="tableWidth">
             <a-table
@@ -1360,6 +1370,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -1397,22 +1408,22 @@
       <template v-else-if="billType === '盘点复盘'">
         <section ref="print" id="stockCheckReplayPrint">
           <a-row class="form-row" :gutter="24">
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据日期">
                 {{ model.operTimeStr }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="单据编号">
                 {{ model.number }}
               </a-form-item>
             </a-col>
-            <a-col :span="6">
+            <a-col :xl="6" :lg="8" :md="12" :sm="24">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="关联单据">
                 {{ model.linkNumber }}
               </a-form-item>
             </a-col>
-            <a-col :span="6"></a-col>
+            <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <div :style="tableWidth">
             <a-table
@@ -1424,6 +1435,7 @@
               :loading="loading"
               :columns="columns"
               :dataSource="dataSource"
+              :scroll="{ x: '100%' }"
             >
               <template slot="customBarCode" slot-scope="text, record">
                 <div :style="record.imgName ? 'float:left;line-height:30px' : 'float:left;'">{{ record.barCode }}</div>
@@ -1507,7 +1519,8 @@ import JUpload from '@/components/jeecg/JUpload'
 import Vue from 'vue'
 // import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 // import QrcodeVue from 'qrcode.vue'
-import VueQr from 'vue-qr'
+// import VueQr from 'vue-qr'
+import VueQrcode from '@chenfengyuan/vue-qrcode';
 export default {
   name: 'BillDetail',
   // mixins: [JeecgListMixin],
@@ -1515,8 +1528,8 @@ export default {
     BillPrintIframe,
     FinancialDetail,
     JUpload,
-    // QrcodeVue,
-    VueQr,
+    VueQrcode,
+    // VueQr,
   },
   data() {
     return {
@@ -1545,7 +1558,7 @@ export default {
       },
       labelCol: {
         xs: { span: 24 },
-        sm: { span: 5 },
+        sm: { span: 6 },
       },
       wrapperCol: {
         xs: { span: 24 },
@@ -1684,7 +1697,7 @@ export default {
         { title: '序列号', dataIndex: 'snList', width: 300 },
         { title: '有效期', dataIndex: 'expirationDate', width: 90 },
         { title: '多属性', dataIndex: 'sku', width: 90 },
-        { title: '数量', dataIndex: 'operNumber', width: 90 },
+        { title: '入库数量', dataIndex: 'operNumber', width: 90 },
         { title: '已入库', dataIndex: 'finishNumber', width: 90 },
         { title: '单价', dataIndex: 'unitPrice', width: 90 },
         { title: '金额', dataIndex: 'allPrice', width: 90 },
@@ -2203,6 +2216,7 @@ export default {
     show(record, type, prefixNo) {
       //查询单条单据信息
       findBillDetailByNumber({ number: record.number }).then((res) => {
+        console.log('findBillDetailByNumber-----------',res)
         if (res && res.code === 200) {
           let item = res.data
           this.billType = type
@@ -2218,11 +2232,12 @@ export default {
           } else {
             this.model.getAmount = this.model.changeAmount
           }
-          this.model.debt = (
-            this.model.discountLastMoney +
-            this.model.otherMoney -
-            (this.model.deposit + this.model.changeAmount)
-          ).toFixed(2)
+          // this.model.debt = (
+          //   this.model.discountLastMoney +
+          //   this.model.otherMoney -
+          //   (this.model.deposit + this.model.changeAmount)
+          // ).toFixed(2)
+          this.model.debt = item.debt
           this.$nextTick(() => {
             this.form.setFieldsValue(pick(this.model, 'id'))
           })

+ 1 - 1
jshERP-web/src/views/bill/dialog/WaitBillList.vue

@@ -239,7 +239,7 @@ export default {
       } else {
         if (this.selectedDetailRowKeys.length) {
           this.getSelectBillDetailRows()
-          this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.remark)
+          this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.remark, this.organId)
           this.close()
         } else {
           this.$message.warning('抱歉,请选择单据明细!')

+ 24 - 24
jshERP-web/src/views/bill/mixins/BillModalMixin.js

@@ -454,25 +454,25 @@ export const BillModalMixin = {
       setTimeout(function () {
         that.$refs.materialDataTable.resetScrollTop((target.rows.length + 1) * that.$refs.materialDataTable.rowHeight)
       }, 1000)
-      if (this.currentSelectDepotId) {
-        //如果单据选择过仓库,则直接从当前选择的仓库加载
-        target.setValues([{ rowKey: row.id, values: { depotId: this.currentSelectDepotId } }])
-      } else {
-        getAction('/depot/findDepotByCurrentUser').then((res) => {
-          if (res.code === 200) {
-            let arr = res.data
-            if (arr.length === 1) {
-              target.setValues([{ rowKey: row.id, values: { depotId: arr[0].id + '' } }])
-            } else {
-              for (let i = 0; i < arr.length; i++) {
-                if (arr[i].isDefault) {
-                  target.setValues([{ rowKey: row.id, values: { depotId: arr[i].id + '' } }])
-                }
-              }
-            }
-          }
-        })
-      }
+      // if (this.currentSelectDepotId) {
+      //   //如果单据选择过仓库,则直接从当前选择的仓库加载
+      //   target.setValues([{ rowKey: row.id, values: { depotId: this.currentSelectDepotId } }])
+      // } else {
+      //   getAction('/depot/findDepotByCurrentUser').then((res) => {
+      //     if (res.code === 200) {
+      //       let arr = res.data
+      //       if (arr.length === 1) {
+      //         target.setValues([{ rowKey: row.id, values: { depotId: arr[0].id + '' } }])
+      //       } else {
+      //         for (let i = 0; i < arr.length; i++) {
+      //           if (arr[i].isDefault) {
+      //             target.setValues([{ rowKey: row.id, values: { depotId: arr[i].id + '' } }])
+      //           }
+      //         }
+      //       }
+      //     }
+      //   })
+      // }
     },
     //根据【仓库名】带出对应的【仓位货架】
     async setProPosition(barCode, depotId, event){
@@ -517,11 +517,7 @@ export const BillModalMixin = {
           console.log('row========', row)
           // // 选择商品自动带出barCode、商品ID
           if(row.depotId&&row.barCode){
-            // console.log('row.depotId========', row.depotId)
             // // 根据仓库id自动带出仓位货架(若有)参数:商品id、仓库id
-            // getAction('/material/getPositionByDidAndMid',{mid:row.mid,did:row.depotId}).then((res) => {
-            //   console.log('res========', res)
-            // })
             this.setProPosition(row.barCode, row.depotId, event)
           }
           break
@@ -617,6 +613,7 @@ export const BillModalMixin = {
           getMaterialByBarCode(param).then((res) => {
             if (res && res.code === 200) {
               let mList = res.data
+              console.log('mList======',mList)
               target.getValues((error, values) => {
                 const clickRowIndex = values.findIndex((item) => item.id === row.id) //获取当前行的索引
                 // values.pop() //移除最后一行数据
@@ -632,13 +629,15 @@ export const BillModalMixin = {
                   mObj.depotId = mInfo.depotId
                   mObj.stock = mInfo.stock
                   mObj.inventory = mInfo.inventory
+                  mObj.allPrice = mInfo.allPrice||0
+                  mObj.taxLastMoney = mInfo.taxLastMoney||0
                   mArr.push(mObj)
                 }
                 let allPriceTotal = 0
                 let taxLastMoneyTotal = 0
                 for (let j = 0; j < mArr.length; j++) {
                   allPriceTotal += mArr[j].allPrice - 0
-                  taxLastMoneyTotal += mArr[j].taxLastMoney - 0
+                  taxLastMoneyTotal += mArr[j].taxLastMoney- 0
                   //组合和拆分单据给商品类型进行重新赋值
                   if (j === 0) {
                     mArr[0].mType = '组合件'
@@ -646,6 +645,7 @@ export const BillModalMixin = {
                     mArr[j].mType = '普通子件'
                   }
                 }
+                console.log('mArr--------',mArr)
                 this.materialTable.dataSource = mArr
                 if (this.prefixNo === 'LSCK' || this.prefixNo === 'LSTH') {
                   target.statisticsColumns.allPrice = allPriceTotal

+ 3 - 2
jshERP-web/src/views/bill/modules/OtherInModal.vue

@@ -303,7 +303,7 @@ export default {
           },
           { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -488,7 +488,7 @@ export default {
       this.$refs.waitBillList.show('入库', '采购,销售退货', '1,3')
       this.$refs.waitBillList.title = '请选择采购入库或销售退货'
     },
-    waitBillListOk(selectBillDetailRows, linkNumber, remark) {
+    waitBillListOk(selectBillDetailRows, linkNumber, remark, organId) {
       this.rowCanEdit = false
       this.materialTable.columns[1].type = FormTypes.normal
       this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
@@ -511,6 +511,7 @@ export default {
           this.form.setFieldsValue({
             linkNumber: linkNumber,
             remark: remark,
+            organId: organId?String(organId):'',
           })
         })
       }

+ 3 - 3
jshERP-web/src/views/bill/modules/OtherOutModal.vue

@@ -298,8 +298,8 @@ export default {
           // { title: '生产日期', key: 'productionDate', width: '200px', type: FormTypes.normal, disabled: true },
           // { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.normal },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
-          { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.normal },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
           { title: '型号', key: 'model', width: '120px', type: FormTypes.normal },
@@ -342,7 +342,7 @@ export default {
             type: FormTypes.inputNumber,
             validateRules: [{ required: true, message: '实际入库数量不能为空' }],
           },
-          { title: '出库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.input },
+          { title: '出库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.inputNumber },
           { title: '出库差异原因', key: 'reasonOfDifference', width: '120px', type: FormTypes.input },
           {
             title: '出库人',

+ 2 - 2
jshERP-web/src/views/bill/modules/PurchaseInModal.vue

@@ -483,7 +483,7 @@ export default {
           },
           { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -544,7 +544,7 @@ export default {
           //   type: FormTypes.inputNumber,
           //   validateRules: [{ required: true, message: '实际入库数量不能为空' }],
           // },
-          { title: '入库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.input },
+          { title: '入库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.inputNumber },
           { title: '入库差异原因', key: 'reasonOfDifference', width: '120px', type: FormTypes.input },
           {
             title: '入库人',

+ 1 - 1
jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue

@@ -440,7 +440,7 @@ export default {
           },
           { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
           // { title: '商品条码', key: 'barCode', width: '120px', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 

+ 1 - 1
jshERP-web/src/views/bill/modules/SaleOrderModal.vue

@@ -401,7 +401,7 @@ export default {
           // { title: '生产日期', key: 'productionDate', width: '6%', type: FormTypes.normal },
           // { title: '保质期', key: 'expiryNum', width: '6%', type: FormTypes.normal },
           // { title: '商品条码', key: 'barCode', width: '6%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 

+ 2 - 2
jshERP-web/src/views/bill/modules/SaleOutModal.vue

@@ -502,7 +502,7 @@ export default {
           // { title: '生产日期', key: 'productionDate', width: '9%', type: FormTypes.normal, disabled: true },
           // { title: '保质期', key: 'expiryNum', width: '6%', type: FormTypes.normal },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -556,7 +556,7 @@ export default {
           //   type: FormTypes.inputNumber,
           //   validateRules: [{ required: true, message: '实际入库数量不能为空' }],
           // },
-          { title: '出库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.input },
+          { title: '出库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.inputNumber },
           { title: '出库差异原因', key: 'reasonOfDifference', width: '120px', type: FormTypes.input },
           {
             title: '出库人',

+ 1 - 1
jshERP-web/src/views/stock/CheckList.vue

@@ -159,7 +159,7 @@ export default {
           this.$set(this.queryParam, i, null)
         }
       }
-      const url = this.url.list + '?pageNum=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
+      const url = this.url.list + '?currentPage=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
       this.loading = true
       const params = { ...this.queryParam }
       postAction(url, params).then((res) => {

+ 13 - 7
jshERP-web/src/views/stock/components/checkModal.vue

@@ -20,7 +20,7 @@
           <div>
             <a-form :form="queryParam" ref="form">
               <a-row class="form-row" :gutter="24">
-                <a-col :lg="6" :md="12" :sm="24" class="form-col">
+                <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="商品类别">
                     <!-- <a-input disabled placeholder="请输入" v-model="queryParam.categoryId" /> -->
                     <a-tree-select
@@ -34,22 +34,22 @@
                     </a-tree-select>
                   </a-form-item>
                 </a-col>
-                <a-col :lg="6" :md="12" :sm="24" class="form-col">
+                <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="商品名称">
                     <a-input placeholder="请输入" v-model="queryParam.materialName" />
                   </a-form-item>
                 </a-col>
-                <a-col :lg="6" :md="12" :sm="24" class="form-col">
+                <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="批次号">
                     <a-input placeholder="请输入" v-model="queryParam.batchNumber" />
                   </a-form-item>
                 </a-col>
-                <a-col :lg="6" :md="12" :sm="24" class="form-col">
+                <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="仓位货架">
                     <a-input placeholder="请输入" v-model="queryParam.position" />
                   </a-form-item>
                 </a-col>
-                <a-col :lg="6" :md="12" :sm="24" class="form-col">
+                <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
                   <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="是否存在数量差异">
                     <a-select placeholder="请选择" v-model="queryParam.isDifference" :options="isDifferenceData"> </a-select>
                   </a-form-item>
@@ -218,6 +218,10 @@ export default {
       queryParam: { categoryId: '', materialName: '', batchNumber: '', position: '', isDifference: null },
       isDifferenceData: [
         {
+          label: '全部',
+          value: '',
+        },
+        {
           label: '是',
           value: '2',
         },
@@ -279,9 +283,10 @@ export default {
   },
   methods: {
     handleEdit(data) {
+      console.log('handleEdit=====',data)
       this.editForm = { ...data }
       this.editVisible = true
-      this.handleChangeNewInventory(data.newInventory)
+      this.handleChangeNewInventory(data.inventory)
     },
     onSubmitGoods() {
       this.$refs.editFormModel.validate((valid) => {
@@ -363,7 +368,7 @@ export default {
           positionRange,
           creator,
           id,
-          operBy,
+          operByName:operBy,
           operTime,
           number
         } = res.data
@@ -456,6 +461,7 @@ export default {
     },
 
     handleChangeNewInventory(val) {
+      console.log('1111111======',val)
       const inventory = this.editForm.inventory ? Number(this.editForm.inventory) : 0
       this.editForm.differenceCount = val - inventory
     },

+ 13 - 13
jshERP-web/src/views/stock/components/editForm.vue

@@ -1,12 +1,12 @@
 <template>
   <a-form :form="form" ref="form">
     <a-row class="form-row" :gutter="24">
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点单号">
           <a-input disabled placeholder="请输入" v-decorator="['number']" />
         </a-form-item>
       </a-col>
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点类型">
           <a-select
             placeholder="请选择"
@@ -18,12 +18,12 @@
           </a-select>
         </a-form-item>
       </a-col>
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" required prop="taskName" label="盘点任务名称">
           <a-input placeholder="请输入" :disabled="isDisabled" v-decorator="['taskName', rules.taskName]" />
         </a-form-item>
       </a-col>
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="depotId" label="盘点仓库">
           <a-select
             placeholder="请选择"
@@ -35,49 +35,49 @@
           </a-select>
         </a-form-item>
       </a-col>
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点负责人">
           <a-select placeholder="请选择" v-decorator="['creator']" :options="spinnerList" :disabled="isDisabled">
           </a-select>
         </a-form-item>
       </a-col>
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="创建人">
           <a-input placeholder="请输入" v-decorator="['createByName']" disabled />
         </a-form-item>
       </a-col>
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="创建时间">
           <a-input placeholder="请输入" disabled v-decorator="['createTime']" />
         </a-form-item>
       </a-col>
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点库位范围">
           <a-input placeholder="请输入" v-decorator="['positionRange']" disabled />
         </a-form-item>
       </a-col>
-      <a-col :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="商品数量">
           <a-input disabled placeholder="请输入" v-decorator="['materialCount']" />
         </a-form-item>
       </a-col>
-      <a-col v-if="stockType === 'check'" :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col v-if="stockType === 'check'" :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点人">
           <a-input placeholder="请输入" disabled v-decorator.trim="['operBy']" />
         </a-form-item>
       </a-col>
-      <a-col v-if="stockType === 'check'" :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col v-if="stockType === 'check'" :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="完成时间">
           <a-input placeholder="请输入" disabled v-decorator.trim="['operTime']" />
         </a-form-item>
       </a-col>
-      <a-col v-show="false" :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col v-show="true" :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点状态">
           <a-select placeholder="请选择" v-decorator="['taskStatus']" :options="taskStatusList" :disabled="isDisabled">
           </a-select>
         </a-form-item>
       </a-col>
-      <a-col v-show="false" :lg="6" :md="12" :sm="24" class="form-col">
+      <a-col v-show="false" :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点状态">
           <a-input v-decorator="['id']"></a-input>
         </a-form-item>

+ 31 - 16
jshERP-web/src/views/stock/components/stockModal.vue

@@ -9,7 +9,7 @@
           :rules="rules"
           :stockVisible="stockVisible"
           ref="editForm"
-          :total="dataSource.length || 0"
+          :total="ipagination.total"
           :openType="openType"
           :stockType="stockType"
           @getForm="getForm"
@@ -29,7 +29,7 @@
             :dataSource="dataSource"
             :loading="loading"
             :scroll="{ y: 500 }"
-            :pagination="false"
+            :pagination="ipagination"
             @change="handleTableChange"
           >
             <span v-if="isShowBtn" slot="action" slot-scope="text, record">
@@ -126,6 +126,7 @@ export default {
       form: {},
       isShow: false,
       stockType: 'task',
+      batchNumberStr: ''
     }
   },
   watch: {
@@ -230,32 +231,39 @@ export default {
         .filter((item) => item)
         .join(',')
         console.log('rows', rows)
+        console.log('ids', ids)
+        console.log('str===', str)
       getAction('/materialBatch/findBatchNumbersByBarCode',{
         barCodes: str,
       }).then((res) => {
-        this.getBatchData(res.data)
+        const batchStr = res.data.split(',')
+        .filter((item) => item)
+        .join(',')
+        this.batchNumberStr = batchStr
+        this.getBatchData()
       })
     },
     findAllSelect() {
       // const params = { ...this.$refs.selectModal.queryParam }
       getAction('/materialBatch/findBatchNumbersByBarCode').then((res) => {
         this.$refs.selectModal.close()
-        this.getBatchData(res.data)
-      })
-    },
-    getBatchData(val) {
-      const batchStr = val
-        .split(',')
+        const batchStr = res.data.split(',')
         .filter((item) => item)
         .join(',')
+        this.batchNumberStr = batchStr
+        this.getBatchData()
+      })
+    },
+    getBatchData() {
       const params = {
-        batchNumber: batchStr,
-        organId: '',
-        mpList: '',
-        prefixNo: '',
+        batchNumber: this.batchNumberStr,
+        // organId: '',
+        // mpList: '',
+        // prefixNo: '',
       }
-      getMaterialByBatchNumber(params).then((res) => {
-        this.dataSource.push(...res.data)
+      getAction(`/material/getMaterialByBatchNumber?currentPage=${this.ipagination.current}&pageSize=${this.ipagination.pageSize}`, params).then((res) => {
+        this.dataSource = res.data.rows
+        this.ipagination.total = Number(res.data.total)
         this.dataSource = this.dataSource.reduce((acc, cur) => {
           const hasDuplicate = acc.some((item) => item.batchNumber === cur.batchNumber)
           if (!hasDuplicate) {
@@ -276,6 +284,8 @@ export default {
 
     onClearList(val) {
       this.dataSource = []
+      this.ipagination.current = 1
+      this.ipagination.total = 0
       this.getForm(val)
       if (val.taskType === 1) {
         this.findAllSelect()
@@ -285,7 +295,12 @@ export default {
     handleDrag() {},
     // ipagination() {},
 
-    handleTableChange() {},
+    handleTableChange(pagination) {
+      if (pagination && pagination.current) {
+        this.ipagination = pagination
+      }
+      this.getBatchData()
+    },
   },
 }
 </script>

+ 2 - 1
jshERP-web/src/views/system/AppVersionList.vue

@@ -65,7 +65,8 @@ export default {
         this.ipagination.current = 1
       }
       this.loading = true
-      postAction(this.url.list, {}).then((res) => {
+      const url = this.url.list + '?currentPage=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
+      postAction(url, {}).then((res) => {
         if (res.code === 200) {
           this.dataSource = res.data.rows
           this.ipagination.total = Number(res.data.total)