|
@@ -291,7 +291,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
- @click="handleUpdate(scope.row, true)"
|
|
|
+ @click="check(scope.row, true)"
|
|
|
v-hasPermi="['warehouseBusiness:warehousebills:edit']"
|
|
|
>查看
|
|
|
</el-button>
|
|
@@ -299,6 +299,15 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
+ v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
|
|
|
+ @click="check(scope.row, true)"
|
|
|
+ v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
|
|
|
+ >审批进度
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
v-if="scope.row.fBillstatus <= 3"
|
|
|
@click="handleUpdate(scope.row, false)"
|
|
|
v-hasPermi="['warehouseBusiness:warehousebills:edit']"
|
|
@@ -330,6 +339,7 @@
|
|
|
@close='addCloseDialog'
|
|
|
width="80%"
|
|
|
append-to-body
|
|
|
+ :show-close="colseButton"
|
|
|
>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
<el-row>
|
|
@@ -339,7 +349,7 @@
|
|
|
v-model="form.fCorpid"
|
|
|
filterable
|
|
|
remote
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
@change="changefCorpid(form)"
|
|
|
style="width: 80%"
|
|
|
:remote-method="corpsRemoteMethod"
|
|
@@ -359,7 +369,7 @@
|
|
|
<el-select
|
|
|
v-model="form.fStltypeid"
|
|
|
placeholder="请选择结算方式"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
clearable
|
|
|
style="width: 80%"
|
|
|
>
|
|
@@ -377,7 +387,7 @@
|
|
|
<el-input
|
|
|
v-model="form.fMblno"
|
|
|
style="width: 80%"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
placeholder="手工输入"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -390,7 +400,7 @@
|
|
|
v-model="form.fBsdate"
|
|
|
style="width: 80%"
|
|
|
type="date"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
@change="changefBsdate"
|
|
|
value-format="timestamp"
|
|
|
placeholder="业务日期"
|
|
@@ -404,7 +414,7 @@
|
|
|
v-model="form.fStorekeeper"
|
|
|
filterable
|
|
|
remote
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
style="width: 80%"
|
|
|
:remote-method="userRemoteMethod"
|
|
|
placeholder="请输入模糊查找"
|
|
@@ -425,7 +435,7 @@
|
|
|
filterable
|
|
|
remote
|
|
|
@change="changefWarehouseid(form)"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
style="width: 80%"
|
|
|
:remote-method="warehouseRemoteMethod"
|
|
|
placeholder="请输入模糊查找"
|
|
@@ -456,7 +466,7 @@
|
|
|
<el-select
|
|
|
v-model="form.fIfdamage"
|
|
|
placeholder="请选择是否破损"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
clearable
|
|
|
style="width: 80%"
|
|
|
>
|
|
@@ -474,7 +484,7 @@
|
|
|
<el-select
|
|
|
v-model="form.fIfweigh"
|
|
|
placeholder="请选择是否过磅"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
clearable
|
|
|
style="width: 80%"
|
|
|
>
|
|
@@ -494,7 +504,7 @@
|
|
|
<el-select
|
|
|
v-model="form.fTrademodeid"
|
|
|
placeholder="请选择贸易方式"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
clearable
|
|
|
style="width: 80%"
|
|
|
>
|
|
@@ -533,7 +543,7 @@
|
|
|
<el-input
|
|
|
style="width: 100%"
|
|
|
v-model="form.remark"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
type="textarea"
|
|
|
placeholder="请输入内容"
|
|
|
/>
|
|
@@ -545,7 +555,7 @@
|
|
|
<el-form-item label="仓库联系人" prop="fContacts">
|
|
|
<el-input
|
|
|
v-model="form.fContacts"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
style="width: 80%"
|
|
|
placeholder="仓库联系人"
|
|
|
/>
|
|
@@ -555,7 +565,7 @@
|
|
|
<el-form-item label="仓库电话" prop="ftel">
|
|
|
<el-input
|
|
|
v-model="form.fTel"
|
|
|
- :disabled="browseStatus || formBrowseStatus"
|
|
|
+ :disabled="notChange"
|
|
|
style="width: 80%"
|
|
|
placeholder="请输仓库入电话"
|
|
|
/>
|
|
@@ -1536,6 +1546,12 @@
|
|
|
<el-button type="info" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="printJobSheet"
|
|
|
>作业单
|
|
|
</el-button>-->
|
|
|
+ <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
|
|
+ <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
|
|
|
+ <el-button v-if="approve === true" @click="goApproval">审批</el-button>
|
|
|
+ <el-button type="danger" size="small" :disabled="disappear" v-if="form.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
|
|
|
+ <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
|
|
|
+ <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
|
|
|
<el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
|
|
|
<el-button
|
|
|
style="background-color: #008000; color: #fff"
|
|
@@ -1543,7 +1559,8 @@
|
|
|
:disabled="browseStatus"
|
|
|
>请核</el-button
|
|
|
>
|
|
|
- <el-button @click="cancel">取 消</el-button>
|
|
|
+ <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
|
|
|
+ <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
|
|
|
</div>
|
|
|
<!-- 选择库存总账数据 -->
|
|
|
<el-dialog
|
|
@@ -2066,6 +2083,8 @@
|
|
|
<script>
|
|
|
import print from "print-js";
|
|
|
import {
|
|
|
+ backFee,
|
|
|
+ RevocationApproval,
|
|
|
addWhgenleg,
|
|
|
getStockTransferList,
|
|
|
getStockTransfer,
|
|
@@ -2098,14 +2117,27 @@ import { listUser, queryUserVal } from "@/api/system/user";
|
|
|
import UploadFile from "@/components/Uploadfile";
|
|
|
|
|
|
import { listWhgenleg } from "@/api/reportManagement/whgenleg";
|
|
|
+import Global from '@/layout/components/global'
|
|
|
+import AddOrUpdate from '@/views/viewApproval'
|
|
|
+import ApprovalComments from '@/views/startApproval'
|
|
|
|
|
|
export default {
|
|
|
name: "Warehousebills",
|
|
|
components: {
|
|
|
UploadFile,
|
|
|
+ AddOrUpdate,
|
|
|
+ ApprovalComments
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ cancelButton:true,
|
|
|
+ approve:false,
|
|
|
+ disappear:false,
|
|
|
+ colseButton:true,
|
|
|
+ addOrUpdateVisible: false,
|
|
|
+ addOrUpdateVisib:false,
|
|
|
+ stockTransferId:140,
|
|
|
+ notChange:false,
|
|
|
index: 0,
|
|
|
fFeeUnitid: null,
|
|
|
fFeeUnitids: null,
|
|
@@ -2337,8 +2369,191 @@ export default {
|
|
|
this.getDicts("sys_common_status").then((response) => {
|
|
|
this.fBillstatusOptions = response.data;
|
|
|
});
|
|
|
+ this.register()
|
|
|
+ },
|
|
|
+ activated(){
|
|
|
+ this.Jump()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 撤销审核
|
|
|
+ backrRconciliation(){
|
|
|
+ this.queryParams.fBillstatus = '1'
|
|
|
+ backFee(this.form.fId).then(response=>{
|
|
|
+ this.msgSuccess("撤回成功")
|
|
|
+
|
|
|
+ })
|
|
|
+ // this.open = false
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ // 默认录入人
|
|
|
+ register() {
|
|
|
+ queryUserVal().then((response)=>{
|
|
|
+ this.Lander = response.user.userName
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 审批按钮
|
|
|
+ goApproval(){
|
|
|
+ this.addOrUpdateVisib = true
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.ApprovalComments.init(this.form.fId,this.stockTransferId)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ Jump(){
|
|
|
+ this.approval = this.$route.query.data
|
|
|
+ if(this.approval){
|
|
|
+ this.colseButton = false
|
|
|
+ this.approval = JSON.parse(this.approval)
|
|
|
+ this.hide = false
|
|
|
+ this.open = true
|
|
|
+ this.browseStatus = true
|
|
|
+ this.notChange = true
|
|
|
+ this.approve = true
|
|
|
+ this.disappear = true
|
|
|
+ this.cancelButton = false
|
|
|
+
|
|
|
+ this.reset()
|
|
|
+ getStockTransfer(this.approval.billId).then((response) => {
|
|
|
+ if (response.data.warehousebills) {
|
|
|
+ this.form = response.data.warehousebills;
|
|
|
+ this.$set(this.form, "fEta", Date.parse(this.form.fEta));
|
|
|
+ this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
|
|
|
+ this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
|
|
|
+ this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
|
|
|
+ this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
|
|
|
+ this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
|
|
|
+ }
|
|
|
+ if (response.data.corps) {
|
|
|
+ this.fMblnoOptions = response.data.corps;
|
|
|
+ this.KHblnoOptions = response.data.corps;
|
|
|
+ this.fSbuOptions = response.data.corps;
|
|
|
+ }
|
|
|
+ if (response.data.feesList) {
|
|
|
+ this.fWbuOptions = response.data.feesList;
|
|
|
+ }
|
|
|
+ if (response.data.warehouse) {
|
|
|
+ this.warehouseOptions = response.data.warehouse;
|
|
|
+ }
|
|
|
+ if (response.data.warehouseBillsItem) {
|
|
|
+ this.dataList = response.data.warehouseBillsItem;
|
|
|
+ for (let list in this.dataList) {
|
|
|
+ if (!this.form.fMblno) {
|
|
|
+ this.$set(this.form, "fMblno", this.dataList[list].fMblno);
|
|
|
+ }
|
|
|
+ if (this.dataList[list].fBillstatus >= 6) {
|
|
|
+ this.formBrowseStatus = true;
|
|
|
+ }
|
|
|
+ this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (response.data.enclosures) {
|
|
|
+ this.relevantAttachments = response.data.enclosures;
|
|
|
+ }
|
|
|
+ if (response.data.warehouse) {
|
|
|
+ this.warehouseDrList = response.data.warehousebillsfeesDr;
|
|
|
+ }
|
|
|
+ if (response.data.warehousebillsfeesCr) {
|
|
|
+ this.warehouseCrList = response.data.warehousebillsfeesCr;
|
|
|
+ }
|
|
|
+ if (response.data.sysUser) {
|
|
|
+ this.userVal = response.data.sysUser
|
|
|
+ this.userOptions = response.data.sysUser;
|
|
|
+ }
|
|
|
+ if (response.data.dept) {
|
|
|
+ this.deptOptions = []
|
|
|
+ this.deptOptions.push(response.data.dept)
|
|
|
+ }
|
|
|
+ if (response.data.feesList) {
|
|
|
+ this.fWbuOptions = response.data.feesList;
|
|
|
+ }
|
|
|
+ if (response.data.goodsList) {
|
|
|
+ this.goodsOptions = response.data.goodsList;
|
|
|
+ }
|
|
|
+ if (response.data.warehouse) {
|
|
|
+ this.warehouseOptions = response.data.warehouse;
|
|
|
+ }
|
|
|
+ if (response.data.warehouseAreas) {
|
|
|
+ this.kqhouseOptions = response.data.warehouseAreas;
|
|
|
+ }
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改调拨";
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ homepaGe(){
|
|
|
+ let view = {
|
|
|
+ fullPath: "/business/stockTransfer",
|
|
|
+ hash: "",
|
|
|
+ matched: Array(2),
|
|
|
+ meta: Object,
|
|
|
+ name: "StockTransfer",
|
|
|
+ params: Object,
|
|
|
+ path: "/business/stockTransfer",
|
|
|
+ query: Object,
|
|
|
+ title: "调拨"
|
|
|
+ }
|
|
|
+ this.$router.push({ path: '/index'})
|
|
|
+ this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
|
|
|
+ if (this.isActive(view)) {
|
|
|
+ this.toLastView(visitedViews, view)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ Global.$emit("removeCache", "closeSelectedTag", view);
|
|
|
+ },
|
|
|
+ homePage() {
|
|
|
+ this.open = false
|
|
|
+ let view = {
|
|
|
+ fullPath: "/business/stockTransfer",
|
|
|
+ hash: "",
|
|
|
+ matched: Array(2),
|
|
|
+ meta: Object,
|
|
|
+ name: "StockTransfer",
|
|
|
+ params: Object,
|
|
|
+ path: "/business/stockTransfer",
|
|
|
+ query: Object,
|
|
|
+ title: "调拨"
|
|
|
+ }
|
|
|
+ this.$router.push({ path: '/index' })
|
|
|
+ this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
|
|
|
+ if (this.isActive(view)) {
|
|
|
+ this.toLastView(visitedViews, view)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ Global.$emit("removeCache", "closeSelectedTag", view);
|
|
|
+ },
|
|
|
+ // 撤销审批
|
|
|
+ backApproval(){
|
|
|
+ let data = {
|
|
|
+ id:this.form.fId,
|
|
|
+ actId:this.stockTransferId,
|
|
|
+ billId:this.form.fId
|
|
|
+ }
|
|
|
+ RevocationApproval(data).then(response => {
|
|
|
+ this.msgSuccess("撤销审批成功")
|
|
|
+ this.disappear = true
|
|
|
+ this.open = false
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ returnData(){
|
|
|
+ this.addOrUpdateVisib = false
|
|
|
+ this.open = false
|
|
|
+ this.homepaGe()
|
|
|
+ },
|
|
|
+ getDataList(){
|
|
|
+ this.addOrUpdateVisible = false
|
|
|
+ },
|
|
|
+ // 查看审批流
|
|
|
+ addOrUpdateHandle(){
|
|
|
+ this.addOrUpdateVisible = true
|
|
|
+ this.addOrUpdateVisib = false
|
|
|
+ let id = '448'
|
|
|
+ let actId = '110'
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.addOrUpdate.init(this.form.fId,this.stockTransferId)
|
|
|
+ })
|
|
|
+ },
|
|
|
//关闭弹框的事件
|
|
|
addCloseDialog(){
|
|
|
this.getList()
|
|
@@ -2955,8 +3170,82 @@ export default {
|
|
|
this.title = "调拨单";
|
|
|
this.formBrowseStatus = false;
|
|
|
},
|
|
|
+ check(row, status){
|
|
|
+ this.notChange = true
|
|
|
+ this.browseStatus = status;
|
|
|
+ this.reset();
|
|
|
+ this.detailsHidden = false;
|
|
|
+ let data = row || this.ids;
|
|
|
+ getStockTransfer(data.fId).then((response) => {
|
|
|
+ if (response.data.warehousebills) {
|
|
|
+ this.form = response.data.warehousebills;
|
|
|
+ this.$set(this.form, "fEta", Date.parse(this.form.fEta));
|
|
|
+ this.$set(this.form, "fStltypeid", this.form.fStltypeid + '');
|
|
|
+ this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
|
|
|
+ this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
|
|
|
+ this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + '');
|
|
|
+ this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
|
|
|
+ }
|
|
|
+ if (response.data.corps) {
|
|
|
+ this.fMblnoOptions = response.data.corps;
|
|
|
+ this.KHblnoOptions = response.data.corps;
|
|
|
+ this.fSbuOptions = response.data.corps;
|
|
|
+ }
|
|
|
+ if (response.data.feesList) {
|
|
|
+ this.fWbuOptions = response.data.feesList;
|
|
|
+ }
|
|
|
+ if (response.data.warehouse) {
|
|
|
+ this.warehouseOptions = response.data.warehouse;
|
|
|
+ }
|
|
|
+ if (response.data.warehouseBillsItem) {
|
|
|
+ this.dataList = response.data.warehouseBillsItem;
|
|
|
+ for (let list in this.dataList) {
|
|
|
+ if (!this.form.fMblno) {
|
|
|
+ this.$set(this.form, "fMblno", this.dataList[list].fMblno);
|
|
|
+ }
|
|
|
+ if (this.dataList[list].fBillstatus >= 6) {
|
|
|
+ this.formBrowseStatus = true;
|
|
|
+ }
|
|
|
+ this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (response.data.enclosures) {
|
|
|
+ this.relevantAttachments = response.data.enclosures;
|
|
|
+ }
|
|
|
+ if (response.data.warehouse) {
|
|
|
+ this.warehouseDrList = response.data.warehousebillsfeesDr;
|
|
|
+ }
|
|
|
+ if (response.data.warehousebillsfeesCr) {
|
|
|
+ this.warehouseCrList = response.data.warehousebillsfeesCr;
|
|
|
+ }
|
|
|
+ if (response.data.sysUser) {
|
|
|
+ this.userVal = response.data.sysUser
|
|
|
+ this.userOptions = response.data.sysUser;
|
|
|
+ }
|
|
|
+ if (response.data.dept) {
|
|
|
+ this.deptOptions = []
|
|
|
+ this.deptOptions.push(response.data.dept)
|
|
|
+ }
|
|
|
+ if (response.data.feesList) {
|
|
|
+ this.fWbuOptions = response.data.feesList;
|
|
|
+ }
|
|
|
+ if (response.data.goodsList) {
|
|
|
+ this.goodsOptions = response.data.goodsList;
|
|
|
+ }
|
|
|
+ if (response.data.warehouse) {
|
|
|
+ this.warehouseOptions = response.data.warehouse;
|
|
|
+ }
|
|
|
+ if (response.data.warehouseAreas) {
|
|
|
+ this.kqhouseOptions = response.data.warehouseAreas;
|
|
|
+ }
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改调拨";
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row, status) {
|
|
|
+ this.notChange = false
|
|
|
this.browseStatus = status;
|
|
|
this.reset();
|
|
|
this.detailsHidden = false;
|