From dc984ce6a4d20b85d64fd0a909cf49c640aec5aa Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 01 十二月 2025 15:29:23 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/purchase/postockInBack/Kf_POStockInBackBill.vue | 646 ++++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 440 insertions(+), 206 deletions(-)
diff --git a/src/views/purchase/postockInBack/Kf_POStockInBackBill.vue b/src/views/purchase/postockInBack/Kf_POStockInBackBill.vue
index 358ea5b..91a2356 100644
--- a/src/views/purchase/postockInBack/Kf_POStockInBackBill.vue
+++ b/src/views/purchase/postockInBack/Kf_POStockInBackBill.vue
@@ -2,11 +2,12 @@
<div v-loading="formLoading" v-if="formShow">
<div style=" margin-bottom: 10px; border-bottom: 1px solid #f6f6f6;">
<el-button type="primary" @click="submitForm" :disabled="subDisabled">淇� 瀛�</el-button>
+ <el-button type="primary" @click="set_CheckBill(0)" :disabled="checkDisabled">瀹� 鏍�</el-button>
<el-button type="primary" @click="close">閫� 鍑�</el-button>
<!-- <el-button @click="cancel">鍙� 娑�</el-button> -->
</div>
<div style="margin: 10px; font-size: 28px; font-weight: bold; text-align: center;">閲囪喘閫�鏂欏崟</div>
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+ <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="鍩烘湰淇℃伅" name="first">
<el-row>
@@ -23,8 +24,8 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="杈呭姪瀛楁" prop="HInnerBillNo">
- <el-input v-model="form.HInnerBillNo" placeholder="璇疯緭鍏ヨ緟鍔╁瓧娈�" />
+ <el-form-item label="鍐呴儴鍗曟嵁鍙�" prop="HInnerBillNo">
+ <el-input v-model="form.HInnerBillNo" placeholder="璇疯緭鍏ュ唴閮ㄥ崟鎹彿" />
</el-form-item>
</el-col>
<el-col :span="6">
@@ -32,40 +33,6 @@
<el-input v-model="form.HEmpName" placeholder="璇疯緭鍏ヤ笟鍔″憳" disabled>
<el-button slot="append" icon="el-icon-search"
@click="openDataDialog(4, zhiyuanType = 'yewuyuan')"></el-button>
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="淇濈鍛�" prop="HKeeperName">
- <el-input v-model="form.HKeeperName" placeholder="璇疯緭鍏ヤ繚绠″憳" disabled>
- <el-button slot="append" icon="el-icon-search"
- @click="openDataDialog(4, zhiyuanType = 'baoguanyuan')"></el-button>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="涓荤" prop="HMangerName">
- <el-input v-model="form.HMangerName" placeholder="璇疯緭鍏ヤ富绠�" disabled>
- <el-button slot="append" icon="el-icon-search"
- @click="openDataDialog(4, zhiyuanType = 'zhuguan')"></el-button>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="楠屾敹" prop="HSecManagerName">
- <el-input v-model="form.HSecManagerName" placeholder="璇疯緭鍏ラ獙鏀�" disabled>
- <el-button slot="append" icon="el-icon-search"
- @click="openDataDialog(4, zhiyuanType = 'yanshou')"></el-button>
- </el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="浠撳簱" prop="HWHName">
- <el-input v-model="form.HWHName" placeholder="璇疯緭鍏ヤ粨搴�" disabled>
- <el-button slot="append" icon="el-icon-search"
- @click="openDataDialog(2, ckType = 'form')"></el-button>
</el-input>
</el-form-item>
</el-col>
@@ -80,11 +47,69 @@
</el-form-item>
</el-col>
<el-col :span="6">
- <el-form-item label="寰�鏉ュ崟浣�" prop="HSupName">
+ <el-form-item label="渚涘簲鍟�" prop="HSupName">
<el-input v-model="form.HSupName" placeholder="璇疯緭鍏ュ線鏉ュ崟浣�" disabled>
<el-button slot="append" icon="el-icon-search"
@click="openDataDialog(6)"></el-button>
</el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="浠撳簱" prop="HWHName">
+ <el-input v-model="form.HWHName" placeholder="璇疯緭鍏ヤ粨搴�" disabled>
+ <el-button slot="append" icon="el-icon-search"
+ @click="openDataDialog(2, ckType = 'form')"></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="閫�鏂欏憳" prop="HSecManagerName">
+ <el-input v-model="form.HSecManagerName" placeholder="璇疯緭鍏ラ��鏂欏憳" disabled>
+ <el-button slot="append" icon="el-icon-search"
+ @click="openDataDialog(4, zhiyuanType = 'tuiliaoyuan')"></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="淇濈鍛�" prop="HKeeperName">
+ <el-input v-model="form.HKeeperName" placeholder="璇疯緭鍏ヤ繚绠″憳" disabled>
+ <el-button slot="append" icon="el-icon-search"
+ @click="openDataDialog(4, zhiyuanType = 'baoguanyuan')"></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="璐熻矗浜�" prop="HManagerName">
+ <el-input v-model="form.HManagerName" placeholder="璇疯緭鍏ヨ礋璐d汉" disabled>
+ <el-button slot="append" icon="el-icon-search"
+ @click="openDataDialog(4, zhiyuanType = 'zhuguan')"></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="婧愬崟绫诲瀷" prop="HSourceBillType">
+ <el-select v-model="form.HSourceBillType" placeholder="璇烽�夋嫨" style="width: 100%">
+ <!-- <el-option v-for="(item, index) in HSourceBillTypeList" :key="index"
+ :label="item.label" :value="item.value">
+ </el-option> -->
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="6">
+ <el-form-item label="閫夊崟鍙�" prop="HSourceBillNo">
+ <el-input v-model="form.HSourceBillNo" placeholder="璇疯緭鍏ラ�夊崟鍙�" disabled>
+ <el-button slot="append" icon="el-icon-search"
+ @click="openDataDialog(openNum)"></el-button>
+ </el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row>
+ <el-col :span="12">
+ <el-form-item label="鎽樿" prop="HExplanation">
+ <el-input v-model="form.HExplanation" placeholder="璇疯緭鍏ユ憳瑕�" />
</el-form-item>
</el-col>
<el-col :span="12">
@@ -195,55 +220,18 @@
</el-table-column>
<el-table-column align="center" label="璁¢噺鍗曚綅" width="120">
<template slot-scope="scope">
- <el-input v-model="scope.row.璁¢噺鍗曚綅" placeholder="璇疯緭鍏ヨ閲忓崟浣�"
- @keyup.native.f7="openDataDialog('鍗曚綅椤甸潰杩樻病鏈�', scope.row, dwType = 'jldw')"
- @dblclick.native="openDataDialog('鍗曚綅椤甸潰杩樻病鏈�', scope.row, dwType = 'jldw')" />
+ <span>{{ scope.row.璁¢噺鍗曚綅 }}</span>
</template>
</el-table-column>
- <el-table-column align="center" label="浠撳簱" width="120">
+ <el-table-column align="center" label="瀹為��鏁伴噺" width="120">
<template slot-scope="scope">
- <el-input v-model="scope.row.浠撳簱" placeholder="璇疯緭鍏ヤ粨搴�"
- @keyup.native.f7="openDataDialog(2, scope.row, ckType = 'zb')"
- @dblclick.native="openDataDialog(2, scope.row, ckType = 'zb')" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="浠撲綅" width="120">
- <template slot-scope="scope">
- <el-input v-model="scope.row.浠撲綅" placeholder="璇疯緭鍏ヤ粨浣�"
- @keyup.native.f7="openDataDialog(9, scope.row)"
- @dblclick.native="openDataDialog(9, scope.row)" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="搴撳瓨杈呭崟浣�" width="120">
- <template slot-scope="scope">
- <el-input v-model="scope.row.搴撳瓨杈呭崟浣�" placeholder="璇疯緭鍏ュ簱瀛樿緟鍗曚綅"
- @keyup.native.f7="openDataDialog('鍗曚綅椤甸潰杩樻病鏈�', scope.row, dwType = 'kcfdw')"
- @dblclick.native="openDataDialog('鍗曚綅椤甸潰杩樻病鏈�', scope.row, dwType = 'kcfdw')" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="鍩烘湰鍗曚綅" width="120">
- <template slot-scope="scope">
- <el-input v-model="scope.row.鍩烘湰鍗曚綅" placeholder="璇疯緭鍏ュ熀鏈崟浣�"
- @keyup.native.f7="openDataDialog('鍗曚綅椤甸潰杩樻病鏈�', scope.row, dwType = 'jbdw')"
- @dblclick.native="openDataDialog('鍗曚綅椤甸潰杩樻病鏈�', scope.row, dwType = 'jbdw')" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="杈呭崟浣�" width="120">
- <template slot-scope="scope">
- <el-input v-model="scope.row.杈呭崟浣�" placeholder="璇疯緭鍏ヨ緟鍗曚綅"
- @keyup.native.f7="openDataDialog('鍗曚綅椤甸潰杩樻病鏈�', scope.row, dwType = 'fdw')"
- @dblclick.native="openDataDialog('鍗曚綅椤甸潰杩樻病鏈�', scope.row, dwType = 'fdw')" />
- </template>
- </el-table-column>
- <el-table-column align="center" label="搴旀敹鏁伴噺" width="120">
- <template slot-scope="scope">
- <el-input-number v-model="scope.row.HQtyMust" :min="1" style="width: 90px;"
+ <el-input-number v-model="scope.row.HQty" :min="1" style="width: 90px;"
controls-position="right"></el-input-number>
</template>
</el-table-column>
- <el-table-column align="center" label="瀹炴敹鏁伴噺" width="120">
+ <el-table-column align="center" label="搴旈��鏁伴噺" width="120">
<template slot-scope="scope">
- <el-input-number v-model="scope.row.HQty" :min="1" style="width: 90px;"
+ <el-input-number v-model="scope.row.HQtyMust" :min="1" style="width: 90px;"
controls-position="right"></el-input-number>
</template>
</el-table-column>
@@ -256,6 +244,35 @@
<el-table-column align="center" label="閲戦" width="120">
<template slot-scope="scope">
<span>{{ scope.row.HMoney }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="閲囪喘閲戦" width="120">
+ <template slot-scope="scope">
+ <span>{{ scope.row.HOrderPrice }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鍙戞枡浠撳簱" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.鍙戞枡浠撳簱" placeholder="璇疯緭鍏ュ彂鏂欎粨搴�"
+ @keyup.native.f7="openDataDialog(2, scope.row, ckType = 'zb')"
+ @dblclick.native="openDataDialog(2, scope.row, ckType = 'zb')" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="浠撲綅鍚嶇О" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.浠撲綅鍚嶇О" placeholder="璇疯緭鍏ヤ粨浣嶅悕绉�"
+ @keyup.native.f7="openDataDialog(9, scope.row)"
+ @dblclick.native="openDataDialog(9, scope.row)" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="鎵规" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HBatchNo" />
+ </template>
+ </el-table-column>
+ <el-table-column align="center" label="澶囨敞" width="120">
+ <template slot-scope="scope">
+ <el-input v-model="scope.row.HRemark" />
</template>
</el-table-column>
<el-table-column align="center" label="鎿嶄綔" width="55" fixed="right">
@@ -297,7 +314,7 @@
import moment from 'moment';
export default {
- name: 'Kf_StockOutRequestBill',
+ name: 'Kf_POStockInBackBill',
components: { Dept, Warehouse, Material, RowSettings, GyEmployee, GySupplier, GyStockPlace },
props: {
OperationType: { type: Number, },
@@ -308,7 +325,8 @@
},
data() {
return {
- HModName: "Kf_StockOutRequestBill",
+ HModName: "Kf_POStockInBackBill",
+ checkDisabled: true,
allVal: undefined,
zhiyuanType: '',
ckType: '',
@@ -332,7 +350,7 @@
deptform: {},//寮圭獥閫変腑鏁版嵁
openData: false,//鏁版嵁寮圭獥
dialogTitle: '',
- organizationList: [],//缁勭粐鍒楄〃
+ organizationList: JSON.parse(sessionStorage.getItem('organizationList')),//缁勭粐鍒楄〃
subDisabled: false,//缂栬緫椤甸潰淇濆瓨鎸夐挳鏄惁绂佺敤(true绂佺敤锛宖alse鍙敤)
// OperationType: this.$route.query.OperationType,//淇濆瓨绫诲瀷锛堟柊澧�1淇敼3锛�
HInterID: null,
@@ -380,40 +398,204 @@
form: {},
// 琛ㄥ崟鏍¢獙
rules: {
-
- HDate: [
- { required: true, message: "鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
+ HEmpName: [
+ { required: true, message: "璇烽�夋嫨涓氬姟鍛橈紒", trigger: "blur" }
],
- HExRate: [
- { required: true, message: "姹囩巼涓嶈兘涓虹┖", trigger: "blur" }
+ HDeptName: [
+ { required: true, message: "璇烽�夋嫨閮ㄩ棬", trigger: "blur" }
+ ],
+ HSupName: [
+ { required: true, message: "璇烽�夋嫨渚涘簲鍟嗭紒", trigger: "blur" }
+ ],
+ HWHName: [
+ { required: true, message: "璇烽�夋嫨浠撳簱锛�", trigger: "blur" }
+ ],
+ HSecManagerName: [
+ { required: true, message: "璇烽�夋嫨閫�鏂欏憳锛�", trigger: "blur" }
]
}
};
},
created() {
- this.fetchData()
+ this.getHSourceBillType()
this.getdata()
},
methods: {
- fetchData() {
- axios.get(this.baseURL + "/Web/GetOrganizations", {
+ getHSourceBillType() {
+ axios.get(this.baseURL + "/Web/GetHSourceBillType", {
+ "HName": '閲囪喘閫�鏂欏崟', "Num": 2
}).then(response => {
+ console.log(response)
+ var HSourceBillTypes = "";
if (response.data.count == 1) {
- this.organizationList = response.data.data;//缁勭粐鍒楄〃
+ let data = response.data.data
+ for (var i = 0; i < data.length; i++) {
+ HSourceBillTypes += data[i].HSourceBillType + data[i].HSourceBillTypeName;
+ }
+ console.log(111, HSourceBillTypes)
}
}).catch(error => {
+ console.log(error)
+
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
},
getdata() {
this.formShow = false
this.formLoading = true
- if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
+ if (this.OperationType == 4) {
+ this.reset()
+ //鏂板鑾峰彇鍗曟嵁鍙�
+ this.getHBillNo()
+ if (this.HSouceBillType == "1105") {
+ this.setInit_PushBill_ByPOInStockBackBill();
+ } else if (this.HSouceBillType == "1201") {
+ this.setInit_PushBill_ByPOStockInBillInit();
+ }
+ } else if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
this.handleAdd()
} else if (this.OperationType == 3 || this.copyType == 1) {
this.handleUpdate()
}
},
+ //#region 涓嬫帹椤甸潰鍒濆鍖�-閫�鏂欓�氱煡鍗�
+ setInit_PushBill_ByPOInStockBackBill() {
+ //鑾峰彇
+ var data = getUrlVars_JSON().data;
+ var dataArray = [];
+ for (var i = 0; i < data.length; i++) {
+ var temp = this.getPushSource_POInStockBackInit(data[i].hmainid, data[i].hsubid);
+ if (temp != "none") {
+ dataArray.push(temp);
+ } else {
+ return;
+ }
+ }
+ this.form.HMainSourceInterID = 0
+ this.form.HMainSourceEntryID = 0
+ this.form.HMainSourceBillNo = ""
+ this.form.HMainSourceBillType = this.HSouceBillType
+ this.form.HDeptID = dataArray[0].HDeptID
+ this.form.HDeptName = dataArray[0].閮ㄩ棬
+ this.form.HManagerID = dataArray[0].HManagerID
+ this.form.HManagerName = dataArray[0].涓荤
+ this.form.HWHID = dataArray[0].涓昏〃浠撳簱ID == null ? 0 : dataArray[0].涓昏〃浠撳簱ID
+ this.form.HWHName = dataArray[0].涓昏〃浠撳簱
+ this.form.HEmpID = dataArray[0].HEmpID
+ this.form.HEmpName = dataArray[0].涓氬姟鍛�
+ this.form.HSupID = dataArray[0].HSupID
+ this.form.HSupName = dataArray[0].渚涘簲鍟�
+ this.form.HCurID = dataArray[0].HCurID
+ this.form.HCurName = dataArray[0].甯佸埆
+ this.form.HExRate = dataArray[0].姹囩巼
+ this.form.HAddress = data.浜よ揣鍦扮偣
+ this.form.HRemark = data.琛ㄥご澶囨敞
+ this.form.HInnerBillNo = data.鍐呴儴鍗曟嵁鍙�
+ //瀛愯〃 璧嬪��
+ this.editData = [];
+ for (var i = 0; i < dataArray.length; i++) {
+ this.editData.push(
+ {
+ "HMaterID": dataArray[i].HMaterID
+ , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
+ , "HUnitID": dataArray[i].HUnitID
+ , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
+ , "HWHID": dataArray[i].HWHID
+ , "鍙戞枡浠撳簱": dataArray[i].鏀舵枡浠撳簱
+ , "HSPID": dataArray[i].HSPID
+ , "浠撲綅鍚嶇О": dataArray[i].浠撲綅鍚嶇О
+ , "HSecUnitID": dataArray[i].HSecUnitID
+ , "杈呭姪鍗曚綅": dataArray[i].杈呭姪鍗曚綅
+ , "HQty": dataArray[i].鏁伴噺.toFixed(6)
+ , "HQtyMust": dataArray[i].鏁伴噺.toFixed(6)
+ , "HPrice": dataArray[i].鍗曚环.toFixed(4)
+ , 'HDiscountRate': dataArray[i].鎶樻墸鐜� //
+ , 'HRelTaxPrice': "0"
+ , "HTaxRate": dataArray[i].绋庣巼
+ , 'HTaxMoney': dataArray[i].绋庨 //
+ , "HMoney": dataArray[i].閲戦.toFixed(2)
+ , "HRemark": dataArray[i].琛ㄤ綋澶囨敞
+ , "HSourceInterID": dataArray[i].hmainid
+ , "HSourceEntryID": dataArray[i].hsubid
+ , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
+ , "HSourceBillType": dataArray[i].HBillType
+ , "HRelationQty": "0"
+ , "HRelationMoney": "0"
+ , 'HPOOrderInterID': "0"
+ , 'HPOOrderEntryID': "0"
+ , 'HPOOrderBillNo': ""
+ , 'HSeOrderTaxPrice': dataArray[i].鍚◣鍗曚环.toFixed(4)
+ , "HSeOrderInterID": dataArray[i].hmainid
+ , "HSeOrderEntryID": dataArray[i].hsubid
+ , "HSeOrderBillNo": dataArray[i].鍗曟嵁鍙�
+ }
+ );
+ }
+ },
+ //#endregion
+ //#region 涓嬫帹椤甸潰鍒濆鍖�-閲囪喘鍏ュ簱鍗�
+ setInit_PushBill_ByPOStockInBillInit() {
+ //鑾峰彇
+ var data = getUrlVars_JSON().data;
+ var dataArray = [];
+ for (var i = 0; i < data.length; i++) {
+ var temp = getPushSource_POStockInBillInit(data[i].hmainid, data[i].hsubid);
+ if (temp != "none") {
+ dataArray.push(temp);
+ } else {
+ return;
+ }
+ }
+ this.form.HInnerBillNo = dataArray[0].鍐呴儴鍗曟嵁鍙�
+ this.form.HSupID = dataArray[0].HSupID
+ this.form.HSupName = dataArray[0].渚涘簲鍟�
+ this.form.HEmpID = dataArray[0].HEmpID
+ this.form.HEmpName = dataArray[0].涓氬姟鍛�
+ this.form.HWHID = dataArray[0].涓昏〃浠撳簱ID
+ this.form.HWHName = dataArray[0].涓昏〃浠撳簱
+ this.form.HKeeperID = dataArray[0].HKeeperID
+ this.form.HKeeperName = dataArray[0].淇濈鍛�
+ this.form.HDeptName = dataArray[0].閮ㄩ棬
+ this.form.HDeptID = dataArray[0].HDeptID
+ this.form.HManagerID = dataArray[0].HManagerID
+ this.form.HManagerName = dataArray[0].璐熻矗浜�
+ this.form.HExRate = dataArray[0].姹囩巼
+ this.form.HSourceBillType = this.HSouceBillType
+ //瀛愯〃 璧嬪��
+ this.editData = [];
+ for (var i = 0; i < dataArray.length; i++) {
+ this.editData.push(
+ {
+ "HMaterID": dataArray[i].HMaterID
+ , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
+ , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
+ , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
+ , "HUnitID": dataArray[i].HUnitID
+ , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
+ , "HWHID": dataArray[i].HWHID
+ , "鍙戞枡浠撳簱": dataArray[i].鏀舵枡浠撳簱
+ , "HSPID": dataArray[i].HSPID
+ , "浠撲綅鍚嶇О": dataArray[i].浠撲綅鍚嶇О
+ , "HQty": dataArray[i].瀹炴敹鏁伴噺.toFixed(6) - dataArray[i].鍏宠仈鏁伴噺.toFixed(6)
+ , "HQtyMust": dataArray[i].瀹炴敹鏁伴噺.toFixed(6) - dataArray[i].鍏宠仈鏁伴噺.toFixed(6)
+ , "HPrice": dataArray[i].鍗曚环.toFixed(4)
+ , "HMoney": dataArray[i].閲戦.toFixed(2)
+ , "HOrderPrice": dataArray[i].閲囪喘閲戦
+ , "HRemark": dataArray[i].琛ㄤ綋澶囨敞
+ , "HBatchNo": dataArray[i].鎵规
+ , "HSourceInterID": dataArray[i].hmainid
+ , "HSourceEntryID": dataArray[i].hsubid
+ , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
+ , "HSourceBillType": dataArray[i].HBillType
+ , "HRelationQty": "0"
+ , "HRelationMoney": "0"
+ }
+ );
+ }
+ },
+ //#endregion
// 鑾峰彇鍙傛暟_浼犻�掔殑JSON鏍煎紡鍙傛暟
getUrlVars_JSON() {
var datajson;
@@ -422,9 +604,10 @@
datajson = JSON.parse(decodeURI(arr));
return datajson;
},
- //鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢攢鍞鍗曟暟鎹�
- getPushSourceBillInit(HSourceInterID, HSourceEntryID) {
- axios.get(this.baseURL + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', {
+ //鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢��鏂欓�氱煡鍗曟暟鎹�
+ getPushSource_POInStockBackInit(HSourceInterID, HSourceEntryID) {
+ var res = "none";
+ axios.get(this.baseURL + '/Cg_POInStockBackBill/loadCg_POInStockBackBill_Push', {
params: {
"HInterID": HSourceInterID
, "HSubID": HSourceEntryID
@@ -432,13 +615,36 @@
}).then(response => {
let result = response.data
if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- this.temp = result.data[0];
+ res = result.data[0];
} else {
- this.temp = result.data;
+ res = result.data;
}
}).catch(error => {
+ res = "none";
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
+ return res;
+ },
+ // 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曢噰璐叆搴撳崟鏁版嵁
+ getPushSource_POStockInBillInit(HSourceInterID, HSourceEntryID) {
+ var res = "none";
+ axios.get(this.baseURL + '/Kf_POStockInBill/loadKf_POStockInBillEdit_Push', {
+ params: {
+ "HInterID": HSourceInterID
+ , "HSubID": HSourceEntryID
+ },
+ }).then(response => {
+ let result = response.data
+ if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ res = result.data[0];
+ } else {
+ res = result.data;
+ }
+ }).catch(error => {
+ res = "none";
+ this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
+ });
+ return res;
},
handleRowHide() {
this.rowHideShow = true
@@ -468,19 +674,19 @@
this.form.HWHName = deptRow.浠撳簱鍚嶇О;
} else if (this.ckType == 'zb') {
this.editData[this.zbIndex].HWHID = deptRow.HItemID;
- this.editData[this.zbIndex].浠撳簱 = deptRow.浠撳簱鍚嶇О;
+ this.editData[this.zbIndex].鍙戞枡浠撳簱 = deptRow.浠撳簱鍚嶇О;
}
this.warehouseShow = false
this.openData = false
} else if (num == 3) {
+ console.log(deptRow)
+ 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].HUnitID = deptRow.HUnitID;
this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿
+ this.editData[this.zbIndex].HUnitID = deptRow.HUnitID;
this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О
- this.editData[this.zbIndex].HTaxPrice = deptRow.鍚◣鎴愭湰浠�
- this.editData[this.zbIndex].HTaxRate = deptRow.榛樿绋庣巼
this.materialShow = false
this.openData = false
} else if (num == 4) {
@@ -491,9 +697,9 @@
this.form.HKeeperName = deptRow.鑱屽憳鍚嶇О
this.form.HKeeperID = deptRow.HItemID
} else if (this.zhiyuanType == 'zhuguan') {
- this.form.HMangerName = deptRow.鑱屽憳鍚嶇О
- this.form.HMangerID = deptRow.HItemID
- } else if (this.zhiyuanType == 'yanshou') {
+ this.form.HManagerName = deptRow.鑱屽憳鍚嶇О
+ this.form.HManagerID = deptRow.HItemID
+ } else if (this.zhiyuanType == 'tuiliaoyuan') {
this.form.HSecManagerName = deptRow.鑱屽憳鍚嶇О
this.form.HSecManagerID = deptRow.HItemID
}
@@ -506,7 +712,7 @@
this.openData = false
} else if (num == 9) {
this.editData[this.zbIndex].HSPID = deptRow.HMainID;
- this.editData[this.zbIndex].浠撲綅 = deptRow.浠撲綅鍚嶇О;
+ this.editData[this.zbIndex].浠撲綅鍚嶇О = deptRow.浠撲綅鍚嶇О;
this.gyStockPlaceShow = false
this.openData = false
}
@@ -531,37 +737,39 @@
//閿�鍞嚭搴撳崟鏂板缂栬緫琛ㄥ崟鍒濆鍖�
reset() {
this.form = {
- HBillNo:'',
+ HInterID: 0,
+ HBillNo: '',
HDate: moment(new Date()).format('YYYY-MM-DD'),
- HSSDate:moment(new Date()).format('YYYY-MM-DD'),
- HAddress:'',
- HDeptName:'',
- HDeptID:0,
- HSupID:0,
- HSupName:'',
- HEmpID:0,
- HEmpName:'',
- HCurID:0,
- HCurName:'',
- HExRate:'',
- HManagerName:'',
- HManagerID:0,
- HPSStyleID:0,
- HPSStyleName:'',
- HSSID:0,
- HSSName:'',
- HLinkMan:'',
- HLinkPhone:'',
- HInnerBillNo:'',
- HRemark:'',
- HMaker:sessionStorage["HSupName"],
- HChecker:'',
- HCloseMan:'',
- HMakeDate:'',
- HCheckDate:'',
- HCloseDate:'',
- HUpDateDate:'',
- HDeleteDate:'',
+ HReceiveDate: moment(new Date()).format('YYYY-MM-DD'),
+ HAddress: '',
+ HInnerBillNo: '',
+ HEmpID: 0,
+ HEmpName: '',
+ HDeptName: '',
+ HDeptID: 0,
+ HSupID: 0,
+ HSupName: '',
+ HWHName: '',
+ HWHID: 0,
+ HSecManagerName: '',
+ HSecManagerID: 0,
+ HKeeperName: '',
+ HKeeperID: 0,
+ HManagerName: '',
+ HManagerID: 0,
+ HSourceBillType: '',
+ HExplanation: '',
+ HRemark: '',
+ HMaker: sessionStorage["HSupName"],
+ HChecker: '',
+ HCloseMan: '',
+ HUpDater: '',
+ HDeleteMan: '',
+ HMakeDate: moment(new Date()).format('YYYY-MM-DD'),
+ HCheckDate: '',
+ HCloseDate: '',
+ HUpDateDate: '',
+ HDeleteDate: '',
}
this.editData = []
@@ -626,16 +834,13 @@
})
},
getHBillNo() {
- axios.get(this.baseURL + "/Web/GetMAXNum", {
+ axios.get(this.baseURL + "/WEBSController/GetMaxBillNoAndID_Json", {
params: {
- HBillType: '1242'
+ HBillType: '1239'
}
}).then(response => {
- this.form.HMaker = sessionStorage["HUserName"]
this.form.HBillNo = response.data.data[0].HBillNo
this.form.HInterID = response.data.data[0].HInterID
- // this.copyType = 0
- // this.getCzyglByUser()
}).catch(error => {
this.$modal.msgError("鎺ュ彛璇锋眰澶辫触!");
});
@@ -646,74 +851,55 @@
handleUpdate() {
this.reset()
let rowHmainid = this.linterid
- axios.get(this.baseURL + "/Kf_StockOutRequestBill/cx", {
+ axios.get(this.baseURL + "/Kf_POStockInBackBill/cx", {
params: { 'HInterID': rowHmainid }
}).then(response => {
if (response.data.count == 1) {
var result = response.data
var data = response.data.data[0]
this.allVal = data
- this.form.BillType = data.HSourceBillType
- if (this.copyType == 1) {
- this.getHBillNo()
- let date = new Date()
- this.form.HDate = moment(date).format('YYYY-MM-DD')
- } else {
- this.form.HBillNo = data.鍗曟嵁鍙�
- // this.form.HInterID = data.HInterID
- this.form.HDate = data.鏃ユ湡
- this.form.HMaker = data.鍒跺崟浜�
- this.form.HUpDater = data.淇敼浜�
- this.form.HChecker = data.瀹℃牳浜�
- this.form.HMakeDate = data.鍒跺崟鏃ユ湡
- this.form.HUpDateDate = data.淇敼鏃ユ湡
- this.form.HCheckDate = data.瀹℃牳鏃ユ湡
- this.form.HCloseMan = data.鍏抽棴浜�
- this.form.HDeleteMan = data.浣滃簾浜�
- this.form.HCloseDate = data.鍏抽棴鏃ユ湡
- this.form.HDeleteDate = data.浣滃簾鏃ユ湡
- }
- this.form.HAddress = data.浜よ揣鍦扮偣
- this.form.HDeptName = data.閮ㄩ棬
- this.form.HDeptID = data.HDeptID
+ this.form.HBillNo = data.鍗曟嵁鍙�
+ this.form.HDate = moment(data.鏃ユ湡).format('YYYY-MM-DD')
+ this.form.HInnerBillNo = data.鍐呴儴鍗曟嵁鍙�
this.form.HSupID = data.HSupID
this.form.HSupName = data.渚涘簲鍟�
this.form.HEmpID = data.HEmpID
this.form.HEmpName = data.涓氬姟鍛�
- this.form.HCurID = data.HCurID
- this.form.HCurName = data.甯佸埆
- this.form.HExRate = data.姹囩巼
- this.form.HManagerName = data.涓荤
+ this.form.HWHID = data.涓昏〃浠撳簱ID
+ this.form.HWHName = data.涓昏〃浠撳簱
+ this.form.HSecManagerID = data.HSecManagerID
+ this.form.HSecManagerName = data.楠屾敹鍛�
+ this.form.HKeeperID = data.HKeeperID
+ this.form.HKeeperName = data.淇濈鍛�
+ this.form.HDeptName = data.閮ㄩ棬
+ this.form.HDeptID = data.HDeptID
+ this.form.HSourceBillType = data.婧愬崟绫诲瀷
this.form.HManagerID = data.HManagerID
- this.form.HPSStyleID = data.HPSStyleID
- this.form.HPSStyleName = data.閲囪喘鏂瑰紡
- this.form.HSSID = data.HSSID
- this.form.HSSName = data.缁撶畻鏂瑰紡
- this.form.HLinkMan = data.鑱旂郴浜�
- this.form.HLinkPhone = data.鑱旂郴鐢佃瘽
- this.form.HInnerBillNo = data.杈呭姪瀛楁
+ this.form.HManagerName = data.璐熻矗浜�
+ this.form.HExRate = data.姹囩巼
+ this.form.HExplanation = data.鎽樿
this.form.HRemark = data.琛ㄥご澶囨敞
+ this.form.HMaker = data.鍒跺崟浜�
+ this.form.HChecker = data.瀹℃牳浜�
+ this.form.HCloseMan = data.鍏抽棴浜�
+ this.form.HUpDater = data.淇敼浜�
+ this.form.HDeleteDate = data.浣滃簾浜�
+ this.form.HMakeDate = data.鍒跺崟鏃ユ湡 == null ? "" : moment(data.鍒跺崟鏃ユ湡).format('YYYY-MM-DD hh:mm:ss')
+ this.form.HCheckDate = data.瀹℃牳鏃ユ湡 == null ? "" : moment(data.瀹℃牳鏃ユ湡).format('YYYY-MM-DD hh:mm:ss')
+ this.form.HCloseDate = data.鍏抽棴鏃ユ湡 == null ? "" : moment(data.鍏抽棴鏃ユ湡).format('YYYY-MM-DD hh:mm:ss')
+ this.form.HUpDateDate = data.淇敼鏃ユ湡 == null ? "" : moment(data.淇敼鏃ユ湡).format('YYYY-MM-DD hh:mm:ss')
+ this.form.HDeleteDate = data.浣滃簾鏃ユ湡 == null ? "" : moment(data.浣滃簾鏃ユ湡).format('YYYY-MM-DD hh:mm:ss')
for (var i = 0; i < result.data.length; i++) {
this.editData.push(
{
- "HMaterID": result.data[i].HMaterID,
- "鐗╂枡浠g爜": result.data[i].鐗╂枡浠g爜,
- "鐗╂枡鍚嶇О": result.data[i].鐗╂枡鍚嶇О,
- "瑙勬牸鍨嬪彿": result.data[i].瑙勬牸鍨嬪彿,
- "HUnitID": result.data[i].HUnitID,
- "璁¢噺鍗曚綅": result.data[i].璁¢噺鍗曚綅,
- "HQty": result.data[i].鏁伴噺,
- "HRemark": result.data[i].琛ㄤ綋澶囨敞,
- "HPrice": result.data[i].鍗曚环,
- "HMoney": result.data[i].閲戦,
- "HTaxRate": result.data[i].绋庣巼,
- "HTaxMoney": result.data[i].閲戦 * result.data[i].绋庣巼,
- "HlineTotal": result.data[i].閲戦 + result.data[i].绋庨,
- "HlineTotalBB": (result.data[i].閲戦 + result.data[i].绋庨) * result.data[i].姹囩巼,
- "HTaxPrice": result.data[i].鍚◣鍗曚环,
- "HDiscountRate": result.data[i].鎶樻墸鐜�,
- "HRelTaxPrice": data.瀹為檯鍚◣鍗曚环,
- "HDate": moment(result.data[i].浜よ揣鏃ユ湡).format('YYYY-MM-DD')
+ "HMaterID": result.data[i].HMaterID, "鐗╂枡浠g爜": result.data[i].鐗╂枡浠g爜, "鐗╂枡鍚嶇О": result.data[i].鐗╂枡鍚嶇О, "瑙勬牸鍨嬪彿": result.data[i].瑙勬牸鍨嬪彿, "HUnitID": result.data[i].HUnitID, "璁¢噺鍗曚綅": result.data[i].璁¢噺鍗曚綅,
+ "HQty": result.data[i].瀹炴敹鏁伴噺, "HQtyMust": result.data[i].搴旀敹鏁伴噺, "HRemark": result.data[i].琛ㄤ綋澶囨敞, "HPrice": result.data[i].鍗曚环, "HMoney": result.data[i].閲戦, "HOrderPrice": result.data[i].閲囪喘閲戦, "HWHID": result.data[i].HWHID, "鍙戞枡浠撳簱": result.data[i].鏀舵枡浠撳簱, "HSPID": result.data[i].HSPID, "浠撲綅鍚嶇О": result.data[i].浠撲綅鍚嶇О,
+ "HBatchNo": result.data[i].鎵规,
+ "HSourceBillNo": result.data[i].婧愬崟鍗曞彿, //婧愬崟鍙�
+ "HSourceBillType": result.data[i].婧愬崟绫诲瀷, //婧愬崟绫诲瀷
+ "HSourceInterID": result.data[i].婧愬崟涓诲唴鐮�, //婧愬崟涓诲唴鐮�
+ "HSourceEntryID": result.data[i].婧愬崟瀛愬唴鐮� //婧愬崟瀛愬唴鐮�
+
}
);
}
@@ -734,9 +920,11 @@
this.$modal.msgError("璇烽�夋嫨涓�琛屾暟鎹紪杈�!");
} else {
let obj = {
- "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 1, "璁¢噺鍗曚綅": "", "HWHID": "0", "浠撳簱": "",
- "HSPID": "0", "浠撲綅": "", "HSecUnitID": "1", "搴撳瓨杈呭崟浣�": "", "HBASEUNITID": "1", "鍩烘湰鍗曚綅": "",
- "HEXTAUXUNITID": "1", "杈呭崟浣�": "", "HQtyMust": "0", "HQty": "0", "HPrice": "0", "HMoney": "0", "HRemark": ""
+ "HMaterID": 0, "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": 0, "璁¢噺鍗曚綅": "", "HQty": "", "HRemark": "",
+ "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "鍙戞枡浠撳簱": "",
+ "HSPID": 0, "浠撲綅鍚嶇О": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
+ "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
+ "HSourceBillNo": 0, "HSourceBillType": 0, "HSourceInterID": 0, "HSourceEntryID": 0,
}
if (index) {
this.editData.splice(index, 0, obj);
@@ -805,15 +993,60 @@
}
},
- // 缂栬緫鎻愪氦淇濆瓨
+ //#region 淇濆瓨鎸夐挳
submitForm() {
+ //#region 鍒ゆ柇婧愬崟鐘舵��
+ if (this.OperationType == 1 || this.OperationType == 4) {
+ if (this.form.HSourceBillType == "1105") {
+ for (var i = 0; i < this.editData.length; i++) {
+ var HSourceBillData = "";
+ var HSourceBillData = this.getPushSource_POInStockBackInit(this.editData[i].HSourceInterID, this.editData[i].HSourceEntryID); //鑾峰彇婧愬崟鏁版嵁
+ if (HSourceBillData != "none") {
+ if (HSourceBillData == null) {
+ this.$modal.msgError("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細鏈煡璇㈠埌婧愬崟鍗曟嵁!");
+ return;
+ } else if (HSourceBillData.鐘舵�� != "宸插鏍�") {
+ var err = "淇濆瓨澶辫触!鍘熷洜锛氱" + (i + 1) + "琛�-婧愬崟鍗曟嵁鐘舵�佷负鈥�" + HSourceBillData.鐘舵�� + "鈥濓紝涓嶅厑璁镐繚瀛橈紒";
+ this.$modal.msgError(err);
+ return;
+ } else if (HSourceBillData.琛岀姸鎬� == "宸插叧闂�") {
+ this.$modal.msgError("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細璇ヨ璁板綍琛岀姸鎬佷负'宸插叧闂�'鐘舵��!");
+ return;
+ }
+ } else {
+ return;
+ }
+ }
+ } else if (this.form.HSourceBillType == "1201") {
+ for (var i = 0; i < this.editData.length; i++) {
+ var HSourceBillData = "";
+ var HSourceBillData = this.getPushSource_POStockInBillInit(this.editData[i].HSourceInterID, this.editData[i].HSourceEntryID); //鑾峰彇婧愬崟鏁版嵁
+ if (HSourceBillData != "none") {
+ if (HSourceBillData == null) {
+ this.$modal.msgError("淇濆瓨澶辫触!绗�" + (i + 1) + "琛岋細鏈煡璇㈠埌婧愬崟鍗曟嵁!");
+ return;
+ }
+ } else {
+ return;
+ }
+ }
+ }
+ else {
+ this.$modal.msgError('褰撳墠涓嶆敮鎸佽婧愬崟锛侊紒')
+ return
+ }
+ }
+ this.set_SaveBill();
+ },
+ // 缂栬緫鎻愪氦淇濆瓨
+ set_SaveBill() {
this.$refs["form"].validate(valid => {
if (valid) {
let fhck = false
this.editData.map((item, index) => {
- if (!item.浠撳簱) {
+ if (!item.鐗╂枡浠g爜) {
fhck = true
- this.$modal.msgError("绗�" + (index + 1) + "琛岋細浠撳簱鏈�夋嫨锛�");
+ this.$modal.msgError("绗�" + (index + 1) + "琛岋細鐗╂枡浠g爜涓嶈兘涓虹┖锛�");
}
})
this.$nextTick(() => {
@@ -824,15 +1057,16 @@
var sMainSub = sMainStr + ';' + sSubStr + ';' + this.OperationType + ";" + sessionStorage["HUserName"] + ';' + sAllStr;
axios({
method: 'post',
- url: this.baseURL + "/Kf_StockOutRequestBill/StockOutRequestBillEdit",
+ url: this.baseURL + "/Kf_POStockInBackBill/POStockInBackBillEdit",
data: {
'sMainSub': sMainSub
},
}).then(response => {
if (response.data.count == 1) {
- this.subDisabled = true//璁剧疆淇濆瓨鎸夐挳涓嶅彲鐢�
+ this.subDisabled = true//璁剧疆淇濆瓨鎸夐挳涓嶅彲鐢�
+ this.checkDisabled = false
this.$modal.msgSuccess(response.data.Message);
- this.close()
+ // this.close()
} else {
this.$modal.msgError(response.data.Message);
}
@@ -845,15 +1079,15 @@
});
},
// 鍙嶅鏍�/瀹℃牳鏁版嵁
- set_CheckBill(num, form) {
- var InterID = form.hmainid || form.HInterID
+ set_CheckBill(num) {
//閫昏緫瀹℃牳鏂规硶
- axios.get(this.baseURL + "/Kf_SellOutBill/AuditKf_SellOutBill", {
+ axios.get(this.baseURL + "/Kf_POStockInBackBill/AuditProcessReportList", {
params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }
}).then(response => {
let result = response.data
if (result.code == 1) {
this.$modal.msgSuccess('鎿嶄綔鎴愬姛');
+ this.close()
}
else {
this.$modal.msgError("閿欒:" + result.code + result.Message,);
--
Gitblit v1.9.1