Zhangqy 1 个月前
父节点
当前提交
75b62a5f6a

+ 28
- 5
src/components/PopupStackWithSelectWare.vue 查看文件

@@ -1,16 +1,20 @@
1 1
 <template>
2 2
 	<div>
3
-		<el-dialog title="添加信息" :visible.sync="dialogVisible" width="700px">
3
+		<el-dialog title="添加信息" :visible.sync="dialogVisible" width="1100px">
4 4
 			<el-row>
5 5
 				<el-select v-model="wareId" clearable placeholder="请选择" @change="changeWare">
6 6
 					<el-option v-for="item in wares" :key="item.id" :label="item.name" :value="item.id">
7 7
 					</el-option>
8 8
 				</el-select>
9
+				<el-select v-model="areaId" style="margin-left: 5px; width: 100px" clearable placeholder="请选择区域" @change="changeArea">
10
+					<el-option v-for="item in optionsArea" :key="item.id" :label="item.name" :value="item.code">
11
+					</el-option>
12
+				</el-select>
9 13
 				<el-input v-model="layer" style="width: 200px;" v-show="layerVisible"></el-input>
10 14
 				<el-button type="success" @click="handleComfirm">确定</el-button>
11 15
 			</el-row>
12 16
 			<el-row>
13
-				<div id="popMoveWareLayout" style=" margin:10px;width:600px; height: 300px;background-color: #00FFFF;"></div>
17
+				<div id="popMoveWareLayout" style=" margin:10px;width:1000px; height: 650px;background-color: #00FFFF;"></div>
14 18
 			<!-- 	<div id="popMoveStoreLayer" style=" margin:10px;width:600px; height: 300px;background-color: #00FFFF;"></div> -->
15 19
 			</el-row>
16 20
 		</el-dialog>
@@ -42,7 +46,9 @@
42 46
 		data() {
43 47
 			return {
44 48
 				wareId: '',
49
+				areaId: '',
45 50
 				wareStack: [],
51
+				optionsArea: [],
46 52
 				dialogVisible: false,
47 53
 				layerVisible: false,
48 54
 				popMoveWare: {},
@@ -76,7 +82,8 @@
76 82
 				//console.log(this.wareName)
77 83
 				var url = 'MaintStack/queryByWareId.do'
78 84
 				var param = {
79
-					wareId: this.wareId
85
+					wareId: this.wareId,
86
+					areaId: this.areaId
80 87
 				}
81 88
 				axios.get(url, param).then(response => {
82 89
 					// alert(JSON.stringify(response));
@@ -208,11 +215,21 @@
208 215
 					this.wares = response.data.data
209 216
 					//console.log("getWare() :" + JSON.stringify(this.options))
210 217
 					if (response.data.data.length == 1) {
211
-						this.query.wareId = response.data.data[0].id
212
-						this.getAllStackByWareId(this.query.wareId)
218
+						this.wareId = response.data.data[0].id
219
+						this.getAllStackByWareId(this.wareId)
220
+						this.getArea()
213 221
 					}
214 222
 				});
215 223
 			},
224
+			getArea() {
225
+				var url = 'MaintArea/queryAll.do'
226
+      			var param = {
227
+          			wareId: this.wareId
228
+        		}
229
+      			axios.get(url, param).then(response => {
230
+      				this.optionsArea = response.data.data
231
+				});
232
+			},
216 233
 			drawStoreNoLayer(data) {
217 234
 				//console.log("drawStoreLayer(data)");
218 235
 				this.popMoveStore = zrender.init(document.getElementById('popMoveStoreLayer'));
@@ -245,6 +262,12 @@
245 262
 				if (val != '') {
246 263
 					this.getAllStackByWareId()
247 264
 				}
265
+				this.getArea()
266
+			},
267
+			changeArea(val) {
268
+				if (val != '') {
269
+					this.getAllStackByWareId(val)
270
+				}
248 271
 			},
249 272
 			setColor() {
250 273
 				for (let i = 0; i < this.popMoveWare.storage._roots.length; i++) {

+ 11
- 9
src/view/record/changerecord.vue 查看文件

@@ -72,15 +72,21 @@
72 72
 				</el-table-column>
73 73
 				<el-table-column prop="plateNo" label="钢板号" width="200px" show-overflow-tooltip align="center">
74 74
 				</el-table-column>
75
-				<el-table-column prop="recordType" label="类型" width="100px" show-overflow-tooltip align="center" :formatter="typeFormatter">
75
+				<el-table-column prop="fkCustomerNameOld" label="原货权单位" show-overflow-tooltip width="300px">
76 76
 				</el-table-column>
77
-				<el-table-column prop="customerNameOld" label="客户名称" show-overflow-tooltip width="300px">
77
+				<el-table-column prop="customerNameOld" label="客户名称" show-overflow-tooltip width="300px">
78 78
 				</el-table-column>
79
-				<el-table-column prop="receiveAddressOld" label="收货地址" width="300" show-overflow-tooltip align="left">
79
+				<el-table-column prop="fkCustomerNameNew" label="新货权单位" show-overflow-tooltip width="300px">
80 80
 				</el-table-column>
81
-				<el-table-column prop="customerNameNew" label="客户名称" show-overflow-tooltip width="300px">
81
+				<el-table-column prop="customerNameNew" label="客户名称" show-overflow-tooltip width="300px">
82 82
 				</el-table-column>
83
-				<el-table-column prop="receiveAddressNew" label="收货地址" width="300" show-overflow-tooltip align="left">
83
+				<el-table-column prop="receiveAddressOld" label="原收货地址" width="300" show-overflow-tooltip align="left">
84
+				</el-table-column>
85
+				<el-table-column prop="receiveAddressNew" label="新收货地址" width="300" show-overflow-tooltip align="left">
86
+				</el-table-column>
87
+				<el-table-column prop="addTime" label="操作时间" width="200px" show-overflow-tooltip align="left">
88
+				</el-table-column>
89
+				<el-table-column prop="addUser.userDesc" label="操作人" width="100px" show-overflow-tooltip align="left">
84 90
 				</el-table-column>
85 91
 				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
86 92
 				</el-table-column>
@@ -90,10 +96,6 @@
90 96
 				</el-table-column>
91 97
 				<el-table-column prop="remark" label="备注" width="100px" show-overflow-tooltip align="left">
92 98
 				</el-table-column>
93
-				<el-table-column prop="addUser.userDesc" label="操作人" width="100px" show-overflow-tooltip align="left">
94
-				</el-table-column>
95
-				<el-table-column prop="addTime" label="操作时间" width="200px" show-overflow-tooltip align="left">
96
-				</el-table-column>
97 99
 			</el-table>
98 100
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
99 101
 			 :page-sizes="pageSizes" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalRows">

+ 29
- 16
src/view/record/inrecord.vue 查看文件

@@ -88,44 +88,46 @@
88 88
 				</el-table-column>
89 89
 				<el-table-column prop="materialName" label="品名" show-overflow-tooltip width="100px" header-align="center" align="center">
90 90
 				</el-table-column>
91
+				<el-table-column prop="standard" label="钢种" show-overflow-tooltip width="80px" align="center">
92
+				</el-table-column>
93
+				<el-table-column prop="plateNo" label="产品编号" width="200px" show-overflow-tooltip align="center">
94
+				</el-table-column>
91 95
 				<el-table-column prop="ordNo" label="订单号" width="180px" show-overflow-tooltip align="left">
92 96
 				</el-table-column>
93 97
 				<el-table-column prop="model" label="规格" show-overflow-tooltip width="180px" align="center">
94 98
 				</el-table-column>
95
-				<el-table-column prop="standard" label="钢种" show-overflow-tooltip width="80px" align="center">
99
+				<el-table-column prop="weight" label="入库重量" width="100px" show-overflow-tooltip align="right">
96 100
 				</el-table-column>
97 101
 				<el-table-column prop="count" label="入库数量" width="100px" show-overflow-tooltip align="right">
98 102
 				</el-table-column>
99
-				<el-table-column prop="weight" label="入库重量" width="100px" show-overflow-tooltip align="right">
103
+				<el-table-column prop="contractNo" label="合约号" width="120" show-overflow-tooltip align="right" header-align="center">
104
+				</el-table-column>
105
+				<el-table-column prop="carNo" label="入库车号" width="120px" show-overflow-tooltip align="left">
100 106
 				</el-table-column>
101
-				<el-table-column prop="plateNo" label="钢板号" width="200px" show-overflow-tooltip align="center">
107
+				<el-table-column prop="addTime" label="入库时间" width="200px" show-overflow-tooltip align="left">
102 108
 				</el-table-column>
103
-				<el-table-column prop="customerName" label="货权单位" width="200px" show-overflow-tooltip align="center">
104
-				</el-table-column>   <!-- 原客户名称 -->
105
-				<el-table-column prop="fkComponyName" label="付款单位" width="200px" show-overflow-tooltip align="center">
106
-				</el-table-column>   <!-- 新增 -->
107
-				<el-table-column prop="receiveAddress" label="收货地址" width="300" show-overflow-tooltip align="left">
109
+				<el-table-column prop="fkComponyName" label="货权单位" width="200px" show-overflow-tooltip align="center">
108 110
 				</el-table-column>
109
-				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
111
+				<el-table-column prop="customerName" label="客户名称" width="200px" show-overflow-tooltip align="center">
110 112
 				</el-table-column>
111
-				<el-table-column prop="edgeTy" label="切边类型" width="100" show-overflow-tooltip header-align="center">
113
+				<el-table-column prop="receiveAddress" label="收货地址" width="300" show-overflow-tooltip align="left">
112 114
 				</el-table-column>
113 115
 				<el-table-column prop="productionPlace" label="产地" width="250" show-overflow-tooltip header-align="center">
114 116
 				</el-table-column>
115
-				<el-table-column prop="carNo" label="入库车号" width="120px" show-overflow-tooltip align="left">
117
+				<el-table-column prop="packNo" label="捆包号" width="180" show-overflow-tooltip header-align="center">
116 118
 				</el-table-column>
117
-				<el-table-column prop="tallyPeople" label="入库理货人员" width="250" show-overflow-tooltip header-align="center">
119
+				<el-table-column prop="remark" label="备注" width="100px" show-overflow-tooltip align="left">
120
+				</el-table-column>
121
+				<el-table-column prop="outFlag" label="货物状态" width="100px" show-overflow-tooltip align="left" :formatter="outFormatter">
118 122
 				</el-table-column>
119 123
 				<el-table-column prop="addUser.userDesc" label="入库操作人" width="120px" show-overflow-tooltip align="left">
120 124
 				</el-table-column>
121
-				<el-table-column prop="addTime" label="入库时间" width="200px" show-overflow-tooltip align="left">
125
+				<el-table-column prop="tallyPeople" label="吊装工" width="250" show-overflow-tooltip header-align="center">
122 126
 				</el-table-column>
123
-				<el-table-column prop="remark" label="备注" width="100px" show-overflow-tooltip align="left">
127
+				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
124 128
 				</el-table-column>
125 129
 				<el-table-column prop="recordType" label="类型" width="100px" show-overflow-tooltip align="center" :formatter="typeFormatter">
126 130
 				</el-table-column>
127
-				<el-table-column prop="remark" label="备注" width="100px" show-overflow-tooltip align="left">
128
-				</el-table-column>
129 131
 				
130 132
 			</el-table>
131 133
 		</div>
@@ -230,6 +232,17 @@
230 232
 						break;
231 233
 				}
232 234
 			},
235
+			outFormatter: function(row, column) {
236
+				switch (row.outFlag) {
237
+
238
+					case "0":
239
+						return "正常在库";
240
+						break;
241
+					default:
242
+						return "已出库";
243
+						break;
244
+				}
245
+			},
233 246
 			showMaterial() {
234 247
 				this.$refs.PopupMaterial.show()
235 248
 			},

+ 21
- 27
src/view/record/outrecord.vue 查看文件

@@ -94,58 +94,52 @@
94 94
 				</el-table-column>
95 95
 				<el-table-column prop="materialName" label="品名" show-overflow-tooltip width="100px" header-align="center" align="center">
96 96
 				</el-table-column>
97
-				<el-table-column prop="ordNo" label="订单号" width="180px" show-overflow-tooltip align="left">
98
-				</el-table-column>
99
-				<el-table-column prop="inUser" label="入库人" width="100px" show-overflow-tooltip align="left">
97
+				<el-table-column prop="standard" label="钢种" show-overflow-tooltip width="80px" align="center">
100 98
 				</el-table-column>
101
-				<el-table-column prop="inCarNo" label="入库车号" width="120px" show-overflow-tooltip align="left">
99
+				<el-table-column prop="plateNo" label="产品编号" width="200px" show-overflow-tooltip align="center">
102 100
 				</el-table-column>
103
-				<el-table-column prop="inTime" label="入库时间" width="200px" show-overflow-tooltip align="left">
101
+				<el-table-column prop="ordNo" label="订单号" width="180px" show-overflow-tooltip align="left">
104 102
 				</el-table-column>
105
-				<el-table-column prop="model" label="规格" show-overflow-tooltip width="180px" align="center">
103
+				<el-table-column prop="model" label="规格型号" show-overflow-tooltip width="180px" align="center">
106 104
 				</el-table-column>
107
-				<el-table-column prop="standard" label="钢种" show-overflow-tooltip width="80px" align="center">
105
+				<el-table-column prop="weight" label="出库重量" width="100px" show-overflow-tooltip align="right">
108 106
 				</el-table-column>
109 107
 				<el-table-column prop="count" label="出库数量" width="100px" show-overflow-tooltip align="right">
110 108
 				</el-table-column>
111
-				<el-table-column prop="weight" label="出库重量" width="100px" show-overflow-tooltip align="right">
109
+				<el-table-column prop="contractNo" label="合约号" width="100px" show-overflow-tooltip align="left">
112 110
 				</el-table-column>
113
-				<el-table-column prop="invoicePrice" label="基价" width="100px" show-overflow-tooltip align="right">
111
+				<el-table-column prop="outCarNo" label="出库车号" width="100px" show-overflow-tooltip align="left">
114 112
 				</el-table-column>
115
-				<el-table-column prop="plateNo" label="钢板号" width="200px" show-overflow-tooltip align="center">
113
+				<el-table-column prop="addTime" label="出库时间" width="200px" show-overflow-tooltip align="left">
116 114
 				</el-table-column>
117
-				<el-table-column prop="customerName" label="货权单位" width="200px" show-overflow-tooltip align="center">
118
-				</el-table-column>   <!-- 原客户名称 -->
119
-				<el-table-column prop="fkComponyName" label="付款单位" width="200px" show-overflow-tooltip align="center">
120
-				</el-table-column>   <!-- 新增 -->
121
-				<el-table-column prop="receiveAddress" label="收货地址" width="300" show-overflow-tooltip align="left">
115
+				<el-table-column prop="fkComponyName" label="货权单位" width="200px" show-overflow-tooltip align="center">
122 116
 				</el-table-column>
123
-				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
117
+				<el-table-column prop="customerName" label="客户名称" width="200px" show-overflow-tooltip align="center">
124 118
 				</el-table-column>
125
-				<el-table-column prop="edgeTy" label="切边类型" width="100" show-overflow-tooltip header-align="center">
119
+				<el-table-column prop="receiveAddress" label="收货地址" width="300" show-overflow-tooltip align="left">
126 120
 				</el-table-column>
127 121
 				<el-table-column prop="productionPlace" label="产地" width="250" show-overflow-tooltip header-align="center">
128 122
 				</el-table-column>
129
-				<el-table-column prop="outCarNo" label="出库车号" width="100px" show-overflow-tooltip align="left">
123
+				<el-table-column prop="packNo" label="捆包号" width="250" show-overflow-tooltip header-align="center">
130 124
 				</el-table-column>
131
-				<el-table-column prop="tallyPeople" label="出库理货人员" width="180px" show-overflow-tooltip align="left">
125
+				<el-table-column prop="remark" label="备注" width="100px" show-overflow-tooltip align="left">
132 126
 				</el-table-column>
133 127
 				<el-table-column prop="addId" label="出库操作人" width="120px" show-overflow-tooltip align="left">
134 128
 				</el-table-column>
135
-				<el-table-column prop="addTime" label="出库时间" width="200px" show-overflow-tooltip align="left">
129
+				<el-table-column prop="tallyPeople" label="吊装工" width="180px" show-overflow-tooltip align="left">
136 130
 				</el-table-column>
137
-				<el-table-column prop="remark" label="备注" width="100px" show-overflow-tooltip align="left">
131
+				<el-table-column prop="inCarNo" label="入库车号" width="120px" show-overflow-tooltip align="left">
132
+				</el-table-column>
133
+				<el-table-column prop="inTime" label="入库时间" width="200px" show-overflow-tooltip align="left">
134
+				</el-table-column>
135
+				<el-table-column prop="inUser" label="入库操作人" width="150px" show-overflow-tooltip align="left">
136
+				</el-table-column>
137
+				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
138 138
 				</el-table-column>
139 139
 				<el-table-column prop="recordType" label="类型" width="100px" show-overflow-tooltip align="center" :formatter="typeFormatter">
140 140
 				</el-table-column>
141 141
 				<el-table-column prop="verifyAccountId" v-if="false" label="对账ID" width="100px" show-overflow-tooltip align="center" >
142 142
 				</el-table-column>
143
-				
144
-				
145
-				
146
-				
147
-				<el-table-column prop="backFlag" label="取消标记" show-overflow-tooltip width="100px" align="center">
148
-				</el-table-column>
149 143
 			</el-table>
150 144
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
151 145
 			 :page-sizes="pageSizes" style="margin-left: 25px" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalRows">

+ 420
- 36
src/view/ware/storechange.vue 查看文件

@@ -12,6 +12,10 @@
12 12
 					<el-form-item label="垛位名称" style="margin-left: -35px">
13 13
 						<el-input v-model="query.stackName" size="small" style="width:120px;margin-left: -8px"></el-input>
14 14
 					</el-form-item>
15
+					<el-form-item label="钢板号" style="margin-left: -15px">
16
+						<el-input v-model="query.plateNo" size="small" style="width:120px;margin-left: -8px" @input="getPltList">
17
+						</el-input>
18
+					</el-form-item>
15 19
 					<el-form-item label="物料名称" style="margin-left: -35px">
16 20
 						<el-input v-model="query.materialName" size="small" style="width:120px;margin-left: -8px">
17 21
 							<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
@@ -23,18 +27,46 @@
23 27
 						</el-input>
24 28
 					</el-form-item>
25 29
 					<el-form-item label="客户名称" style="margin-left: -35px">
26
-						<el-input v-model="query.customerName" size="small" style="width:170px;margin-left: -8px">
27
-							<el-button slot="append" icon="el-icon-search" @click="showCustomer"></el-button>
28
-						</el-input>
30
+						<el-select v-model="query.fkcustmerName" filterable placeholder="请选择客户名称" clearable size="small" style="margin-left: 5px; width: 170px">
31
+							<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
32
+							</el-option>
33
+						</el-select>
29 34
 					</el-form-item>
30
-					<el-form-item label="规格型号" style="margin-left: -15px;margin-top: -3px">
35
+					<el-form-item label="订单客户" style="margin-left: -35px">
36
+						<el-select v-model="query.customerName" filterable placeholder="请选择订单客户" clearable size="small" style="margin-left: 5px; width: 170px">
37
+							<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
38
+							</el-option>
39
+						</el-select>
40
+					</el-form-item>
41
+					<el-form-item label="规格型号" style="margin-left: -15px">
31 42
 						<el-input v-model="query.model" size="small" style="width:120px;margin-left: -8px">
32 43
 						</el-input>
33 44
 					</el-form-item>
45
+					
46
+					<el-form-item label="订单号" style="margin-left: -15px">
47
+						<el-input v-model="query.ordNo" size="small" style="width:120px;margin-left: -8px" @input="getOrdList">
48
+						</el-input>
49
+					</el-form-item>
50
+
34 51
 					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
35 52
 						<el-button @click="handleSearch" size="small"  type="primary">查询</el-button>
36 53
 						<el-button @click="showChangeCustomer" size="small"  type="primary">货权转移</el-button>
37 54
 						<el-button type="primary" size="small"  @click="showDistribution">配货</el-button>
55
+            			<el-button type="primary" size="small"  @click="showOut">出库</el-button>
56
+            			
57
+						<el-button type="primary" size="small"  @click="resetButton" >重置</el-button>
58
+            			<el-button type="success" size="small"  @click="handleExport" >导出记录</el-button>
59
+						
60
+					</el-form-item>
61
+					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
62
+						<el-dropdown placement="bottom" trigger="click" @command="batchOperate">
63
+							<el-button type="danger" size="small"> 其他操作<i class="el-icon-arrow-down el-icon--right"></i></el-button>
64
+							<el-dropdown-menu slot="dropdown">
65
+								<el-dropdown-item command="handleInBack" style="background-color: #f5f5f5;">取消入库</el-dropdown-item>
66
+								<el-dropdown-item command="handleChangeCustomer" style="background-color: #f5f5f5;">修改客户</el-dropdown-item>
67
+							</el-dropdown-menu>
68
+						</el-dropdown>
69
+						
38 70
 					</el-form-item>
39 71
 				</el-row>
40 72
 				
@@ -89,7 +121,7 @@
89 121
 				</el-table-column>
90 122
 				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
91 123
 				</el-table-column>
92
-				<el-table-column prop="" label="月付方式" width="100" show-overflow-tooltip header-align="center">
124
+				<el-table-column prop="payWay" label="月付方式" width="100" show-overflow-tooltip header-align="center">
93 125
 				</el-table-column>
94 126
 				<el-table-column prop="inwareDay" label="存储天数" width="100" show-overflow-tooltip header-align="center">
95 127
 				</el-table-column>
@@ -101,6 +133,7 @@
101 133
 
102 134
 		<popup-material ref="PopupMaterial" @receviceFromChild="receviceFromMaterial"></popup-material>
103 135
 		<popup-customer ref="PopupCustomer" @receviceFromChild="receviceFromCustomer"></popup-customer>
136
+		<popup-customer ref="PopupFKcustmer" @receviceFromChild="receviceFKcustmerr"></popup-customer>
104 137
 		<popup-customer ref="PopupNewCustomer" @receviceFromChild="receviceFromNewCustomer"></popup-customer>
105 138
 		<popup-address ref="PopupAddress" @receviceFromChild="receviceFromAddress"></popup-address>
106 139
 		<popup-distribution ref="PopupDistribution" @receviceFromChild="receviceFromDistreibution" :selectRows="selectRows"></popup-distribution>
@@ -108,11 +141,16 @@
108 141
 		<popup-in ref="PopupIn" @receviceFromChild="receviceFromIn" :wares="options" :wareId="query.wareId" :stack="moveFromStack"></popup-in>
109 142
 		<el-dialog title="货权转移" :visible.sync="customerDialogVisible" width="500px">
110 143
 			<el-form>
111
-				<el-form-item label="货权转移">
112
-					<el-input v-model="newCustomer.name">
113
-						<el-button slot="append" icon="el-icon-search" @click="showNewCustomer"></el-button>
144
+				<el-form-item label="旧货主">
145
+					<el-input v-model="oldCustomer">
114 146
 					</el-input>
115 147
 				</el-form-item>
148
+				<el-form-item label="新货主">
149
+					<el-select v-model="newCustomer.name" filterable placeholder="请选择订单客户" clearable>
150
+						<el-option v-for="item in optionsCust" :key="item.id" :label="item.name" :value="item.id" >
151
+						</el-option>
152
+					</el-select>
153
+				</el-form-item>
116 154
 				<el-form-item label="修改地址">
117 155
 					<el-input v-model="newAddress">
118 156
 						<el-button slot="append" icon="el-icon-search" @click="showAddress"></el-button>
@@ -124,6 +162,55 @@
124 162
 				</el-form-item>
125 163
 			</el-form>
126 164
 		</el-dialog>
165
+
166
+		<el-dialog title="垛位备注" :visible.sync="stackDialogVisible" width="500px">
167
+			<el-form>
168
+				<el-form-item label="库房名称" style="margin-left: -15px">
169
+					<el-select v-model="newWare" clearable size="small" style="width:120px;margin-left: -8px">
170
+						<el-option v-for="item in optionsWare" :key="item.id" :label="item.name" :value="item.name">
171
+						</el-option>
172
+					</el-select>
173
+				</el-form-item>
174
+				<el-form-item label="新垛位">
175
+					<el-input v-model="newStack">
176
+					</el-input>
177
+				</el-form-item>
178
+				<el-form-item label="新垛位备注">
179
+					<el-input v-model="newRemark1">
180
+					</el-input>
181
+				</el-form-item>
182
+				<el-form-item label="新备注信息">
183
+					<el-input v-model="newRemark">
184
+					</el-input>
185
+				</el-form-item>
186
+				<el-form-item label=" ">
187
+					<el-button type="success" @click="handleStackSave">保存</el-button>
188
+					<el-button type="danger" @click="handleStackCancelSave">取消</el-button>
189
+				</el-form-item>
190
+			</el-form>
191
+		</el-dialog>
192
+
193
+		<el-dialog title="修改客户信息" :visible.sync="changeCUSTDialogVisible" width="500px">
194
+			<el-form>
195
+				<el-form-item label="新订单客户" >
196
+					<el-select v-model="newCustomername" filterable placeholder="请选择客户名称" clearable size="small" >
197
+						<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
198
+						</el-option>
199
+					</el-select>
200
+				</el-form-item>
201
+				<el-form-item label="新客户名称" >
202
+					<el-select v-model="newFKCustomername" filterable placeholder="请选择客户名称" clearable size="small" >
203
+						<el-option v-for="item in optionsCust" :key="item.name" :label="item.name" :value="item.name" >
204
+						</el-option>
205
+					</el-select>
206
+				</el-form-item>
207
+				
208
+				<el-form-item label=" ">
209
+					<el-button type="success" @click="handleChangeCUSTSave">保存</el-button>
210
+					<el-button type="danger" @click="handleChangeCUSTCancelSave">取消</el-button>
211
+				</el-form-item>
212
+			</el-form>
213
+		</el-dialog>
127 214
 		<el-dialog title="库房明细" :visible.sync="importDialogVisible" width="1000px">
128 215
 
129 216
 			<el-upload class="upload-demo" action="" :on-change="handleChange" :on-exceed="handleExceed" :on-remove="handleRemove"
@@ -160,6 +247,7 @@
160 247
 			</el-table>
161 248
 
162 249
 		</el-dialog>
250
+		
163 251
 	</div>
164 252
 </template>
165 253
 
@@ -172,6 +260,7 @@
172 260
 	import PopupDistribution from '@/components/PopupDistribution.vue'
173 261
 	import PopupOut from '@/components/PopupOut.vue'
174 262
 	import PopupIn from '@/components/PopupIn.vue'
263
+	import Export2Excel from '../../excel/Export2Excel.js'
175 264
 	import {
176 265
 		mapState
177 266
 	} from 'vuex'
@@ -186,8 +275,20 @@
186 275
 			PopupIn,
187 276
 		},
188 277
 		computed: {
278
+			// splitCount: function() {
279
+			// 	let result = Number(this.split.originalCount) - Number(this.split.count)
280
+			// 	return result
281
+			// },
282
+			// splitWeight: function() {
283
+			// 	let result = Number(this.split.originalWeight) - Number(this.split.weight)
284
+			// 	return result
285
+			// },
189 286
 			...mapState({
190 287
 				serverName: state => state.app.serverName,
288
+				// wareBackgroundColor: state => state.color.wareBackgroundColor,
289
+				// stackColor: state => state.color.stackColor,
290
+				// stackSelectedColor: state => state.color.stackSelectedColor,
291
+				// lockColor: state => state.color.lockColor,
191 292
 			})
192 293
 		},
193 294
 		data() {
@@ -201,14 +302,17 @@
201 302
 					materialName: '',
202 303
 					standard: '',
203 304
 					customerName: '',
204
-					plateNo: '',
305
+					plateNo: [],
205 306
 					wareId:'',
307
+					ordNo:[],
308
+					fkcustmerName:'',
309
+					remark1:''
206 310
 				},
207 311
 				multipleSelection: [],
208 312
 				tableData: [],
209 313
 				optionsWare: [],
210 314
 
211
-
315
+				oldCustomer:'',
212 316
 				newCustomer: {
213 317
 					id: '',
214 318
 					name: ''
@@ -217,8 +321,8 @@
217 321
 
218 322
 				currentPage: 1,
219 323
 				totalRows: 0,
220
-				pageSizes: [50, 100, 200],
221
-				pageSize: 50,
324
+				pageSizes: [50, 100, 200,1000],
325
+				pageSize: 1000,
222 326
 				HideAndShow: 0,
223 327
 
224 328
 
@@ -230,10 +334,23 @@
230 334
 				fileTemp: [],
231 335
 				imTableData: [],
232 336
 				moveStore: {},
337
+                optionsCust: [],
338
+				sumCount:'',
339
+				sumWeight:'',
340
+
341
+				stackDialogVisible: false,
342
+				newWare:'',
343
+				newStack:'',
344
+				newRemark1:'',
345
+				newRemark:'',
346
+				changeCUSTDialogVisible: false,
347
+				newCustomername:'',
348
+				newFKCustomername:''
233 349
 			};
234 350
 		},
235 351
 		mounted() {
236 352
 			this.getWare()
353
+			this.getAllCustomer()
237 354
 			//this.getTableData()
238 355
 		},
239 356
 		methods: {
@@ -244,6 +361,16 @@
244 361
 				this.query.materialName = material.name
245 362
 				this.query.standard = material.standard
246 363
 			},
364
+			batchOperate(command) {
365
+				switch (command) {
366
+					case "handleInBack":
367
+						this.handleInBack();
368
+						break;
369
+					case "handleChangeCustomer":
370
+						this.handleChangeCustomer();
371
+						break;
372
+				}
373
+			},
247 374
 
248 375
 			showCustomer() {
249 376
 				this.$refs.PopupCustomer.show()
@@ -252,6 +379,14 @@
252 379
 				this.query.customerName = customer.name
253 380
 			},
254 381
 
382
+			
383
+			showFKcustmer() {
384
+				this.$refs.PopupFKcustmer.show()
385
+			},
386
+			receviceFKcustmerr(customer) {
387
+				this.query.fkcustmerName = customer.name
388
+			},
389
+
255 390
 			showNewCustomer() {
256 391
 				this.$refs.PopupNewCustomer.show()
257 392
 			},
@@ -278,31 +413,64 @@
278 413
 					'/import.xls')
279 414
 			},
280 415
 			showIn() {
416
+				// if (this.query.wareId == '') {
417
+				// 	this.$message({
418
+				// 		type: 'error',
419
+				// 		message: '请选择入库库房'
420
+				// 	});
421
+				// 	return
422
+				// }
423
+				// if (this.query.stackId == '') {
424
+				// 	this.$message({
425
+				// 		type: 'error',
426
+				// 		message: '请选择入库垛位'
427
+				// 	});
428
+				// 	return
429
+				// }
281 430
 				this.$refs.PopupIn.show()
282 431
 			},
283 432
 			handleInBack() {
284
-				if (this.selectRows.length < 1) {
285
-					this.$message({
433
+				this.$confirm("确认删除吗?", "提示", {
434
+					confirmButtonText:'确认',
435
+					cancelButtonText:'取消',
436
+					type: "warning"
437
+				}).then(() => {
438
+					if (this.selectRows.length < 1) {
439
+						this.$message({
286 440
 						type: 'error',
287 441
 						message: '至少选择一条数据!',
288
-					});
289
-					return
290
-				} else {
291
-					var url = 'WareIn/back.do'
292
-					var param = {
293
-						json: JSON.stringify(this.selectRows),
294
-					}
295
-					axios.post(url, param).then(response => {
296
-						if (response.data.code == 0) {
297
-							this.getStoreByStackId(response.data.data)
298
-						} else {
299
-							this.$message({
300
-								type: 'error',
301
-								message: '操作失败;' + response.data.msg,
302
-							});
442
+						});
443
+						return
444
+					} else {
445
+						var url = 'WareIn/back.do'
446
+						var param = {
447
+							json: JSON.stringify(this.selectRows),
303 448
 						}
304
-					});
305
-				}
449
+						axios.post(url, param).then(response => {
450
+							if (response.data.code == 0) {
451
+								this.getStoreByStackId(response.data.data)
452
+							} else {
453
+								this.$message({
454
+									type: 'error',
455
+									message: '操作失败;' + response.data.msg,
456
+								});
457
+							}
458
+						});
459
+					}
460
+				}).catch(() => {});
461
+				
462
+			},
463
+			resetButton(){      //查询条件重置
464
+				this.query.wareName = '',
465
+				this.query.stackName = '',
466
+				this.query.model = '',
467
+				this.query.materialName = '',
468
+				this.query.standard = '',
469
+				this.query.customerName = '',
470
+				this.query.plateNo = '',
471
+				this.query.wareId = '',
472
+				this.query.ordNo = '',
473
+				this.query.fkcustmerName = ''
306 474
 			},
307 475
 			showDistribution() {
308 476
 				//console.log(this.selectRows.length)
@@ -315,6 +483,11 @@
315 483
 				this.$refs.PopupDistribution.show()
316 484
 
317 485
 			},
486
+			handleChangeCustomer(){
487
+				this.newCustomername = '',
488
+				this.newFKCustomername='',
489
+				this.changeCUSTDialogVisible= true
490
+			},
318 491
 			showOut() {
319 492
 				this.$refs.PopupOut.show()
320 493
 			},
@@ -329,6 +502,13 @@
329 502
 					}
330 503
 				});
331 504
 			},
505
+			getAllCustomer() {
506
+				var url = 'MaintCustomer/queryByUserId.do'
507
+				var param = {}
508
+				axios.get(url, param).then(response => {
509
+					this.optionsCust = response.data.data
510
+				});
511
+			},
332 512
 			handleSizeChange(val) {
333 513
 				this.pageSize = val
334 514
 				this.getTableData()
@@ -355,10 +535,16 @@
355 535
 					model: this.query.model,
356 536
 					materialName: this.query.materialName,
357 537
 					standard: this.query.standard,
358
-					customerName: this.query.customerName
538
+					customerName: this.query.customerName,
539
+					fkcustmerName: this.query.fkcustmerName,
540
+					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
541
+					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
542
+					remark1: this.query.remark1
359 543
 				}
544
+				//console.log(param);
360 545
 				axios.get(url, param).then(response => {
361 546
 					if (response.data.code == 0) {
547
+						//console.log(response.data.data.list);
362 548
 						this.tableData = response.data.data.list
363 549
 						this.totalRows = response.data.data.total
364 550
 					} else {
@@ -372,6 +558,13 @@
372 558
 			},
373 559
 			handleSelectionChange(val) {
374 560
 				this.multipleSelection = val;
561
+				this.sumCount =0;
562
+				this.sumWeight=0;
563
+				for (var i = 0; i < this.multipleSelection.length; i++){
564
+					this.sumCount = parseInt(this.multipleSelection[i].count)+parseInt(this.sumCount);
565
+					this.sumWeight = parseFloat(this.multipleSelection[i].weight)+parseFloat(this.sumWeight);
566
+				}
567
+				this.sumWeight = this.sumWeight.toFixed(3);
375 568
 			},
376 569
 			showChangeCustomer() {
377 570
 				if (this.multipleSelection.length < 1) {
@@ -392,9 +585,12 @@
392 585
 					}
393 586
 				}
394 587
 				if (boolean) {
395
-					this.newCustomer = this.multipleSelection[0].customer
396
-					this.newAddress = this.multipleSelection[0].receiveAddress
588
+					this.oldCustomer = this.multipleSelection[0].customer.name
589
+					//this.newAddress = this.multipleSelection[0].receiveAddress
590
+					this.newCustomer.name = "",
591
+					this.newCustomer.id = "",
397 592
 					this.customerDialogVisible = true
593
+					
398 594
 				} else {
399 595
 					this.$message({
400 596
 						type: 'error',
@@ -404,8 +600,10 @@
404 600
 			},
405 601
 
406 602
 			handleCustomerSave() {
603
+				this.newCustomer.id = this.newCustomer.name;
407 604
 				var url = 'WareChange/changeCustomer.do'
408 605
 				var param = {
606
+
409 607
 					json: JSON.stringify(this.multipleSelection),
410 608
 					customer: JSON.stringify(this.newCustomer),
411 609
 					address: this.newAddress
@@ -425,6 +623,59 @@
425 623
 			handleCustomerCancelSave() {
426 624
 				this.customerDialogVisible = false
427 625
 			},
626
+			handleRemark1(){
627
+				this.stackDialogVisible= true;
628
+				this.newStack='';
629
+				this.newRemark1='';
630
+				this.newRemark = '';
631
+			},
632
+			handleChangeCUSTSave(){
633
+				var url = 'WareStore/changeCustName.do'
634
+				var param = {
635
+					json: JSON.stringify(this.multipleSelection),
636
+					newCustomername: this.newCustomername,
637
+					newFKCustomername: this.newFKCustomername,
638
+				}
639
+				axios.post(url, param).then(response => {
640
+					if (response.data.code == 0) {
641
+						this.getTableData()
642
+						this.changeCUSTDialogVisible = false
643
+					} else {
644
+						this.$message({
645
+							type: 'error',
646
+							message: '操作失败;' + response.data.msg,
647
+						});
648
+					}
649
+				});
650
+			},
651
+			handleChangeCUSTCancelSave(){
652
+				this.changeCUSTDialogVisible = false
653
+			},
654
+			handleStackSave(){
655
+				var url = 'WareStore/changeStack.do'
656
+				var param = {
657
+
658
+					json: JSON.stringify(this.multipleSelection),
659
+					newWare: this.newWare,
660
+					newStack: this.newStack,
661
+					newRemark1: this.newRemark1,
662
+					newRemark: this.newRemark
663
+				}
664
+				axios.post(url, param).then(response => {
665
+					if (response.data.code == 0) {
666
+						this.getTableData()
667
+						this.stackDialogVisible = false
668
+					} else {
669
+						this.$message({
670
+							type: 'error',
671
+							message: '操作失败;' + response.data.msg,
672
+						});
673
+					}
674
+				});
675
+			},
676
+			handleStackCancelSave(){
677
+				this.stackDialogVisible = false
678
+			},
428 679
 			inImport() {
429 680
 				var url = 'WareIn/inImport.do'
430 681
 				var json = JSON.stringify(this.imTableData)
@@ -575,9 +826,17 @@
575 826
 			handleTableSelect(selection, row) {  //第一个参数是目前所有选中的数据
576 827
 				console.log(JSON.stringify(row))
577 828
 				if (row.lockFlag == '1') {
829
+					// this.$message({
830
+					// 	type: 'error',
831
+					// 	message: '该行已被配货锁定',
832
+					// });
578 833
 					alert("该行已被配货锁定")
579 834
 					this.toggleSelection([row], false)
580
-
835
+					// for(let i = 0;i<selection.length;i++){
836
+					//  if(selection[i]==row){
837
+					// 	 selection.splice(i,1)
838
+					//  }
839
+					// }
581 840
 				} else {
582 841
 					this.selectRows = selection
583 842
 					this.setLayerColor()
@@ -585,7 +844,132 @@
585 844
 			},
586 845
 			selectAll(selection){
587 846
 				this.selectRows = selection;
588
-			}
847
+			},
848
+			getlist(){
849
+				const replaceResult = this.query.plateNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
850
+				this.query.plateNo = replaceResult;
851
+			},
852
+			getPltList(){
853
+				const replaceResult = this.query.plateNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
854
+				this.query.plateNo = replaceResult;
855
+			},
856
+			getOrdList(){
857
+				const replaceResult = this.query.ordNo.replace(/[;,,;\s\r\n]+/g, ",").split(",");
858
+				this.query.ordNo = replaceResult;
859
+			},
860
+
861
+			handleExport() {
862
+				var imptData = [];
863
+				var url = 'WareStore/queryStore.do'
864
+				var param = {
865
+					page: -1,
866
+					rows: -1,
867
+					wareName: this.query.wareName,
868
+					stackName: this.query.stackName,
869
+					model: this.query.model,
870
+					materialName: this.query.materialName,
871
+					standard: this.query.standard,
872
+					customerName: this.query.customerName,
873
+					fkcustmerName: this.query.fkcustmerName,
874
+					plateNo: this.query.plateNo.length == 0 ? '' : this.query.plateNo.join(','),
875
+					ordNo: this.query.ordNo == 0 ? '' : this.query.ordNo.join(','),
876
+					remark1: this.query.remark1
877
+				}
878
+
879
+
880
+				axios.get(url, param).then(response => {
881
+
882
+					if (response.data.code == 0) {
883
+						console.log(response);
884
+						var imptData = response.data.data;
885
+						if (imptData.length == 0) {
886
+							this.$alert('无法导出,没有库存', '提示', {
887
+								confirmButtonText: '确定',
888
+								callback: action => {}
889
+							});
890
+						} else {
891
+
892
+							this.exportExcel(imptData)
893
+						}
894
+					} else {
895
+						this.$message({
896
+							type: 'error',
897
+							message: '操作失败;' + response.data.msg,
898
+						});
899
+					}
900
+
901
+				});
902
+				
903
+			},
904
+			exportExcel(imptData) {
905
+				// alert(JSON.stringify(imptData))
906
+				const header = ["层数"
907
+								,"垛位"
908
+								,"货物品名"
909
+								,"材质"
910
+								,"钢板号"
911
+								,"规格型号"
912
+								,"数量"
913
+								,"重量"
914
+								,"订单号"
915
+								,"合约号"
916
+								,"订单客户"
917
+								,"客户名称"
918
+								,"收货地址"
919
+								,"产地"
920
+								,"备注"
921
+								,"垛位备注"
922
+								,"入库时间"
923
+								,"入库车号"
924
+
925
+				] // 导出的表头名
926
+				const filterVal = ["layer"
927
+									,"stackName"
928
+									,"materialName"
929
+									,"materialStandard"
930
+									,"plateNo"
931
+									,"model"
932
+									,"count"
933
+									,"weight"
934
+									,"ordNo"
935
+									,"contractNo"
936
+									,"customerName"
937
+									,"customerName"
938
+									,"receiveAddress"
939
+									,"productionPlace"
940
+									,"remark"
941
+									,"remark1"
942
+									,"addTime"
943
+									,"carNo"
944
+				]
945
+				for(var i=0;i<imptData.length;i++){
946
+					imptData[i]["stackName"] 			= imptData[i].stack.name;
947
+					imptData[i]["materialName"]     	= imptData[i].material.name;
948
+					imptData[i]["materialStandard"]     = imptData[i].material.standard;
949
+					imptData[i]["customerName"]     	= imptData[i].customer.name;
950
+				}
951
+				const list = imptData
952
+				const data = this.formatJson(filterVal, list)
953
+
954
+				const filename = '库存信息' + (new Date()).toLocaleDateString();
955
+				Export2Excel.export_json_to_excel({
956
+					header,
957
+					data,
958
+					filename
959
+				})
960
+			},
961
+			formatJson(filterVal, jsonData) {
962
+				return jsonData.map(v => filterVal.map(j => {
963
+					return v[j]
964
+				}))
965
+			},
966
+
967
+			//showChangeAddress() {},
968
+			// handleAddressSave() {
969
+			// },
970
+			// handleAddressCancelSave() {
971
+			// 	this.addressDialogVisible = false
972
+			// },
589 973
 		},
590 974
 	}
591 975
 </script>

正在加载...
取消
保存