Преглед на файлове

develop_lcgz 合并到 develop

chenrui преди 3 години
родител
ревизия
3b7dbdc7e9

+ 31 - 0
src/api/receiving.js

@@ -65,3 +65,34 @@ export const receivingDetailPrint = params => {
   }
   return axios.request(data)
 }
+// 备货 详情  导出
+export const receivingExport = params => {
+  return axios.request({
+    url: `/receiving/export`,
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
+//  签收入库 列表  有分页
+export const receivingStockList = (params) => {
+  const url = `/receiving/queryStockInPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+//  入库审核 列表  有分页
+export const receivingAuditList = (params) => {
+  const url = `/receiving/queryStockInAuditPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 3 - 3
src/api/sales.js

@@ -138,9 +138,9 @@ export const salesDetailPrint = params => {
     method: 'get'
   }
   // 喷墨打印
-  // if (params.type == 'INK') {
-  //   data.responseType = 'blob'
-  // }
+  if (params.type == 'INK') {
+    data.responseType = 'blob'
+  }
   return axios.request(data)
 }
 // 销售 详情  导出

+ 4 - 1
src/components/tools/UserMenu.vue

@@ -120,7 +120,10 @@ export default {
         // 重新登录
         const params = { username: '', password: '' }
         return this.Login(params).then(() => {
-          window.location.reload() //  刷新页面
+          this.$router.push({ path: '/home' })
+          setTimeout(() => {
+            window.location.reload() //  刷新页面
+          }, 100)
         }).catch(err => this.requestFailed(err))
       })
     },

+ 49 - 0
src/config/router.config.js

@@ -392,6 +392,55 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/purchasingManagement/signWarehousing',
+            redirect: '/purchasingManagement/signWarehousing/list',
+            name: 'signWarehousing',
+            component: BlankLayout,
+            meta: {
+              title: '签收入库',
+              icon: 'money-collect'
+              // permission: 'M_signWarehousingList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'signWarehousingList',
+                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/signWarehousing/list.vue'),
+                meta: {
+                  title: '签收入库列表',
+                  icon: 'money-collect',
+                  hidden: true
+                  // permission: 'M_signWarehousingList'
+                }
+              },
+              {
+                path: 'edit/:sn',
+                name: 'signWarehousingEdit',
+                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/signWarehousing/edit.vue'),
+                meta: {
+                  title: '签收入库',
+                  icon: 'money-collect',
+                  replaceTab: true,
+                  hidden: true
+                  // permission: 'B_signWarehousingDetail'
+                }
+              },
+              {
+                path: 'stockOrderDetail/:sn',
+                name: 'signWarehousingStockOrderDetail',
+                component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/signWarehousing/stockOrderDetail.vue'),
+                meta: {
+                  title: '备货单详情',
+                  icon: 'money-collect',
+                  replaceTab: true,
+                  hidden: true
+                  // permission: 'B_signWarehousingStockOrderDetail'
+                }
+              }
+            ]
+          },
           {
             path: '/purchasingManagement/purchaseReturn',
             redirect: '/purchasingManagement/purchaseReturn/list',

+ 28 - 31
src/libs/JGPrint.js

@@ -7,47 +7,44 @@ export const JGPrint = function (data, type, printerType) {
   if (!data) {
     return
   }
-  const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
-  if (!LODOP) {
-    confirm({
-      title: '提示?',
-      content: h => <div>打印控件未安装,请先下载并安装。安装完成后,刷新页面即可打印。</div>,
-      okText: '立即下载',
-      okType: 'danger',
-      cancelText: '暂不打印',
-      onOk () {
-        window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
-      }
-    })
-    return
-  }
-  LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
-  LODOP.SET_PRINT_MODE("POS_BASEON_PAPER",true) // 可使输出以纸张边缘为基点
-  LODOP.SET_PRINT_STYLEA(0,"PDFScalMode",1);
-  const dlen = data.data.length
   // 针式打印
   if (printerType == 'NEEDLE') {
+    const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
+    console.log(LODOP, 'LODOP')
+    if (!LODOP) {
+      confirm({
+        title: '提示?',
+        content: h => <div>打印控件未安装,请先下载并安装。安装完成后,刷新页面即可打印。</div>,
+        okText: '立即下载',
+        okType: 'danger',
+        cancelText: '暂不打印',
+        onOk () {
+          window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+        }
+      })
+      return
+    }
+    LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
+    LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true) // 可使输出以纸张边缘为基点
+    LODOP.ADD_PRINT_HTM('0', '0', 'RightMargin:0cm', 'BottomMargin:0cm', data)
+    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.SET_SHOW_MODE("HIDE_PBUTTIN_PREVIEW",1);//隐藏打印按钮
-      LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data[0])
-      LODOP.SET_PRINT_PAGESIZE(3,2090,0,"");
       LODOP.PREVIEW()
     }
     if (type == 'print') {
-      for(let i=0;i<dlen;i++){
-        LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data[i])
-        LODOP.SET_PRINT_PAGESIZE(3, 2090, 0, '')
-        LODOP.PRINT()
-      }
+      LODOP.PRINT()
     }
   } else {
-    // 喷墨打印机
-    LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', data.data[0])
-    LODOP.SET_PRINT_PAGESIZE(3,2090,0,"");
+    // 喷墨打印
+    const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
+    document.getElementById('print').innerHTML = '<iframe id="printfsqd" name="printfsqd" src="' + url + '" hidden></iframe>'
     if (type == 'preview') { //  预览
-      LODOP.PREVIEW()
+      window.open(url)
     } else if (type == 'print') { //  打印
-      LODOP.PRINT()
+      window.frames['printfsqd'].focus()
+      window.frames['printfsqd'].print()
     }
   }
 }

+ 1 - 1
src/utils/request.js

@@ -13,7 +13,7 @@ const service = axios.create({
 })
 
 const err = (error) => {
-  console.log(error.response.data.message, 'error')
+  console.log(error, 'error')
   if (error.response) {
     const status = error.response.status
     if ((status == 503 || status == 500) && window.location.pathname != '/user/login') {

+ 2 - 2
src/views/financialManagement/financialPayment/detailModal.vue

@@ -12,10 +12,10 @@
     <div v-if="detailsData">
       <a-descriptions :column="1" size="default">
         <a-descriptions-item label="付款单号">{{ detailsData&&detailsData.settleNo || '--' }}</a-descriptions-item>
-        <a-descriptions-item label="关联单号">{{ detailsData&&detailsData.bizNo || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="发货单号">{{ detailsData&&detailsData.bizNo || '--' }}</a-descriptions-item>
         <a-descriptions-item label="商户名称">{{ detailsData&&detailsData.settleClientName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="付款金额">{{ detailsData&&(detailsData.settledAmount || detailsData.settledAmount==0) ? '¥'+detailsData.settledAmount : '--' }}</a-descriptions-item>
-        <a-descriptions-item label="付款类型">{{ detailsData&&detailsData.bizTypeDictValue || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="单据类型">{{ detailsData&&detailsData.bizTypeDictValue || '--' }}</a-descriptions-item>
         <a-descriptions-item label="付款方式">{{ detailsData&&detailsData.settleStyleName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="付款时间">{{ detailsData&&detailsData.settleTime || '--' }}</a-descriptions-item>
         <a-descriptions-item label="审核时间">{{ detailsData&&detailsData.auditTime || '--' }}</a-descriptions-item>

+ 3 - 3
src/views/financialManagement/financialPayment/list.vue

@@ -15,7 +15,7 @@
               <a-form-item label="付款单号"><a-input id="finacialPay-settleNo" v-model.trim="queryParam.settleNo" allowClear placeholder="请输入付款单号" /></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="关联单号"><a-input id="finacialPay-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入关联单号" /></a-form-item>
+              <a-form-item label="发货单号"><a-input id="finacialPay-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入发货单号" /></a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="商户名称">
@@ -150,12 +150,12 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '付款单号', dataIndex: 'settleNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '关联单号', dataIndex: 'bizNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货单号', dataIndex: 'bizNo', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户名称', dataIndex: 'settleClientName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '应付金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '已付金额', dataIndex: 'settledAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
         { title: '待付金额', dataIndex: 'unsettleAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
-        { title: '付款类型', dataIndex: 'bizName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizName', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款方式', dataIndex: 'settleStyleName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '付款时间', dataIndex: 'settleTime', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },

+ 24 - 17
src/views/financialManagement/warehousingAudit/list.vue

@@ -11,8 +11,8 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="采购入库单号">
-                <a-input id="warehousingAuditList-receivingBillNo" v-model.trim="queryParam.receivingBillNo" allowClear placeholder="请输入采购入库单号"/>
+              <a-form-item label="发货单号">
+                <a-input id="warehousingAuditList-receivingBillNo" v-model.trim="queryParam.receivingBillNo" allowClear placeholder="请输入发货单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -27,7 +27,7 @@
                     v-model="queryParam.auditState"
                     ref="auditState"
                     id="warehousingAuditList-auditState"
-                    code="RECEIVING_BILL_STATUS"
+                    code="RECEIVING_BILL_AUDIT_STATUS"
                     placeholder="请选择入库审核状态"
                     allowClear></v-select>
                 </a-form-item>
@@ -65,7 +65,7 @@
         :scroll="{ y: tableHeight }"
         :defaultLoadData="false"
         bordered>
-        <!-- 采购入库单号 -->
+        <!-- 发货单号 -->
         <template slot="receivingBillNo" slot-scope="text, record">
           <span v-if="record.receivingBillNo" :class="$hasPermissions('M_warehousingAudit_detail')?'active':'common'" @click="handleDetail(record)">{{ record.receivingBillNo }}</span>
           <span v-else>--</span>
@@ -98,7 +98,7 @@ import moment from 'moment'
 import getDate from '@/libs/getDate'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { receivingList, receivingStockInAudit, receivingCount } from '@/api/receiving'
+import { receivingAuditList, receivingStockInAudit, receivingCount } from '@/api/receiving'
 export default {
   components: { STable, VSelect, rangeDate },
   data () {
@@ -107,23 +107,23 @@ export default {
       advanced: true, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       auditTime: [
-        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+        moment(getDate.getThreeMonthDays().starttime + ' 00:00:00', 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime + ' 23:59:59', 'YYYY-MM-DD')
       ], //  入库时间
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
+        endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
         purchaseBillNo: '',
         receivingBillNo: '',
-        auditState: undefined
+        auditState: 'WAIT_PUT_WAREHOUSE_AUDIT'
       },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '采购单号', dataIndex: 'purchaseBillNo', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采购入库单号', scopedSlots: { customRender: 'receivingBillNo' }, width: '15%', align: 'center' },
+        { title: '发货单号', scopedSlots: { customRender: 'receivingBillNo' }, width: '15%', align: 'center' },
         { title: '总款数', dataIndex: 'totalPutCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库总数量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '入库总成本', dataIndex: 'totalPutAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -137,7 +137,7 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        return receivingList(params).then(res => {
+        return receivingAuditList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -145,6 +145,13 @@ export default {
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              if (data.list[i].auditState == 'WAIT_PUT_WAREHOUSE_AUDIT') {
+                data.list[i].auditStateDictValue = '待审核'
+              } else if (data.list[i].auditState == 'FINISH') {
+                data.list[i].auditStateDictValue = '已审核'
+              } else if (data.list[i].auditState == 'PUT_WAREHOUSE_AUDIT_REJECT') {
+                data.list[i].auditStateDictValue = '审核不通过'
+              }
             }
             this.disabled = false
           }
@@ -158,8 +165,8 @@ export default {
   methods: {
     //  时间  change
     dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
+      this.queryParam.beginDate = date[0] ? date[0] + ' 00:00:00' : ''
+      this.queryParam.endDate = date[1] ? date[1] + ' 23:59:59' : ''
     },
     // 合计
     getTotal (param) {
@@ -206,11 +213,11 @@ export default {
     // 重置数据
     resetData () {
       this.$refs.rangeDate.resetDate(this.auditTime)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime + ' 00:00:00'
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
       this.queryParam.purchaseBillNo = ''
       this.queryParam.receivingBillNo = ''
-      this.queryParam.auditState = undefined
+      this.queryParam.auditState = 'WAIT_PUT_WAREHOUSE_AUDIT'
     },
     pageInit () {
       const _this = this

+ 5 - 2
src/views/inventoryManagement/inventoryChecking/detailModal.vue

@@ -232,13 +232,16 @@ export default {
         { title: '单位', dataIndex: 'productUnit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '库存数量', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '盘点数量', dataIndex: 'checkQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '6%', align: 'center' },
-        { title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' }
+        { title: '盈亏数量', scopedSlots: { customRender: 'checkProfitLossQty' }, width: '6%', align: 'center' }
+        // { title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' }
       ]
       if (this.basicInfoData && this.basicInfoData.warehouseFlag == '1') {
         arr.splice(4, 0, { title: '仓库', dataIndex: 'warehouseName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
         arr.splice(5, 0, { title: '仓位', dataIndex: 'warehouseLocationName', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
       }
+      if (this.basicInfoData && this.basicInfoData.state == 'FINISH') {
+        arr.push({ title: '盈亏成本', scopedSlots: { customRender: 'checkProfitLossCost' }, width: '6%', align: 'right' })
+      }
       return arr
     }
   },

+ 18 - 12
src/views/purchasingManagement/purchaseOrder/detail.vue

@@ -8,13 +8,14 @@
           <span class="billno">单号:{{ detail&&detail.purchaseBillNo }}</span>
           <a-tag color="blue">{{ detail&&detail.billStatusDictValue }}</a-tag>
           <a-tag color="orange">{{ detail&&detail.financialStatusDictValue }}</a-tag>
+          <span class="billno" v-if="detail&&detail.purchaseBillNoSource" style="font-size: 14px;margin: 0;">(原:{{ detail&&detail.purchaseBillNoSource }})</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
           <Print v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
           <a-button
             key="1"
-            v-if="$hasPermissions('B_purchaseExportProduct') && (detail&&(detail.billStatus=='WAIT_PUT_WAREHOUSE' || detail.billStatus=='WAIT_PUT_WAREHOUSE_AUDIT' || detail.billStatus=='FINISH'))"
+            v-if="$hasPermissions('B_purchaseExportProduct') && (detail&&(detail.billStatus=='AUDIT_PASS' || detail.billStatus=='CANCEL' || detail.billStatus=='WAIT_PUT_WAREHOUSE' || detail.billStatus=='WAIT_PUT_WAREHOUSE_AUDIT' || detail.billStatus=='FINISH'))"
             type="primary"
             class="button-info"
             id="purchaseOrderDetail-export-btn"
@@ -40,6 +41,7 @@
                 </div>
                 <span v-else>--</span>
               </a-descriptions-item>
+              <a-descriptions-item label="备注">{{ (detail&&detail.remarks) || '--' }}</a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
@@ -53,11 +55,11 @@
               <div slot="message">
                 产品款数:<strong>{{ detail && (detail.totalCategory || detail.totalCategory==0) ? detail.totalCategory : '--' }}</strong>,
                 采购数量合计:<strong>{{ detail && (detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--' }}</strong>,
-                审核订单数量:<strong>{{ detail && (detail.totalAuthQty || detail.totalAuthQty==0) ? detail.totalAuthQty : '--' }}</strong>,
-                缺货数量:<strong>{{ detail && (detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--' }}</strong>,
+                审核订单数量:<strong>{{ detail && (detail.totalPushedQty || detail.totalPushedQty==0) ? detail.totalPushedQty : '--' }}</strong>,
+                已取消数量:<strong>{{ detail && (detail.totalCancelQty || detail.totalCancelQty==0) ? detail.totalCancelQty : '--' }}</strong>,
                 采购金额合计:<strong>{{ detail && (detail.discountedAmount || detail.discountedAmount==0) ? '¥'+detail.discountedAmount : '--' }}</strong>,
-                审核订单金额:<strong>{{ detail && (detail.totalAuthAmount || detail.totalAuthAmount==0) ? '¥'+detail.totalAuthAmount : '--' }}</strong>,
-                缺货金额:<strong>{{ detail && (detail.totalCancelAmount || detail.totalCancelAmount==0) ? '¥'+detail.totalCancelAmount : '--' }}</strong>
+                审核订单金额:<strong>{{ detail && (detail.totalPushedAmount || detail.totalPushedAmount==0) ? '¥'+detail.totalPushedAmount : '--' }}</strong>,
+                已取消金额:<strong>{{ detail && (detail.totalCancelAmount || detail.totalCancelAmount==0) ? '¥'+detail.totalCancelAmount : '--' }}</strong>
               </div>
             </a-alert>
             <!-- 列表 -->
@@ -75,7 +77,7 @@
                 <div>{{ text }}</div>
                 <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
               </template>
-              <!-- 缺货数量 -->
+              <!-- 已取消数量 -->
               <template slot="outOfStockNum" slot-scope="text, record">
                 <span>{{ record.outOfStockNum }}</span>
               </template>
@@ -108,7 +110,7 @@
                 <div>{{ text }}</div>
                 <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
               </template>
-              <!-- 缺货数量 -->
+              <!-- 已取消数量 -->
               <template slot="outOfStockNum" slot-scope="text, record">
                 <span>{{ record.outOfStockNum }}</span>
               </template>
@@ -158,14 +160,14 @@ export default {
         { title: '采购单价', dataIndex: 'discountedPrice', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购金额', dataIndex: 'discountedAmount', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'qty', width: '7%', align: 'center', scopedSlots: { customRender: 'origqty' } },
-        { title: '审核订单金额', dataIndex: 'authAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核订单数量', dataIndex: 'authQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '缺货数量', dataIndex: 'cancelQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '审核订单金额', dataIndex: 'pushedAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核订单数量', dataIndex: 'pushedQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已取消数量', dataIndex: 'cancelQty', width: '7%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
-        return purchaseDetailList(Object.assign(parameter, { purchaseBillSn: this.$route.params.sn })).then(res => {
+        return purchaseDetailList(Object.assign(parameter, { purchaseBillSn: this.$route.params.sn, orderBy: 'product_type.FIRST_CHAR,dealer_product.CODE' })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -187,7 +189,11 @@ export default {
   methods: {
     //  返回列表
     handleBack () {
-      this.$router.push({ path: '/purchasingManagement/purchaseOrder/list' })
+      if (this.$route.query.pageType) {
+        this.$router.push({ name: this.$route.query.pageType })
+      } else {
+        this.$router.push({ name: 'purchaseOrderList' })
+      }
     },
     //  详情
     getDetail () {

+ 18 - 13
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -32,13 +32,18 @@
             </a-col>
             <a-col :md="6" :sm="24" v-show="advanced">
               <a-form-item label="业务状态">
-                <v-select
+                <!-- <v-select
                   v-model="queryParam.billStatus"
                   ref="billStatus"
                   id="purchaseOrderList-billStatus"
                   code="PURCHASE_BILL_STATUS"
                   placeholder="请选择业务状态"
-                  allowClear></v-select>
+                  allowClear></v-select> -->
+                <a-select id="purchaseOrderList-billStatus" allowClear v-model="queryParam.billStatus" placeholder="请选择业务状态">
+                  <a-select-option value="">全部</a-select-option>
+                  <a-select-option value="WAIT_SUBMIT">待提交</a-select-option>
+                  <a-select-option value="SUBMIT">已提交</a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24" v-show="advanced">
@@ -106,9 +111,9 @@
           <span v-else>{{ record.purchaseBillNo }}</span>
         </template>
         <!-- 财务状态 -->
-        <template slot="financialStatus" slot-scope="text, record">
+        <!-- <template slot="financialStatus" slot-scope="text, record">
           <span>{{ record.billStatus=='FINISH'&&record.financialStatusDictValue ? record.financialStatusDictValue : '--' }}</span>
-        </template>
+        </template> -->
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -118,13 +123,13 @@
             v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')"
             @click="handleEdit(record)"
           >编辑</a-button>
-          <a-button
+          <!-- <a-button
             size="small"
             type="link"
             class="button-warning"
             v-if="record.billStatus == 'WAIT_PUT_WAREHOUSE'&&$hasPermissions('B_purchaseReceiving')"
             @click="handleWarehouse(record)"
-          >签收入库</a-button>
+          >签收入库</a-button> -->
           <a-button
             size="small"
             type="link"
@@ -132,7 +137,7 @@
             v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') &&$hasPermissions('B_purchaseDel')"
             @click="handleDel(record)"
           >删除</a-button>
-          <span v-if="record.billStatus != 'WAIT_SUBMIT'&&record.billStatus != 'AUDIT_REJECT'&&record.billStatus != 'WAIT_PUT_WAREHOUSE'">--</span>
+          <span v-if="!((record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')) && !((record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') &&$hasPermissions('B_purchaseDel'))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -183,15 +188,15 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: '14%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '供应商', dataIndex: 'purchaseTargetName', width: '14%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '供应商', dataIndex: 'purchaseTargetName', width: '13%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品款数', dataIndex: 'totalCategory', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购数量', dataIndex: 'totalQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '采购金额', dataIndex: 'discountedAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核数量', dataIndex: 'totalAuthQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '审核金额', dataIndex: 'totalAuthAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '缺货数量', dataIndex: 'totalCancelQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'financialStatusDictValue', scopedSlots: { customRender: 'financialStatus' }, width: '6%', align: 'center' },
+        { title: '审核数量', dataIndex: 'totalPushedQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核金额', dataIndex: 'totalPushedAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已取消数量', dataIndex: 'totalCancelQty', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象

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

@@ -77,7 +77,13 @@
               </template>
               <!-- 操作 -->
               <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" class="button-primary" @click="handleAdd(record)" id="purchaseReturnEdit-add-btn">添加</a-button>
+                <a-button
+                  size="small"
+                  type="primary"
+                  class="button-primary"
+                  :disabled="record.refundableQty==0"
+                  @click="handleAdd(record)"
+                  id="purchaseReturnEdit-add-btn">添加</a-button>
               </template>
             </s-table>
           </a-collapse-panel>

+ 325 - 0
src/views/purchasingManagement/signWarehousing/edit.vue

@@ -0,0 +1,325 @@
+<template>
+  <div class="purchaseOrderWarehousing-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderWarehousing-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span class="billno">
+            单号:{{ (detail&&detail[0]&&detail[0].purchaseBillNo) ? detail[0].purchaseBillNo : '--' }}
+            <span v-if="detail&&detail[0]&&detail[0].sendBillNo">(发货单号:{{ detail&&detail[0]&&detail[0].sendBillNo || '--' }})</span>
+          </span>
+        </template>
+      </a-page-header>
+      <!-- 内容 -->
+      <a-card size="small" v-for="(item,bindex) in detail" :key="item.id" :bordered="false" class="purchaseOrderWarehousing-cont">
+        <!-- 总计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message" >
+            <div>产品款数 <strong>{{ item.totalPutCategory }}</strong> ,本次发货数量合计 <strong>{{ item.totalPutQty }}</strong> ,本次发货金额合计¥<strong>{{ item.totalPutAmount }}</strong></div>
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          :ref="'table-'+bindex"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :tableId="item.receivingBillSn"
+          :index="bindex"
+          bordered>
+          <!-- 采购数量 -->
+          <template slot="origqty" slot-scope="text, record, index">
+            <div>{{ text }}</div>
+            <div v-if="record.origqty">原采购数量:{{ record.origqty }}</div>
+          </template>
+          <!-- 仓库仓位 -->
+          <template slot="warehousePosition" slot-scope="text, record, index">
+            <a-cascader
+              size="small"
+              @change="e => changeWarehouseCascade(e, record, index, bindex)"
+              v-model="record.warehouseCascade"
+              :disabled="!(item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT')"
+              expand-trigger="hover"
+              :options="warehouseCascadeData"
+              :fieldNames="{ label: 'name', value: 'sn', children: 'warehouseLocationList' }"
+              id="purchaseOrderWarehousing-warehouseCascade"
+              placeholder="请选择仓库仓位"
+              :allowClear="false"
+              style="width: 100%;" />
+          </template>
+        </s-table>
+        <div style="text-align: center;">
+          <a-button
+            type="primary"
+            class="button-warning"
+            :id="'purchaseOrderWarehousing-warehousing-'+bindex"
+            @click="handleWarehousing(item,bindex)"
+            v-if="item.auditState=='WAIT_PUT_WAREHOUSE' || item.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT'"
+          >确认入库</a-button>
+        </div>
+      </a-card>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { purchaseWriteStockIn, receivingQuery, receivingDetail } from '@/api/purchase'
+import { purchaseUpdateWarehouse } from '@/api/purchaseDetail'
+import ProductType from '../../common/productType.js'
+import ProductBrand from '../../common/productBrand.js'
+import { warehouseCascadeList } from '@/api/warehouse'
+export default {
+  components: { STable, VSelect, ProductType, ProductBrand },
+  data () {
+    return {
+      spinning: false,
+      detail: null, //  详情数据
+      productType: [],
+      queryParam: {
+        productBrandSn: undefined,
+        queryWord: '',
+        brand: '',
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '' //  产品三级分类
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      warehouseCascadeData: [], //  仓库仓位
+      defaultWarehouseCascade: [], //  默认仓库仓位
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购数量', dataIndex: 'qty', width: '6%', align: 'center', scopedSlots: { customRender: 'origqty' } },
+        { title: '本次发货数量', dataIndex: 'shippedQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次入库数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: '13%', align: 'center' }
+      ],
+      chooseLoadData: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.queryParam.receivingBillSn = parameter.tableId
+        return receivingDetail(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+            data.list[i].shippedQty = data.list[i].putQty
+            const warehouseSn = data.list[i].warehouseSn || undefined
+            const warehouseLocationSn = data.list[i].warehouseLocationSn || undefined
+            if (warehouseSn || warehouseLocationSn) {
+              data.list[i].warehouseSnBackups = warehouseSn
+              data.list[i].warehouseLocationSnBackups = warehouseLocationSn
+              data.list[i].warehouseCascade = [warehouseSn, warehouseLocationSn]
+            } else {
+              //  设置默认仓库
+              if (this.defaultWarehouseCascade.length > 0) {
+                data.list[i].warehouseCascade = this.defaultWarehouseCascade
+                data.list[i].warehouseSn = this.defaultWarehouseCascade[0]
+                data.list[i].warehouseLocationSn = this.defaultWarehouseCascade[1]
+              } else {
+                data.list[i].warehouseCascade = undefined
+              }
+            }
+          }
+          this.disabled = false
+          this.chooseLoadData[parameter.index] = data.list
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    //  重置产品库
+    resetSearchForm () {
+      this.queryParam = {
+        productBrandSn: undefined,
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '', //  产品三级分类
+        queryWord: '',
+        brand: ''
+      }
+      this.productType = []
+      this.$refs.table.refresh(true)
+    },
+    // 判断是否选择了仓库
+    hasChoseWarehousing (data) {
+      return data.find(item => !item.warehouseCascade || item.warehouseCascade.length == 0)
+    },
+    //  确认入库
+    handleWarehousing (row, index) {
+      const list = this.chooseLoadData[index]
+      if (this.hasChoseWarehousing(list)) {
+        this.$message.warning('请选择仓库仓位!')
+        return
+      }
+      this.spinning = true
+      purchaseWriteStockIn({ id: row.id }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          this.getDetail()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/purchasingManagement/signWarehousing/list', query: { closeLastOldTab: true } })
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    //  详情
+    getDetail () {
+      this.spinning = true
+      receivingQuery({ receivingBillSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.detail = res.data
+        } else {
+          this.detail = null
+        }
+        this.spinning = false
+      })
+    },
+    //  仓库仓位  级联  列表
+    getWarehouseCascade () {
+      const _this = this
+      warehouseCascadeList({}).then(res => {
+        if (res.status == 200) {
+          res.data.filter(item => {
+            // 过滤默认仓库
+            if (item.defaultFlag == 1 && item.wasteFlag == 0) { //  defaultFlag为1,且不是废品仓
+              _this.defaultWarehouseCascade[0] = item.warehouseSn
+              // 过滤默认仓位
+              item.warehouseLocationList.filter(subItem => {
+                if (subItem.defaultFlag == 1 && subItem.wasteFlag == 0) {
+                  _this.defaultWarehouseCascade[1] = subItem.warehouseLocationSn
+                  if (_this.detail && _this.detail.length > 0) {
+                    _this.detail.map((k, i) => {
+                      _this.$refs['table-' + i][0].refresh(true)
+                    })
+                  }
+                }
+              })
+            }
+          })
+          res.data.map(item => {
+            item.sn = item.warehouseSn
+            if (item.warehouseLocationList) {
+              item.warehouseLocationList.map(subItem => {
+                subItem.sn = subItem.warehouseLocationSn
+              })
+            }
+          })
+          this.warehouseCascadeData = res.data
+        } else {
+          this.warehouseCascadeData = []
+        }
+      })
+    },
+    // 修改仓库仓位
+    changeWarehouseCascade (val, opt, ind, bindex) {
+      let loadData = this.chooseLoadData[bindex][ind]
+      if (val.length == 1) {
+        this.$message.warning('当前仓库无仓位,请选择其他仓库')
+        const warehouseSnBackups = loadData.warehouseSnBackups || undefined
+        const warehouseLocationSnBackups = loadData.warehouseLocationSnBackups || undefined
+        loadData.warehouseSn = warehouseSnBackups
+        loadData.warehouseLocationSn = warehouseLocationSnBackups
+        if (warehouseSnBackups || warehouseLocationSnBackups) {
+          loadData.warehouseCascade = [warehouseSnBackups, warehouseLocationSnBackups]
+        } else {
+          loadData.warehouseCascade = undefined
+        }
+      } else {
+        loadData.warehouseSn = val[0] ? val[0] : ''
+        loadData.warehouseLocationSn = val[1] ? val[1] : ''
+        loadData.warehouseSnBackups = val[0] ? val[0] : ''
+        loadData.warehouseLocationSnBackups = val[1] ? val[1] : ''
+        loadData = this.chooseLoadData[bindex][ind]
+        this.updateWarehouse(loadData, bindex)
+      }
+    },
+    // 修改仓库
+    updateWarehouse (row, bindex) {
+      this.spinning = true
+      purchaseUpdateWarehouse({
+        id: row.id,
+        warehouseSn: row.warehouseSn,
+        warehouseLocationSn: row.warehouseLocationSn
+      }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+          console.log(bindex, this.$refs)
+          this.$refs['table-' + bindex][0].refresh()
+          this.spinning = false
+        } else {
+          this.spinning = false
+        }
+      })
+    },
+    pageInit () {
+      this.getDetail()
+      this.getWarehouseCascade()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .purchaseOrderWarehousing-wrap{
+    position: relative;
+    height: 100%;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+    .billno{
+      font-size: 14px;
+      font-weight: bold;
+      margin: 0 15px;
+    }
+    .purchaseOrderWarehousing-cont{
+      margin-top: 10px;
+    }
+  }
+</style>

+ 209 - 0
src/views/purchasingManagement/signWarehousing/list.vue

@@ -0,0 +1,209 @@
+<template>
+  <a-card size="small" :bordered="false" class="signWarehousingList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDateTime ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购单号">
+                <a-input id="signWarehousingList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="发货单号">
+                <a-input id="signWarehousingList-sendBillNo" v-model.trim="queryParam.sendBillNo" allowClear placeholder="请输入发货单号"/>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.auditState"
+                    ref="auditState"
+                    id="chainTransferOutList-auditState"
+                    code="RECEIVING_BILL_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </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="signWarehousingList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="signWarehousingList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
+        bordered>
+        <!-- 单号 -->
+        <template slot="purchaseBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_purchaseDetail')" @click="handleDetail(record)">{{ record.purchaseBillNo || '--' }}</span>
+          <span v-else>{{ record.purchaseBillNo || '--' }}</span>
+        </template>
+        <!-- 单号 -->
+        <template slot="sendBillNo" slot-scope="text, record">
+          <span style="color: #ed1c24;cursor: pointer;" v-if="$hasPermissions('B_signWarehousingDetail')" @click="handleStockDetail(record)">{{ record.sendBillNo || '--' }}</span>
+          <span v-else>{{ record.sendBillNo || '--' }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-warning"
+            v-if="(record.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT' || record.auditState == 'WAIT_PUT_WAREHOUSE')&&$hasPermissions('B_signWarehousingSign')"
+            @click="handleWarehouse(record)"
+          >签收入库</a-button>
+          <span v-if="!((record.auditState == 'PUT_WAREHOUSE_AUDIT_REJECT' || record.auditState == 'WAIT_PUT_WAREHOUSE')&&$hasPermissions('B_signWarehousingSign'))">--</span>
+        </template>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import rangeDateTime from '@/views/common/rangeDateTime.vue'
+import getDate from '@/libs/getDate.js'
+import { receivingStockList } from '@/api/receiving'
+export default {
+  components: { STable, VSelect, rangeDateTime },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      time: [
+        getDate.getCurrMonthDays().starttime + ' 00:00:00',
+        getDate.getCurrMonthDays().endtime + ' 23:59:59'
+      ],
+      queryParam: { //  查询条件
+        beginDate: getDate.getCurrMonthDays().starttime + ' 00:00:00',
+        endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
+        purchaseBillNo: '', //  采购单号
+        sendBillNo: '', //  发货单号
+        auditState: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      tableHeight: 0,
+      columns: [
+        { title: '采购单号', scopedSlots: { customRender: 'purchaseBillNo' }, width: '18%', align: 'center' },
+        { title: '发货单号', scopedSlots: { customRender: 'sendBillNo' }, width: '18%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '发货数量', dataIndex: 'totalPutQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发货金额', dataIndex: 'totalPutAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '入库时间', dataIndex: 'stockPutTime', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'auditStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return receivingStockList(Object.assign(parameter, this.queryParam)).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          this.disabled = false
+          this.spinning = false
+          return data
+        })
+      },
+      purchaseTragetType: []
+    }
+  },
+  methods: {
+    //  时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime + ' 00:00:00'
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
+      this.queryParam.purchaseBillNo = ''
+      this.queryParam.sendBillNo = ''
+      this.queryParam.auditState = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    handleDetail (row) {
+      this.$router.push({ path: `/purchasingManagement/purchaseOrder/detail/${row.purchaseBillSn}`, query: { pageType: 'signWarehousingList' } })
+    },
+    // 备货单详情
+    handleStockDetail (row) {
+      this.$router.push({ path: `/purchasingManagement/signWarehousing/stockOrderDetail/${row.receivingBillSn}` })
+    },
+    //  签收入库
+    handleWarehouse (row) {
+      this.$router.push({ path: `/purchasingManagement/signWarehousing/edit/${row.receivingBillSn}` })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 200
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      setTimeout(() => {
+        _this.setTableH()
+      }, 400)
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 202 - 0
src/views/purchasingManagement/signWarehousing/stockOrderDetail.vue

@@ -0,0 +1,202 @@
+<template>
+  <div class="signWarehousingDetail-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" @back="handleBack" class="signWarehousingDetail-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="signWarehousingDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+          <span class="billno">
+            单号:{{ detail&&detail.purchaseBillNo }}
+            <span v-if="detail&&detail.sendBillNo">(发货单号:{{ detail&&detail.sendBillNo || '--' }})</span>
+          </span>
+        </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <!-- <Print v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print> -->
+          <a-button
+            key="1"
+            type="primary"
+            class="button-warning"
+            v-if="$hasPermissions('B_signWarehousingExport')"
+            id="signWarehousingDetail-export-btn"
+            :disabled="localDataSource.length==0"
+            @click="handleExportProduct()">导出Excel</a-button>
+        </template>
+      </a-page-header>
+      <!-- 基础信息 -->
+      <a-card size="small" :bordered="false" class="purchaseOrderDetail-cont">
+        <a-collapse :activeKey="['1']">
+          <a-collapse-panel key="1" header="基础信息">
+            <a-descriptions :column="3">
+              <a-descriptions-item label="供应商">{{ (detail&&detail.purchaseTargetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="支付方式">{{ (detail&&detail.purchaseBill&&detail.purchaseBill.settleStyleEntity&&detail.purchaseBill.settleStyleEntity.name) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="采购员工" v-if="detail&&detail.purchaseBill&&detail.purchaseBill.purchaseBillSource=='PURCHASE'">{{ detail&&detail.purchaseBill&&detail.purchaseBill.operatorName || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货人">{{ detail&&detail.purchaseBill&&detail.purchaseBill.consigneeName || '--' }}<span v-if="detail&&detail.purchaseBill&&detail.purchaseBill.consigneeTel">({{ detail&&detail.purchaseBill&&detail.purchaseBill.consigneeTel }})</span></a-descriptions-item>
+              <a-descriptions-item label="收货地址">
+                <div v-if="detail&&detail.purchaseBill&&(detail.purchaseBill.shippingAddressProvinceName || detail.purchaseBill.shippingAddressCityName || detail.purchaseBill.shippingAddressCountyName || detail.purchaseBill.shippingAddress)">
+                  {{ detail&&detail.purchaseBill&&detail.purchaseBill.shippingAddressProvinceName || '' }}
+                  {{ detail&&detail.purchaseBill&&detail.purchaseBill.shippingAddressCityName || '' }}
+                  {{ detail&&detail.purchaseBill&&detail.purchaseBill.shippingAddressCountyName || '' }}
+                  {{ detail&&detail.purchaseBill&&detail.purchaseBill.shippingAddress || '' }}
+                </div>
+                <span v-else>--</span>
+              </a-descriptions-item>
+            </a-descriptions>
+          </a-collapse-panel>
+        </a-collapse>
+      </a-card>
+      <a-card size="small" :bordered="false" class="signWarehousingDetail-cont">
+        <!-- 总计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message">
+            产品款数:<strong>{{ detail && (detail.totalPutCategory || detail.totalPutCategory==0) ? detail.totalPutCategory : '--' }}</strong>,
+            本次发货数量合计:<strong>{{ detail && (detail.totalPutQty || detail.totalPutQty==0) ? detail.totalPutQty : '--' }}</strong>,
+            本次发货金额合计:<strong>{{ detail && (detail.totalPutAmount || detail.totalPutAmount==0) ? '¥'+detail.totalPutAmount : '--' }}</strong>,
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 采购数量 -->
+          <template slot="qty" slot-scope="text, record">
+            <div>{{ record.qty }}</div>
+          </template>
+          <!-- 缺货数量 -->
+          <template slot="outOfStockNum" slot-scope="text, record">
+            <span>{{ record.outOfStockNum }}</span>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import { STable, VSelect } from '@/components'
+import { purchaseDetailPrint, purchaseDetailExport, purchaseExportDetail } from '@/api/purchase'
+import { receivingDetailSn, receivingDetailList, receivingExport } from '@/api/receiving'
+import Print from '@/views/common/print.vue'
+import { hdPrint } from '@/libs/JGPrint'
+export default {
+  components: { STable, VSelect, Print },
+  data () {
+    return {
+      spinning: false,
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '17%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '原厂编码', dataIndex: 'dealerProductEntity.origCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采购单价', dataIndex: 'discountedPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '采购数量', width: '6%', align: 'center', scopedSlots: { customRender: 'qty' } },
+        { title: '本次发货数量', dataIndex: 'receivingQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '本次发货金额', dataIndex: 'discountedAmount', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次入库数量', dataIndex: 'putQty', width: '9%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        return receivingDetailList(Object.assign(parameter, { receivingBillSn: this.$route.params.sn })).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+            data.list[i].receivingQty = data.list[i].putQty
+          }
+          this.localDataSource = data.list
+          this.disabled = false
+          return data
+        })
+      },
+      detail: null, //  详情数据
+      localDataSource: [],
+      printerType: 'NEEDLE' //  打印机类型
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ path: '/purchasingManagement/signWarehousing/list', query: { closeLastOldTab: true } })
+    },
+    //  详情
+    getDetail () {
+      receivingDetailSn({ sn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.detail = res.data
+        } else {
+          this.detail = null
+        }
+      })
+    },
+    // 打印预览/快捷打印
+    handlePrint (type, printerType) {
+      const _this = this
+      _this.spinning = true
+      let url = purchaseDetailPrint
+      let params = { sn: this.$route.params.sn, type: printerType }
+      if (type == 'export') { //  导出
+        url = purchaseExportDetail
+        params = { sn: this.$route.params.sn }
+      }
+      // 打印或导出
+      hdPrint(printerType, type, url, params, '备货单', function () {
+        _this.spinning = false
+      })
+    },
+    // 导出产品
+    handleExportProduct () {
+      const _this = this
+      _this.spinning = true
+      // 打印或导出
+      hdPrint('', 'export', receivingExport, { receivingBillSn: this.$route.params.sn }, '备货单', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .signWarehousingDetail-cont{
+    margin-bottom: 10px;
+    .timeline-box{
+      margin-top: 30px;
+      .auxiliary-txt{
+        color: #808695;
+      }
+    }
+  }
+  .signWarehousingDetail-wrap{
+    .billno{
+      font-size: 16px;
+      font-weight: bold;
+      margin: 0 15px;
+    }
+  }
+</style>

+ 1 - 1
src/views/salesManagement/salesQuery/chooseCustomModal.vue

@@ -167,7 +167,7 @@
                 type="textarea"
                 :maxLength="100"
                 v-model="form.remarks"
-                placeholder="请输入联系电话(最多100个字符)"
+                placeholder="请输入备注(最多100个字符)"
                 allowClear />
             </a-form-model-item>
           </a-col>

+ 3 - 2
vue.config.js

@@ -108,8 +108,9 @@ 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:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md', //  Ô¤·¢²¼
+        // target: 'http://192.168.16.103:8503/qpls-md',
+        target: 'https://t.qpls.360arrow.com/qpls-md', //  Á·Ï°
+        // target: 'http://p.iscm.360arrow.com/qpls-md', //  Ô¤·¢²¼
         // target: 'http://qpls-md.360arrow.com/qpls-md', //  Éú²ú
         // ws: false,
         ws: true,