浏览代码

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

achao 3 年之前
父节点
当前提交
9f4d073cf7

+ 3 - 0
src/api/V2/houseSelfCollect/index.js

@@ -97,3 +97,6 @@ export const API_GAT_GETQRCODE = '/weighingManagement/getQRcode'
 export const API_GAT_INFO = '/commonSysParameter/getInfo'
 // 审核之后接口
 export const API_POST_WORKFLOW_TASK = `/newWorkflow/getTaskWebsocket`
+// 反结算
+// export const API_POST_SUSPENDINSTANCE ='/api/suspendInstance'
+export const API_POST_SUSPENDINSTANCE ='/paymentManagement/api/ReSettlement'

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -96,6 +96,8 @@ export const API_GET_TURNAROUND_LIST = '/turnInfo/selectTurnInfo'
 export const API_GET_TURNAROUND_XIALA = '/turnInfo/getPositionAndGoodsName'
 //折转后货名
 export const API_get_goodsName_All = '/commonSysParameter/getInfo'
+//退回
+export const API_SEND_BACK ='/warehouseInOutInfo/returnWarehouse'
 
 
 

+ 4 - 1
src/model/houseSelfCollect/index.js

@@ -50,7 +50,8 @@ import {
   API_GAT_QRCODE,
   API_GAT_GETQRCODE,
   API_GAT_INFO,
-  API_POST_WORKFLOW_TASK
+  API_POST_WORKFLOW_TASK,
+  API_POST_SUSPENDINSTANCE
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
 export const getCustomerManage = appRx.get(API_GET_CUSTOMER_MANAGE, errorCatcher, errorHandle, filter)
@@ -152,3 +153,5 @@ export const getQRCodeData  = appRx.get(API_GAT_GETQRCODE, errorCatcher, errorHa
 export const getcartype  = appRx.get(API_GAT_INFO, errorCatcher, errorHandle, filter)
 // 审核之后
 export const workflowcontent = appRx.get(API_POST_WORKFLOW_TASK, errorCatcher, errorHandle, filter)
+// 反结算
+export const suspendinstance = appRx.post(API_POST_SUSPENDINSTANCE, errorCatcher, errorHandle, filter)

+ 3 - 0
src/model/warehouse/index.js

@@ -47,6 +47,7 @@ import {
     API_POST_TURNAROUND_ADD,
     API_GET_TURNAROUND_XIALA,
     API_get_goodsName_All,
+    API_SEND_BACK
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
 // 列表
@@ -142,5 +143,7 @@ export const turnAroundList = appRx.get(API_GET_TURNAROUND_LIST,errorCatcher, er
 export const turnAroundXiaLa = appRx.get(API_GET_TURNAROUND_XIALA,errorCatcher, errorHandle, filter)
 //折转后所有货名
 export const turnAroundGoodsNameAll = appRx.get(API_get_goodsName_All,errorCatcher, errorHandle, filter)
+//退回
+export const sendback = appRx.post(API_SEND_BACK,errorCatcher, errorHandle, filter)
 
 

+ 66 - 18
src/views/houseSelfCollect/paymentManagement.vue

@@ -122,9 +122,10 @@
       <el-table-column class="table_td" prop="updateDate" label="更新时间" width="150" sortable></el-table-column>
       <el-table-column class="table_td" prop="status" width="80" label="状态">
         <template scope="scope">
-          <span v-if="scope.row.approveStatus">{{
+          <span v-if="scope.row.approveStatus&&scope.row.reverseFlag!=1">{{
             scope.row.approveStatus
           }}</span>
+
           <span v-else>{{ scope.row.status }}</span>
         </template>
       </el-table-column>
@@ -134,17 +135,18 @@
           <span v-else>已开票</span>
         </template>
       </el-table-column>
-      <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="500">
+      <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="600">
         <template scope="scope">
           <span v-hasPermission="`acquisitionManagement.acquisitionPay.add`">
             <el-button v-if="
-                (!scope.row.approveStatus ||
-                  scope.row.approveStatus == '待结算') &&
-                (scope.row.status == '待结算' || scope.row.status == '已驳回' )
+                (!scope.row.approveStatus ||scope.row.approveStatus == '待结算') &&
+                (scope.row.status == '待结算' || scope.row.status == '已驳回' )||scope.row.approveStatus&&scope.row.reverseFlag==1
               " @click="settlement(1, scope.row)">结算</el-button>
           </span>
           <el-button @click="settlement(2, scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.view`">查看
           </el-button>
+          <el-button  v-if="scope.row.approveStatus&&scope.row.reverseFlag!=1" @click="settleaccounts(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.seet`">反结算
+          </el-button>
           <el-button v-if="
               scope.row.approveStatus ||
               (scope.row.status != '待结算' && !scope.row.approveStatus)
@@ -308,7 +310,21 @@
         :preview-src-list="[paymentReceipt]">
       </el-image>
     </el-dialog>
-
+    <el-dialog width="30%" title="开票信息" :visible.sync="invoicingshow" :close="invoicingClose">
+       <el-form :label-position="labelposition" label-width="200px" style='text-align:center;' class="customer">
+        <el-form-item label="税控盘:">
+          <el-select v-model="invoiceFlag" placeholder="请选择税控盘"
+          filterable clearable style="margin: 0 10px">
+          <el-option v-for="item in invoicingList" :key="'invoicing'+item.value" :label="item.label" :value="item.value">
+          </el-option>
+        </el-select>
+        </el-form-item>
+      </el-form>
+        <span slot="footer" class="dialog-footer">
+        <el-button @click="invoicingshow = false">取 消</el-button>
+        <el-button type="primary" @click="invoicingconfirm">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -333,7 +349,8 @@
     invoicing,
     export1,
     settlementEdit,
-    workflowcontent
+    workflowcontent,
+    suspendinstance
   } from '@/model/houseSelfCollect/index'
   import {
     posthandle,
@@ -354,12 +371,15 @@
         paymentReceipt: '',
         isPreviewPayOrder: false,
         printType: 0,
+        invoiceFlag:'',
         isShowPrintType1: true,
         isShowPrintType2: true,
         isShowPrintType3: true,
         isShowPrintType4: true,
         customerInfo: false,
         form: {},
+        labelposition:'right',
+        invoicingList:[{label:'航天信息',value:1},{label:'百旺',value:2}],
         formLabelWidth: '300px',
         invoicing: '',
         deleteshow: false,
@@ -402,6 +422,7 @@
         warehouseNameKey: '',
         warehouseName: '',
         isShowPrint: false,
+        invoicingshow:false,
         printData: {},
         warehouse: [],
         disabled: false,
@@ -439,6 +460,29 @@
       })
     },
     methods: {
+      invoicingClose(){
+        this.invoicingshow=false
+      },
+      settleaccounts(row){
+        this.$confirm('确定将该笔业务进行反结算操作?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+
+          suspendinstance({workflowId:row.workflowId,id:row.id}).toPromise()
+          .then((response) => {
+          this.$message({
+            type: 'success',
+            message: '反结算成功!'
+          }); 
+          this.getList()
+          })
+        }).catch(() => {
+          return false       
+        });
+       
+      },
       imgshow() {
         this.deleteshow = false
         console.log(11111)
@@ -583,21 +627,12 @@
           xmlhttp.send()
         })
       },
-      invoicingClick() {
-        // let data = JSON.stringify({
-        //   paymentManagementList : this.modification
-        // })
-        // //开票
-        //   invoicing(data)
-        //   .toPromise()
-        //   .then(response => {
-        //     console.log(response)
-        //   })
-
+      invoicingconfirm(){
         let data = {
           paymentManagementList: this.modification,
         }
         for (let i = 0; i < this.modification.length; i++) {
+          this.modification[i].invoiceFlag=this.invoiceFlag
           if (
             this.modification[i].status != '全部付款' &&
             this.modification[i].status != '部分付款' &&
@@ -624,6 +659,19 @@
           })
           .catch(() => {})
       },
+      invoicingClick() {
+        this.invoicingshow=true
+        // let data = JSON.stringify({
+        //   paymentManagementList : this.modification
+        // })
+        // //开票
+        //   invoicing(data)
+        //   .toPromise()
+        //   .then(response => {
+        //     console.log(response)
+        //   })
+
+      },
       customer(row) {
         getCustomerLook({
             id: row.identityId,

+ 76 - 2
src/views/warehouse/warehouseManagementNoWeight.vue

@@ -85,6 +85,11 @@
           " class="putstorage" @click="edits(scope.row)">
                   毛检
                 </ws-button>
+              <ws-button v-hasPermission="
+           `warehouseManagement.warehouse.warehouseInfo.huan`
+          " class="putstorage" @click="exchange(scope.row)">
+                  换仓
+                </ws-button>
                 <!-- <el-button @click="print(scope.row)"  v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button > -->
 
                 <!-- <div class="record" @click="edits(scope.row)">编辑</div>
@@ -100,7 +105,21 @@
               :total="deptBudgetTotal">
             </el-pagination>
           </div>
-
+          <el-dialog
+          title="提示"
+          :visible.sync="dialogVisible"
+          width="30%"
+          :before-close="handleClose">
+          <el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
+              @change="binNumberChange">
+              <el-option v-for="item in binnumberList" :key="item.binNumber" :label="item.binNumber"
+                :value="item.binNumber" />
+            </el-select>
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible = false">取 消</el-button>
+            <el-button type="primary" @click="dialogVisibleconfirm">确 定</el-button>
+          </span>
+        </el-dialog>
         </div>
       </ws-form>
 
@@ -112,6 +131,8 @@
     delInOut,
     completeList,
     getPrintInfo,
+    getbinnumber,
+    addstorageputList
     // deletewarehouse,
     // warehouseName,
     // addstorageputList,
@@ -147,6 +168,7 @@
         tableDate: [],
         // 是否显示
         showType: true,
+        binNumber:'', 
         // 年
         year: '',
         deptBudgetTotal: 0,
@@ -158,12 +180,15 @@
         startDate: null,
         endDate: null,
         value2: [],
+        dialogVisible:false,
+        id:0,
         deletewarehouse: [],
         improved: [],
         row: [],
         deptBudgetList1: [],
         // 提交类型
         submitType: true,
+        binnumberList:[],
         selectpackingMethod: {},
         size: 10,
         compId: localStorage.getItem('ws-pf_compId'),
@@ -190,7 +215,7 @@
       //cg.viewSpareMoney
       // this.getVesselData();
       this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
-      this.binNumber = this.$route.params.binNumber
+      this.binNumber = this.$route.query.binNumber
       this.status = this.$route.query.status
       this.deptBudgetList.warehouseType = this.$route.query.warehouseType
       this.createType = this.$route.query.createType
@@ -204,6 +229,55 @@
       this.showType = this.isShow
     },
     methods: {
+      handleClose(){
+        this.dialogVisible=false
+      },
+      dialogVisibleconfirm(){
+        this.$confirm(`确定修改仓位?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+              addstorageputList({statusFlag:1,id:this.id,positionId:this.deptBudgetList.positionId,binNumber:this.binNumber,warehouseInOutDetail:{}}).toPromise()
+						.then((response) => {
+              this.$notify.success({
+                  title: '成功',
+                  message: '修改仓位成功',
+                })
+                this.dialogVisible=false
+							this.getList(
+              this.$route.query.baseId,
+              this.$route.query.positionId,
+              this.$route.query.warehouseType
+            )
+              
+						})
+          })
+          .catch(() => {
+            return false
+          })
+        
+      },
+      binNumberChange(e){
+					for (let i = 0; i < this.binnumberList.length; i++) {
+						if(this.binnumberList[i].binNumber==e){
+							this.deptBudgetList.positionId=this.binnumberList[i].id
+						}
+					}
+			},
+       exchange(row){
+         var that=this
+         getbinnumber({id:  this.$route.query.baseId}).toPromise()
+						.then((response) => {
+							
+							this.binnumberList = response.warehousePositionInfoList
+              this.$forceUpdate()
+						})
+         this.id=row.id
+         this.dialogVisible=true
+
+       },
       datechange() {
         this.getList()
       },

+ 24 - 2
src/views/warehouse/warehouseManagementRecord.vue

@@ -180,11 +180,12 @@
 					</el-table-column>
 					<el-table-column prop="backOffice" label="操作人" width="120px">
 					</el-table-column>
-					<el-table-column prop="addressUrl" label="操作" width="100px">
+					<el-table-column prop="addressUrl" label="操作" width="200">
 						<template slot-scope="scope">
 							<!-- <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
 								src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" /> -->
           					<el-button @click="print(scope.row)" v-if="scope.row.inOutType != '收购入库'&&scope.row.inOutType != '期初'&& scope.row.inOutType != '折转入库'&& scope.row.inOutType != '折转出库'"  v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button >
+							<el-button @click="back(scope.row)"   v-hasPermission="`acquisitionManagement.acquisitionWeight.tui`">退回</el-button >
 						</template>
 					</el-table-column>
 					<el-table-column prop="createDate" label="录入时间">
@@ -314,7 +315,8 @@
 		addselectinfoList,
 		recordss,
 		getPrintInfo,
-		getbinnumber
+		getbinnumber,
+		sendback
 	} from '@/model/warehouse/index'
 	import {
 		downloadFile
@@ -411,6 +413,26 @@
 			})
 		},
 		methods: {
+			back(row){
+				this.$confirm(`确定退回该操作数据?`, {
+					cancelButtonText: '取消',
+					confirmButtonText: '确定',
+					type: 'warning',
+				})
+				.then(() => {
+					sendback({id:row.id}).toPromise()
+					.then((response) => {
+						this.$notify.success({
+							title: '成功',
+							message: '退回成功',
+						})
+						this.getList()
+					})
+				})
+				.catch(() => {
+					return false
+				})
+			},
 			batchPrint(){
 				if(this.modification.length == 0 ){
 					this.$message.error("请勾选要打印的条目!")