From 28e9dc359572b465a3ba6297b50743492e170fbf Mon Sep 17 00:00:00 2001
From: 陈婷婷 <506607603@qq.com>
Date: 星期三, 03 十二月 2025 13:49:30 +0800
Subject: [PATCH] 调拨申请单修改
---
src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue | 162 +++++++++++++++++++++++++++-------------
src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue | 19 +---
2 files changed, 113 insertions(+), 68 deletions(-)
diff --git a/src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue b/src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue
index 38ace7b..01e6047 100644
--- a/src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue
+++ b/src/views/warehouse/transfer/Kf_MoveStockRequestBillEdit.vue
@@ -338,7 +338,7 @@
deptform: {},//寮圭獥閫変腑鏁版嵁
openData: false,//鏁版嵁寮圭獥
dialogTitle: '',
- organizationList: [],//缁勭粐鍒楄〃
+ organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
subDisabled: false,//缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
// OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼2锛�
HInterID: 0,
@@ -420,20 +420,9 @@
};
},
created() {
- this.fetchData()
this.getdata()
},
methods: {
- fetchData() {
- axios.get(this.baseURL + "/Web/GetOrganizations", {
- }).then(response => {
- if (response.data.count == 1) {
- this.organizationList = response.data.data;//缁勭粐鍒楄〃
- }
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
- },
getdata() {
console.log(this.copyType, this.OperationType)
this.formShow = false
@@ -495,10 +484,13 @@
this.warehouseShow = false
this.openData = false
} else if (num == 3){
+ console.log(deptRow)
this.editData[this.zbIndex].HMaterID = deptRow.HItemID
this.editData[this.zbIndex].鐗╂枡浠g爜 = deptRow.鐗╂枡浠g爜
this.editData[this.zbIndex].鐗╂枡鍚嶇О = deptRow.鐗╂枡鍚嶇О
this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿
+ this.editData[this.zbIndex].HUnitID = deptRow.HUnitID
+ this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О
this.materialShow = false
this.openData = false
} else if (num == 4) {
@@ -668,7 +660,6 @@
if (response.data.count == 1) {
var result = response.data
var data = response.data.data
- console.log(result,data)
if (this.copyType == 1) {
this.getHBillNo()
let date = new Date()
@@ -690,12 +681,10 @@
, "HSecManagerID": data[0].HSecManagerID
, "HKeeperName": data[0].淇濈鍛�
, "HKeeperID": data[0].HKeeperID
-
, "HWHID": data[0].涓昏皟鍏ヤ粨搴揑D
, "HWHName": data[0].涓昏皟鍏ヤ粨搴�
, "HSCWHID": data[0].涓昏皟鍑轰粨搴揑D
, "HSCWHName": data[0].涓昏皟鍑轰粨搴�
-
, "HInnerBillNo": data[0].杈呭姪瀛楁
, "HRemark": data[0].琛ㄥご澶囨敞
, "HMaker": data[0].鍒跺崟浜�
diff --git a/src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue b/src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue
index b96e193..10f0411 100644
--- a/src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue
+++ b/src/views/warehouse/transfer/Kf_MoveStockRequestBillList.vue
@@ -40,7 +40,7 @@
</el-form-item>
<el-form-item label="瑙勬牸鍨嬪彿" prop="SpecificationModel">
<el-input v-model="queryParams.SpecificationModel" placeholder="璇疯緭鍏�" @keyup.enter.native="handleQuery" />
- </el-form-item>
+ </el-form-item>
<el-form-item label="婧愬崟鍗曞彿" prop="HSourceBillNo">
<el-input v-model="queryParams.HSourceBillNo" placeholder="璇疯緭鍏�" @keyup.enter.native="handleQuery" />
</el-form-item>
@@ -132,10 +132,10 @@
<el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
@click="handleEdit(row = rowForm, OperationType = 3)">缂栬緫</el-button>
</el-col>
- <el-col :span="1.5">
+ <!-- <el-col :span="1.5">
<el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
@click="handleEdit(row = rowForm, OperationType = 1, copyType = 1)">澶嶅埗</el-button>
- </el-col>
+ </el-col> -->
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">鍒犻櫎
</el-button>
@@ -147,6 +147,22 @@
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
@click="set_CheckBill(2, form = rowForm)">杩斿鏍�</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="set_CloseBill(0)">鍏抽棴
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="set_CloseBill(1)">鍙嶅叧闂�
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="set_DropBill(1)">浣滃簾
+ </el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="set_DropBill(2)">鍙嶄綔搴�
+ </el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport">瀵煎嚭</el-button>
@@ -182,10 +198,10 @@
</el-table-column>
</template>
</el-table>
- <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes" @pagination="getList" />
+ <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes"
+ @pagination="getList" />
<el-dialog title="闅愯棌鍒楄缃�" :visible.sync="openRowHide" width="816px" append-to-body>
- <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose"
- v-if="rowHideShow" />
+ <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
</el-dialog>
<!-- 缂栬緫 -->
<el-dialog title="缂栬緫璋冩嫧鐢宠鍗�" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox" @close="close">
@@ -193,8 +209,8 @@
:copyType="copyType" @editClose="editClose" v-if="editShow" />
</el-dialog>
<el-dialog title="鎵撳嵃妯℃澘閫夋嫨" :visible.sync="openPrintList" width="800px" append-to-body>
- <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName'
- :HModName='HModName' @rowEditClose="rowSetClose" v-if="printListShow" />
+ <PrintList :linterid=this.rowForm.hmainid :MyMsg=this.rowForm.hmainid :Type='HModName' :HModName='HModName'
+ @rowEditClose="rowSetClose" v-if="printListShow" />
<!-- <div>111</div> -->
</el-dialog>
</div>
@@ -270,15 +286,15 @@
// 鏌ヨ鍙傛暟
queryParams: {
HBillNo: '',
- HBillno2:'',
+ HBillno2: '',
HInitTimeCycle: 29,
- HDeptID:'',
- MaterialCode:'',
- MaterialName:'',
- SpecificationModel:'',
- HSourceBillNo:'',
- Warehouse:'',
- Hmaker:'',
+ HDeptID: '',
+ MaterialCode: '',
+ MaterialName: '',
+ SpecificationModel: '',
+ HSourceBillNo: '',
+ Warehouse: '',
+ Hmaker: '',
ColName1: '',
ColName2: '',
ColName: '',
@@ -316,7 +332,7 @@
methods: {
//閲嶆柊鍚屾
- set_ResCnz(){
+ set_ResCnz() {
axios.get(this.baseURL + "/Cg_POOrderBill/Resynchronize", {
params: { "HBillNo": '', "HBillType": 1243 }
}).then(response => {
@@ -422,7 +438,7 @@
//鑾峰彇涓嶉渶瑕佹樉绀虹殑鍒楋紙H寮�澶寸殑鍒椾笉鏄剧ず锛�
var patrn = new RegExp(/^h/i);
if (patrn.test(data1.list[key].ColmCols)) {
- this.titleData[key] = data1.list[key].ColmCols;
+ this.titleData[key] = data1.list[key].ColmCols;
}
}
//鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
@@ -454,15 +470,15 @@
"HModName": HModName,
"user": user,
},
- }).then(res => {
+ }).then(res => {
let data1 = res.data
- if (data1.data.length != 0) {
+ if (data1.data.length != 0) {
var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
dataCol = data1.data[0].HGridString.split(',');
//鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
- if (dataCol.length == option.cols[0].length - 1) {
+ if (dataCol.length == option.cols[0].length - 1) {
//閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
for (var j = 0; j < option.cols[0].length - 1; j++) {
for (var i = 0; i < option.cols[0].length - 1; i++) {
@@ -688,26 +704,27 @@
this.sWhere += " and 鍗曟嵁鍙� like '%" + this.queryParams.HBillNo + "%'";
}
if (this.queryParams.HDeptID) {
- this.sWhere += " and 閮ㄩ棬 like '%" + this.queryParams.HDeptID + "%'";
+ this.sWhere += " and 閮ㄩ棬 like '%" + this.queryParams.HDeptID + "%'";
}
if (this.queryParams.MaterialCode) {
- this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.MaterialCode + "%'";
+ this.sWhere += " and 鐗╂枡浠g爜 like '%" + this.queryParams.MaterialCode + "%'";
}
if (this.queryParams.MaterialName) {
- this.sWhere += " and 鐗╂枡鍚嶇О like '%" + this.queryParams.MaterialName + "%'";
+ this.sWhere += " and 鐗╂枡鍚嶇О like '%" + this.queryParams.MaterialName + "%'";
}
if (this.queryParams.SpecificationModel) {
- this.sWhere += " and 瑙勬牸鍨嬪彿 like '%" + this.queryParams.SpecificationModel + "%'";
+ this.sWhere += " and 瑙勬牸鍨嬪彿 like '%" + this.queryParams.SpecificationModel + "%'";
}
if (this.queryParams.HSourceBillNo) {
- this.sWhere += " and 婧愬崟鍗曞彿 like '%" + this.queryParams.HSourceBillNo + "%'";
+ this.sWhere += " and 婧愬崟鍗曞彿 like '%" + this.queryParams.HSourceBillNo + "%'";
}
if (this.queryParams.Warehouse) {
- this.sWhere += " and 浠撳簱鍚嶇О like '%" + this.queryParams.Warehouse + "%'";
+ this.sWhere += " and 浠撳簱鍚嶇О like '%" + this.queryParams.Warehouse + "%'";
}
if (this.queryParams.Hmaker) {
- this.sWhere += " and 鍒跺崟浜� like '%" + this.queryParams.Hmaker + "%'";
+ this.sWhere += " and 鍒跺崟浜� like '%" + this.queryParams.Hmaker + "%'";
}
+ this.clearData()
this.getList()
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
@@ -716,13 +733,13 @@
this.queryParams = {
HBillNo: '',
HInitTimeCycle: 29,
- HDeptID:'',
- MaterialCode:'',
- MaterialName:'',
- SpecificationModel:'',
- HSourceBillNo:'',
- Warehouse:'',
- Hmaker:'',
+ HDeptID: '',
+ MaterialCode: '',
+ MaterialName: '',
+ SpecificationModel: '',
+ HSourceBillNo: '',
+ Warehouse: '',
+ Hmaker: '',
ColName1: '',
ColName2: '',
ColName: '',
@@ -734,16 +751,24 @@
ColContent: '',
}
this.riqiChange()
+ this.clearData()
this.resetForm("queryForm")
this.getList()
},
-
+ clearData() {
+ this.single = true
+ this.multiple = true
+ this.OperationType = 0
+ this.copyType = 0
+ this.ids = []
+ },
//閫�鍑�
close() {
// this.reset()
this.tableShow = true
this.openEdit = false
this.editShow = false
+ this.clearData()
this.getList()
},
//鎵撳紑鏂板缁勪欢寮圭獥
@@ -763,12 +788,14 @@
this.open = val
this.editShow = false
this.openEdit = val
+ this.clearData()
this.getList()
},
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete() {
this.$modal.confirm('纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠').then(() => {
- axios.get(this.baseURL + "/Kf_MoveStockRequestBill/DeltetKf_MoveStockRequestBill", {
+ if (this.rowForm.鐘舵�� == "鍒涘缓") {
+ axios.get(this.baseURL + "/Kf_MoveStockRequestBill/DeltetKf_MoveStockRequestBill", {
params: { 'HInterID': this.rowForm.hmainid.toString() }
}).then(response => {
if (response.data.count == 1) {
@@ -780,7 +807,12 @@
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
+ } else {
+ this.$modal.msgError("姝ゆ暟鎹笉鏄垱寤虹姸鎬�,涓嶈兘鍒犻櫎锛�");
+ }
}).catch(() => { })
+
+
},
// 鍙嶅鏍�/瀹℃牳鏁版嵁
set_CheckBill(num, form) {
@@ -797,6 +829,44 @@
else {
this.$modal.msgError("閿欒:" + result.code + result.Message,);
}
+ this.clearData()
+ }).catch(error => {
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ set_CloseBill(num) {
+ //閫昏緫鍏抽棴鏂规硶
+ axios.get(this.baseURL + "/Kf_MoveStockRequestBill/CloseKf_MoveStockRequestBill", {
+ params: { "HInterID": this.rowForm.hmainid, "Type": num, "user": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.code == 1) {
+ this.$modal.msgSuccess(result.Message);
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ this.clearData()
+ }).catch(error => {
+ console.log(error)
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ },
+ set_DropBill(num) {
+ //閫昏緫浣滃簾鏂规硶
+ axios.get(this.baseURL + "/Kf_MoveStockRequestBill/DropKf_MoveStockRequestBill", {
+ params: { "HInterID": this.rowForm.hmainid.toString(), "Type": num, "user": sessionStorage["HUserName"] }
+ }).then(response => {
+ let result = response.data
+ if (result.count == 1) {
+ this.$modal.msgSuccess(result.Message);
+ this.getList();
+ }
+ else {
+ this.$modal.msgError("閿欒:" + result.code + result.Message,);
+ }
+ this.clearData()
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
@@ -815,22 +885,8 @@
} else if (this.rowForm.鐘舵�� != "宸插鏍�" && !this.defaintOperationByCompanyName()) {
this.$modal.msgError("鎵撳嵃澶辫触!鍘熷洜锛氬崟鎹姸鎬佷笉涓�'宸插鏍�'鐘舵��!!");
} else {
- axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
- params: { "HInterID": this.rowForm.hmainid }
- }).then(response => {
- var result = response.data
- if (result.count == 1) {
- this.printListShow = true
- this.openPrintList = true
- // this.$router.push({ path:'/printList', query: { linterid: this.rowForm.hmainid,MyMsg:this.rowForm.hmainid,Type:'Kf_SellOutBillList' }})
- } else {
- this.$modal.msgError(result.code + result.Message)
- }
- }).catch(error => {
- this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
- });
-
-
+ this.printListShow = true;
+ this.openPrintList = true;
}
// var content= ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_SellOutBillList', 'yes']
},
--
Gitblit v1.9.1