Kaynağa Gözat

增加摘要

lilei 3 hafta önce
ebeveyn
işleme
0a7233ad9b

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/add.vue

@@ -44,7 +44,7 @@
           <a-descriptions-item label="主题" :span="3">{{ detailData&&detailData.title || '--' }}</a-descriptions-item>
           <a-descriptions-item label="详细说明" :span="4">{{ detailData&&detailData.content.join(',')||'' }}</a-descriptions-item>
           <a-descriptions-item label="摘要" :span="4">
-            {{ detailData.abstract||'' }}
+            {{ detailData.digestInfo||'' }}
           </a-descriptions-item>
           <a-descriptions-item label="附件" :span="4">
             <a

+ 6 - 6
src/views/expenseManagement/expenseReimbursement/baseDataModal.vue

@@ -97,11 +97,11 @@
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-            <a-form-model-item label="摘要" prop="abstract" :label-col="{span:3}" :wrapper-col="{span:19}">
+            <a-form-model-item label="摘要" prop="digestInfo" :label-col="{span:3}" :wrapper-col="{span:19}">
               <a-textarea
-                id="expenseReimbursementAddform-abstract"
-                placeholder="请详细描述费用报销内容(最多30个字符)"
-                v-model.trim="form.abstract"
+                id="expenseReimbursementAddform-digestInfo"
+                placeholder="请输入费用报销摘要(最多30个字符)"
+                v-model.trim="form.digestInfo"
                 :maxLength="30"
                 allowClear/>
             </a-form-model-item>
@@ -184,7 +184,7 @@ export default {
         expenseDate: moment().locale('zh-cn').format('YYYY-MM'), //  费用产生月
         title: '', // 主题
         content: '', // 费用说明
-        abstract: '' // 摘要
+        digestInfo: '' // 摘要
       }
     }
   },
@@ -209,7 +209,7 @@ export default {
         content: [
           { required: true, message: '请输入详细说明', trigger: 'blur' }
         ],
-        abstract: [
+        digestInfo: [
           { required: this.form.expenseTypeName == '促销费用', message: '请输入摘要', trigger: 'blur' }
         ]
       }

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -63,7 +63,7 @@
             {{ detailData.content.join(',')||'' }}
           </a-descriptions-item>
           <a-descriptions-item label="摘要" :span="4">
-            {{ detailData.abstract||'' }}
+            {{ detailData.digestInfo||'' }}
           </a-descriptions-item>
           <a-descriptions-item label="附件" :span="4">
             <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.expenseAccountFilesList" :key="item.id">

+ 6 - 6
src/views/financialManagement/accountStatement/baseModal.vue

@@ -17,7 +17,7 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol">
         <a-form-model-item label="客户名称" prop="dealerSn">
-          <dealerSubareaScopeList :disabled="!!bookSn" ref="settleClientName" @change="custChange" />
+          <dealerSubareaScopeList :disabled="!!itemSn" ref="settleClientName" @change="custChange" />
         </a-form-model-item>
         <a-form-model-item label="备注">
           <a-textarea :rows="4" :maxLength="300" placeholder="请输入备注(最多300个字符)" v-model="form.remarks"></a-textarea>
@@ -42,7 +42,7 @@ export default {
   components: { VSelect, dealerSubareaScopeList },
   props: {
     show: [Boolean],
-    bookSn: {
+    itemSn: {
       type: String,
       default: ''
     }
@@ -100,11 +100,11 @@ export default {
         if (res.status == 200) {
           _this.$message.success(res.message)
           // 编辑
-          if (this.bookSn) {
+          if (this.itemSn) {
             _this.$emit('refashData')
           } else {
             // 新增
-            _this.$router.push({ name: 'accountStatementEdit', params: { sn: res.data.bookSn } })
+            _this.$router.push({ name: 'accountStatementEdit', params: { sn: res.data.verifyAccountBillSn } })
           }
           _this.cancel()
           _this.spinning = false
@@ -118,7 +118,7 @@ export default {
       this.title = '编辑对账单'
       this.spinning = true
       this.confirmLoading = true
-      financeBookFindBySn({ bookSn: this.bookSn }).then(res => {
+      financeBookFindBySn({ itemSn: this.itemSn }).then(res => {
         if (res.status == 200) {
           const data = res.data
           this.form = Object.assign(this.form, data)
@@ -153,7 +153,7 @@ export default {
         remarks: ''
       }
       //  编辑页
-      if (this.bookSn) {
+      if (this.itemSn) {
         this.getDetail()
       }
     }

+ 37 - 60
src/views/financialManagement/accountStatement/edit.vue

@@ -8,8 +8,8 @@
             <a-icon type="left" />
             返回列表
           </a>
-          <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailsData&&detailsData.sparePartsReturnNo }}</span>
-          <span style="margin: 0 10px;color: #666;">客户名称:{{ detailsData && detailsData.supplier && detailsData.supplier.supplierName }}</span>
+          <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailsData&&detailsData.verifyAccountBillNo }}</span>
+          <span style="margin: 0 10px;color: #666;">客户名称:{{ detailsData && detailsData.supplier && detailsData.dealerName }}</span>
           <a-button type="link" size="small" class="button-default" @click.stop="handleEditBase" >
             <a-icon type="edit" /> 编辑备注
           </a-button>
@@ -27,9 +27,9 @@
         <a-alert style="margin-bottom: 10px;" type="info">
           <div slot="message" class="total-bar">
             <div v-if="detailData">
-              <span>余额:{{ detailData && (detailData.qty || detailData.qty == 0) ? detailData.qty : '--' }};</span>
-              <span>借方:{{ detailData && (detailData.qty || detailData.qty == 0) ? detailData.qty : '--' }};</span>
-              <span>贷方:{{ detailData && (detailData.qty || detailData.qty == 0) ? detailData.qty : '--' }};</span>
+              <span>余额:{{ detailData && (detailData.totalAmount || detailData.totalAmount == 0) ? detailData.totalAmount : '--' }};</span>
+              <span>借方:{{ detailData && (detailData.debitAmount || detailData.debitAmount == 0) ? detailData.debitAmount : '--' }};</span>
+              <span>贷方:{{ detailData && (detailData.creditorAmount || detailData.creditorAmount == 0) ? detailData.creditorAmount : '--' }};</span>
             </div>
           </div>
         </a-alert>
@@ -43,27 +43,29 @@
                   </a-form-item>
                 </a-col>
                 <a-col :md="4" :sm="24">
-                  <a-form-item label="订单单号"><a-input id="accountStatement-orderNO" v-model.trim="productForm.sparePartsNo" allowClear placeholder="请输入入库单号" /></a-form-item>
+                  <a-form-item label="业务单号">
+                    <a-input id="accountStatement-bizNo" v-model.trim="productForm.bizNo" allowClear placeholder="请输入业务单号" />
+                  </a-form-item>
                 </a-col>
                 <a-col :md="4" :sm="24">
                   <a-form-item label="借贷类型">
                     <v-select
-                      v-model="productForm.status"
-                      ref="status"
-                      id="accountStatement-status"
+                      v-model="productForm.changeType"
+                      ref="changeType"
+                      id="accountStatement-changeType1"
                       code="FINANCE_BOOK_STATE"
                       placeholder="请选择借贷类型"
                       allowClear></v-select>
                   </a-form-item>
                 </a-col>
                 <a-col :md="4" :sm="24">
-                  <a-form-item label="单据类型">
+                  <a-form-item label="业务类型">
                     <v-select
-                      v-model="productForm.status"
-                      ref="status"
-                      id="accountStatement-status"
+                      v-model="productForm.bizType"
+                      ref="bizType1"
+                      id="accountStatement-bizType1"
                       code="FINANCE_BOOK_STATE"
-                      placeholder="请选择单据类型"
+                      placeholder="请选择业务类型"
                       allowClear></v-select>
                   </a-form-item>
                 </a-col>
@@ -155,18 +157,17 @@ export default {
       isInster: false, // 是否正在添加产品
       delLoading: false,
       productForm: {
-        productName: '',
-        productCode: '',
-        sparePartsNo: '',
-        orderBy: 'sprd.CREATE_DATE DESC'
+        beginDate: '',
+        endDate: '',
+        bizNo: '',
+        changeType: undefined,
+        bizType: undefined
       },
       creatDate: [],
-      bookSn: null,
-      sparePartsReturnNo: null,
+      verifyAccountBillNo: null,
       chooseList: [],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        this.productForm.bookSn = this.bookSn
         return sparePartsReturnQueryPage(Object.assign(parameter, this.productForm)).then(res => {
           let data
           if (res.status == 200) {
@@ -192,10 +193,10 @@ export default {
       const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '年', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '月', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '日', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务单号', dataIndex: 'sparePartsNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '年', dataIndex: 'bizNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月', dataIndex: 'bizNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '日', dataIndex: 'bizNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单据类型', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'product.name', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '费用/调拨类型', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -258,41 +259,17 @@ export default {
     },
     //  重置
     resetSearchForm (flag) {
-      this.productForm.productName = ''
-      this.productForm.productCode = ''
-      this.productForm.sparePartsNo = ''
+      this.productForm.beginDate = ''
+      this.productForm.endDate = ''
+      this.productForm.bizNo = ''
+      this.productForm.changeType = undefined
+      this.productForm.bizType = undefined
+      this.productForm.bizStatus = undefined
       this.creatDate = []
       this.$refs.rangeDate.resetDate(this.creatDate)
       this.$refs.table.refresh(!!flag)
     },
-    // 已选产品  blur
-    onCellBlur (val, record) {
-      if (val * 1 > record.putQty * 1) {
-        this.$message.warning('申请退货数量不能大于入库数量!')
-        this.$refs.table.refresh(true)
-        return
-      }
-      const ajax_data = {
-        bookSn: this.bookSn,
-        sparePartsReturnNo: this.sparePartsReturnNo,
-        sparePartsDetailSn: record.sparePartsDetailSn,
-        productSn: record.productSn,
-        sparePartsReturnDetailSn: record.sparePartsReturnDetailSn,
-        stockDetailSn: record.stockDetailSn,
-        productCode: record.productCode,
-        putQty: record.putQty, // 入库数量
-        returnedQty: record.returnedQty, // 已退数量
-        qty: val, // 申退数量
-        cost: record.cost, // 成本
-        stockBatchNo: record.stockBatchNo, // 批次号
-        warehouseSn: record.warehouseSn, // 仓库sn
-        warehouseLocationSn: record.warehouseLocationSn, // 仓位sn
-        sparePartsNo: record.sparePartsNo,
-        sparePartsSn: record.sparePartsSn
-      }
-      this.saveEdit(ajax_data)
-    },
-    // 添加或修改产品
+    // 添加或修改单据
     saveProduct (row) {
       if (this.isInster) {
         // 防止多次添加产品
@@ -301,7 +278,7 @@ export default {
       this.isInster = true
       const paramsData = {
         bookSn: this.bookSn,
-        sparePartsReturnNo: this.sparePartsReturnNo,
+        verifyAccountBillNo: this.verifyAccountBillNo,
         sparePartsDetailSn: row.sparePartsDetailSn,
         productSn: row.productSn,
         stockDetailSn: row.stockDetailSn,
@@ -313,7 +290,7 @@ export default {
         stockBatchNo: row.sparePartsBatchNo, // 批次号
         warehouseSn: row.warehouseSn, // 仓库sn
         warehouseLocationSn: row.warehouseLocationSn, // 仓位sn
-        sparePartsNo: row.sparePartsNo,
+        bizNo: row.bizNo,
         sparePartsSn: row.sparePartsSn
       }
       this.saveEdit(paramsData)
@@ -328,7 +305,7 @@ export default {
       data.forEach(item => {
         const obj = {
           bookSn: this.bookSn,
-          sparePartsReturnNo: this.sparePartsReturnNo,
+          verifyAccountBillNo: this.verifyAccountBillNo,
           sparePartsDetailSn: item.sparePartsDetailSn,
           productSn: item.productSn,
           stockDetailSn: item.stockDetailSn,
@@ -340,7 +317,7 @@ export default {
           stockBatchNo: item.sparePartsBatchNo, // 批次号
           warehouseSn: item.warehouseSn, // 仓库sn
           warehouseLocationSn: item.warehouseLocationSn, // 仓位sn
-          sparePartsNo: item.sparePartsNo,
+          bizNo: item.bizNo,
           sparePartsSn: item.sparePartsSn
         }
         ajax_data.push(obj)

+ 26 - 25
src/views/financialManagement/accountStatement/list.vue

@@ -17,13 +17,13 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="对账单号">
-                <a-input id="accountStatement-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入对账单号"/>
+                <a-input id="accountStatement-verifyAccountBillNo" v-model.trim="queryParam.verifyAccountBillNo" allowClear placeholder="请输入对账单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="业务状态">
                 <v-select
-                  v-model="queryParam.status"
+                  v-model="queryParam.billStatus"
                   ref="status"
                   id="accountStatement-status"
                   code="FINANCE_BOOK_STATE"
@@ -44,7 +44,7 @@
         <!-- 操作按钮 -->
         <div class="table-operator">
           <div class="flex-center">
-            <a-button type="primary" v-if="$hasPermissions('B_fc_new')" @click="handleAdd">新增</a-button>
+            <a-button type="primary" @click="handleAdd">新增</a-button>
             <div class="tongji-bar"></div>
           </div>
           <div></div>
@@ -63,23 +63,23 @@
           :defaultLoadData="false"
           bordered>
           <!-- 单号 -->
-          <template slot="bookNo" slot-scope="text, record">
-            <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="handleDetail(record)">{{ record.bookNo }}</span>
-            <span v-else>{{ record.bookNo }}</span>
+          <template slot="verifyAccountBillNo" slot-scope="text, record">
+            <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="handleDetail(record)">{{ record.verifyAccountBillNo }}</span>
+            <span v-else>{{ record.verifyAccountBillNo }}</span>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button
-              v-if="record.status=='WAIT_SUBMIT'"
               size="small"
               type="link"
+              v-if="record.billStatus=='WAIT_SUBMIT'||record.billStatus=='WAIT_CONFIRM'"
               class="button-info"
               @click="handleEdit(record)"
             >
               编辑
             </a-button>
             <a-button
-              v-if="record.status=='WAIT_SUBMIT'"
+              v-if="record.billStatus=='WAIT_SUBMIT'||record.billStatus=='WAIT_CONFIRM'"
               size="small"
               type="link"
               class="button-error"
@@ -88,7 +88,7 @@
               删除
             </a-button>
             <a-button
-              v-if="record.status=='AUDIT_REJECT'"
+              v-if="record.billStatus=='WAIT_CONFIRM'"
               size="small"
               type="link"
               class="button-info"
@@ -97,7 +97,7 @@
               对单
             </a-button>
             <a-button
-              v-if="record.status=='AUDIT_PASS'"
+              v-if="record.billStatus=='WAIT_VERIFY'"
               size="small"
               type="link"
               class="button-info"
@@ -109,9 +109,9 @@
         </s-table>
       </a-spin>
       <!-- 基础信息 -->
-      <baseModal v-drag :show="baseModal" :bookSn="itemSn" @cancel="baseModal=false"></baseModal>
+      <baseModal v-drag :show="baseModal" :itemSn="itemSn" @cancel="baseModal=false"></baseModal>
       <!-- 对单 -->
-      <confrontModal v-drag :show="openModal" :bookSn="itemSn" @cancel="openModal=false"></confrontModal>
+      <confrontModal v-drag :show="openModal" :itemSn="itemSn" @cancel="openModal=false"></confrontModal>
     </a-card>
   </div>
 </template>
@@ -136,14 +136,14 @@ export default {
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
-        bookNo: '',
-        dealerName: '',
-        status: undefined
+        verifyAccountBillNo: '',
+        dealerName: undefined,
+        dealerSn: undefined,
+        billStatus: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       creatDate: [], //  创建时间
       itemSn: null,
-      itemId: null,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
@@ -174,12 +174,12 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对账单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
-        { title: '客户名称', dataIndex: 'payerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '余额', dataIndex: 'orderTotalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-        { title: '对单时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对账时间', dataIndex: 'updateDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账单号', scopedSlots: { customRender: 'verifyAccountBillNo' }, width: '8%', align: 'center' },
+        { title: '客户名称', dataIndex: 'dealerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '余额', dataIndex: 'totalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '对单时间', dataIndex: 'confirmDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账时间', dataIndex: 'verifyDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       return arr
@@ -197,9 +197,10 @@ export default {
       this.$refs.rangeDate.resetDate(this.creatDate)
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.dealerName = ''
-      this.queryParam.bookNo = ''
-      this.queryParam.status = undefined
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSn = undefined
+      this.queryParam.verifyAccountBillNo = ''
+      this.queryParam.billStatus = undefined
       this.$refs.table.refresh(true)
     },
     // 新增

+ 46 - 116
src/views/financialManagement/accountStatement/queryPart.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="accountStatement-wrap">
+  <div class="accountStatement-query-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
       <div style="width:100%">
@@ -7,94 +7,51 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="时间">
-                <rangeDate id="accountStatement-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+                <rangeDate id="accountStatement-query-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="业务单号">
-                <a-input id="accountStatement-productCode" v-model.trim="queryParam.sparePartsNo" allowClear placeholder="请输入业务单号"/>
+                <a-input id="accountStatement-query-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="借贷类型">
                 <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatement-status"
-                  code="FINANCE_BOOK_STATE"
-                  placeholder="请选择状态"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="借贷类型">
-                <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatement-status"
+                  v-model="queryParam.changeType"
+                  ref="jdType"
+                  id="accountStatement-query-jdType"
                   code="FINANCE_BOOK_STATE"
                   placeholder="请选择借贷类型"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="单据类型">
+              <a-form-item label="业务类型">
                 <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatement-status"
+                  v-model="queryParam.bizType"
+                  ref="bizType"
+                  id="accountStatement-query-bizType"
                   code="FINANCE_BOOK_STATE"
                   placeholder="请选择单据类型"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="备货单状态">
+              <a-form-item label="业务状态">
+                <!-- 备货单状态,销售退货单,调拨单,费用报销单 -->
                 <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatement-status"
-                  code="DISPATCH_BILL_STATUS"
-                  placeholder="请选择备货单状态"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="销售退货单状态">
-                <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatement-status"
-                  code="SALES_RETURN_BILL_STATUS"
-                  placeholder="请选择销售退货单状态"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="调拨单状态">
-                <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatement-status"
-                  code="ALLOCATE_STATUS"
-                  placeholder="请选择调拨单状态"
-                  allowClear></v-select>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="费用报销单状态">
-                <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatement-status"
-                  code="EXPENSE_STATE"
-                  placeholder="请选择费用报销单状态"
+                  v-model="queryParam.bizStatus"
+                  ref="bizStatus"
+                  id="accountStatement-query-bizStatus"
+                  :code="['DISPATCH_BILL_STATUS','SALES_RETURN_BILL_STATUS','ALLOCATE_STATUS','EXPENSE_STATE'][0]"
+                  placeholder="请选择业务状态"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
             <a-col :md="4" :sm="24">
-              <a-button type="primary" @click="$refs.chooseTable.refresh(true)" id="accountStatement-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" id="accountStatement-reset">重置</a-button>
+              <a-button type="primary" @click="$refs.chooseTable.refresh(true)" id="accountStatement-query-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" id="accountStatement-query-reset">重置</a-button>
             </a-col>
             <a-col :md="24" :sm="24" style="margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between;">
               <div>
@@ -121,7 +78,7 @@
       :scroll="{ y: 300 }"
       bordered>
       <!-- 备注 -->
-      <template slot="remark" slot-scope="text, record">
+      <template slot="remarks" slot-scope="text, record">
         <div @dblclick.stop>
           <a-input
             size="small"
@@ -137,10 +94,8 @@
           type="link"
           class="button-info"
           :loading="newLoading"
-          v-if="record.currentStockQty != 0 && !record.isCheckedFlag"
           @click="handleAdd(record)"
-        >添加</a-button>
-        <span v-else>--</span>
+        >选择</a-button>
       </template>
     </s-table>
   </div>
@@ -166,14 +121,12 @@ export default {
     return {
       buyerSn: '',
       queryParam: { //  查询条件
-        productName: '', // 产品名称
-        productCode: '', //  产品编码
         beginDate: '',
         endDate: '',
-        sparePartsNo: '',
-        isZero: 0,
-        createDate: undefined,
-        grabFlag: ''
+        bizNo: '',
+        changeType: undefined,
+        bizType: undefined,
+        bizStatus: undefined
       },
       creatDate: [], //  创建时间
       rowSelectionInfo: null,
@@ -182,9 +135,6 @@ export default {
       warehouseSn: null,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        this.queryParam.supplierSn = this.buyerSn
-        this.queryParam.createDate = '2023-01-01 00:00:00'
-        this.queryParam.warehouseSn = this.warehouseSn
         return queryDetailStockPage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
@@ -192,8 +142,6 @@ 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
-              data.list[i].qty = data.list[i].currentStockQty
-              data.list[i].isCheckedFlag = this.repeatList.findIndex(item => { return item == data.list[i].sparePartsDetailSn }) > -1
             }
           }
           return data
@@ -205,18 +153,18 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '年', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '月', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '日', dataIndex: 'sparePartsNo', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务单号', dataIndex: 'sparePartsNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据类型', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'product.name', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '年', dataIndex: 'year', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月', dataIndex: 'month', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '日', dataIndex: 'day', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务类型', dataIndex: 'bizType', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'bizStatus', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '费用/调拨类型', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '摘要', dataIndex: 'sparePartsBatchNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客诉索赔编码', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-        { title: '借方', dataIndex: 'productCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
-        { title: '贷方', dataIndex: 'productCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
-        { title: '备注', scopedSlots: { customRender: 'remark' }, width: '15%', align: 'center' },
+        { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
+        { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
+        { title: '备注', scopedSlots: { customRender: 'remarks' }, width: '15%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       return arr
@@ -233,28 +181,18 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.productName = ''
-      this.queryParam.productCode = ''
-      this.queryParam.sparePartsNo = ''
+      this.queryParam.bizNo = ''
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.bizNo = ''
+      this.queryParam.changeType = undefined
+      this.queryParam.bizType = undefined
+      this.queryParam.bizStatus = undefined
       this.creatDate = []
       this.$refs.rangeDate.resetDate(this.creatDate)
       this.$refs.chooseTable.refresh(true)
     },
-    onChange (e) {
-      this.isChecked = !this.isChecked
-      this.queryParam.isZero = e.target.checked ? 1 : 0
-      this.$refs.chooseTable.refresh()
-    },
-    //  入库时间  change
-    dateChange (date) {
-      this.queryParam.beginDate = date[0] ? date[0] : ''
-      this.queryParam.endDate = date[1] ? date[1] : ''
-    },
-    pageInit (buyerSn, returnSn, warehouseSn, grabFlag) {
-      this.buyerSn = buyerSn
-      this.queryParam.grabFlag = grabFlag
-      this.warehouseSn = warehouseSn
-      this.getRepeatResult(returnSn)
+    pageInit () {
       this.$refs.chooseTable.refresh()
       // this.$refs.chooseTable.clearSelected()
     },
@@ -282,26 +220,18 @@ export default {
     },
     // 批量添加
     handleBatchAdd () {
-      console.log(this.rowSelectionInfo)
       const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys
       if (!row || row.length == 0) {
-        this.$message.warning('请先选择要添加的产品!')
+        this.$message.warning('请先选择单据!')
         return
       }
       this.$emit('bachAdd', this.rowSelectionInfo.selectedRows)
-    },
-    getRepeatResult (sn) {
-      queryDetailSnListBySn({ sn }).then(res => {
-        if (res.status == 200) {
-          this.repeatList = res.data
-        }
-      })
     }
   }
 }
 </script>
 <style lang="less" scoped>
-  .accountStatement-wrap{
+  .accountStatement-query-wrap{
     .redBg-row{
       background-color: #f5cdc8;
     }

+ 15 - 14
src/views/financialManagement/manualEntryForm/baseModal.vue

@@ -19,22 +19,22 @@
         <a-form-model-item label="客户名称" prop="dealerSn">
           <dealerSubareaScopeList id="manualEntryForm-dealer" :disabled="!!bookSn" ref="settleClientName" @change="custChange" />
         </a-form-model-item>
-        <a-form-model-item label="借贷类型" prop="dealerSn">
+        <a-form-model-item label="借贷类型" prop="changeType">
           <v-select
-            v-model="form.status"
-            ref="status"
+            v-model="form.changeType"
+            ref="changeType"
             type="radio"
             id="manualEntryForm-type"
             code="FINANCE_BOOK_STATE"
             placeholder="请选择借贷类型"
             allowClear></v-select>
         </a-form-model-item>
-        <a-form-model-item label="借贷金额" prop="dealerSn">
+        <a-form-model-item label="借贷金额" prop="changeAmount">
           <a-input-number
             id="manualEntryForm-amount"
             :min="0"
             :max="99999999"
-            v-model.trim="form.dealerName"
+            v-model.trim="form.changeAmount"
             allowClear
             style="width:200px;"
             placeholder="请输入借贷金额"/>
@@ -48,6 +48,8 @@
           <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
         </a-form-model-item>
       </a-form-model>
+      <!-- 提交  选择审批人员 -->
+      <chooseDepartUserModal :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSave"></chooseDepartUserModal>
     </a-spin>
   </a-modal>
 </template>
@@ -55,12 +57,14 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
+// 组件
+import chooseDepartUserModal from './chooseDepartUserModal.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { financeBookSave, financeBookFindBySn } from '@/api/financeBook.js'
 export default {
   name: 'ASBaseModal',
   mixins: [commonMixin],
-  components: { VSelect, dealerSubareaScopeList },
+  components: { VSelect, dealerSubareaScopeList, chooseDepartUserModal },
   props: {
     show: [Boolean],
     bookSn: {
@@ -72,6 +76,7 @@ export default {
     return {
       opened: this.show,
       spinning: false,
+      openDepartUserModal: false,
       disabled: false,
       title: '调账',
       confirmLoading: false,
@@ -82,6 +87,8 @@ export default {
       form: {
         dealerSn: undefined,
         dealerName: undefined,
+        changeType: undefined,
+        changeAmount: undefined,
         remarks: ''
       },
       rules: {
@@ -120,14 +127,8 @@ export default {
       financeBookSave(form).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
-          // 编辑
-          if (this.bookSn) {
-            _this.$emit('refashData')
-          } else {
-            // 新增
-            _this.$router.push({ name: 'accountStatementEdit', params: { sn: res.data.bookSn } })
-          }
-          _this.cancel()
+          // 选择审批人员
+          // _this.cancel()
           _this.spinning = false
         } else {
           _this.spinning = false

+ 185 - 0
src/views/financialManagement/manualEntryForm/chooseDepartUserModal.vue

@@ -0,0 +1,185 @@
+<template>
+  <a-modal
+    centered
+    class="departUser-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="选择审批人员"
+    v-model="isShow"
+    @cancel="cancel"
+    width="60%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div>
+        <div class="departUser-con">
+          <a-form-model
+            id="departUser-form"
+            ref="ruleForm"
+            :model="form"
+            :rules="rules"
+            :label-col="formItemLayout.labelCol"
+            :wrapper-col="formItemLayout.wrapperCol">
+            <a-form-model-item label="申请人员" prop="applyPersonSn">
+              <employee style="width: 100%;" @change="employeeChange" id="departUser-Employee" v-model="form.applyPersonSn"></employee>
+            </a-form-model-item>
+            <a-form-model-item label="审批人员" prop="approvers">
+              <dingDepartUser
+                ref="departUserApp"
+                @loaded="uploading=false"
+                id="departUser-approvers"
+                :disabled="uploading"
+                v-model="form.approvers"
+                @change="changeApprovers"
+                allowClear
+                placeholder="请选择审批人员"
+              ></dingDepartUser>
+            </a-form-model-item>
+            <a-form-model-item label="抄送人" prop="ccList">
+              <dingDepartUser
+                ref="departUserCc"
+                @loaded="uploading=false"
+                :disabled="uploading"
+                id="departUser-ccList"
+                v-model="form.ccList"
+                allowClear
+                placeholder="请选择抄送人"
+              ></dingDepartUser>
+            </a-form-model-item>
+          </a-form-model>
+        </div>
+        <div class="btn-cont">
+          <a-button type="primary" id="departUser-save" @click="handleSave">确定</a-button>
+          <a-button :loading="uploading" style="margin-left: 15px;" @click="updateUser">刷新人员</a-button>
+          <a-button id="departUser-back" @click="cancel" style="margin-left: 15px;">取消</a-button>
+        </div>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { VSelect, Upload } from '@/components'
+import dingDepartUser from '@/views/common/dingDepartUser.js'
+import employee from '@/views/expenseManagement/expenseReimbursement/employee.js'
+import { sign } from 'core-js/fn/number'
+export default {
+  name: 'ChooseDepartUserModal',
+  components: { dingDepartUser, employee, VSelect, Upload },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      uploading: false,
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        applyPersonSn: undefined,
+        approvers: [], // 审批人
+        ccList: [] // 抄送人
+      },
+      rules: {
+        applyPersonSn: [
+          { required: true, message: '请选择申请人员', trigger: 'change' }
+        ],
+        approvers: [
+          { required: true, type: 'array', message: '请选择审批人员', trigger: 'change' }
+        ]
+      }
+    }
+  },
+  methods: {
+    // 申请人员
+    employeeChange (v, r) {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.validateField(['applyPersonSn'])
+      })
+    },
+    updateUser () {
+      this.uploading = true
+      this.$refs.departUserApp.updateDeptUser()
+      this.$refs.departUserCc.updateDeptUser()
+    },
+    changeApprovers (value) {
+      this.form.approvers = value
+      this.$refs.ruleForm.clearValidate()
+    },
+    getTreeVal (data) {
+      const ret = []
+      data.map(item => {
+        ret.push(item.value)
+      })
+      return ret.join(',')
+    },
+    // 确定
+    handleSave (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = JSON.parse(JSON.stringify(_this.form))
+          if (form.approvers) {
+            form.approvers = this.getTreeVal(form.approvers)
+          }
+          if (form.ccList) {
+            form.ccList = this.getTreeVal(form.ccList)
+          }
+          this.$emit('submit', form)
+          this.$emit('close')
+        } else {
+          return false
+        }
+      })
+    },
+    getDetail (data) {
+      this.form = Object.assign(this.form, {
+        applyPersonSn: data.applyPersonSn
+      })
+    },
+    resetForm () {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.resetFields()
+      })
+      this.form = {
+        applyPersonSn: undefined,
+        ccList: undefined,
+        approvers: undefined
+      }
+    },
+    cancel () {
+      this.isShow = false
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .departUser-modal{
+    .ant-modal-body {
+      padding: 30px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.10/ocs-admin',
+        target: 'http://192.168.2.103:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {