Zhangqy 1 month ago
parent
commit
75b62a5f6a

+ 28
- 5
src/components/PopupStackWithSelectWare.vue View File

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

+ 11
- 9
src/view/record/changerecord.vue View File

72
 				</el-table-column>
72
 				</el-table-column>
73
 				<el-table-column prop="plateNo" label="钢板号" width="200px" show-overflow-tooltip align="center">
73
 				<el-table-column prop="plateNo" label="钢板号" width="200px" show-overflow-tooltip align="center">
74
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
90
 				</el-table-column>
85
 				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
91
 				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
86
 				</el-table-column>
92
 				</el-table-column>
90
 				</el-table-column>
96
 				</el-table-column>
91
 				<el-table-column prop="remark" label="备注" width="100px" show-overflow-tooltip align="left">
97
 				<el-table-column prop="remark" label="备注" width="100px" show-overflow-tooltip align="left">
92
 				</el-table-column>
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
 			</el-table>
99
 			</el-table>
98
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
100
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
99
 			 :page-sizes="pageSizes" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalRows">
101
 			 :page-sizes="pageSizes" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalRows">

+ 29
- 16
src/view/record/inrecord.vue View File

88
 				</el-table-column>
88
 				</el-table-column>
89
 				<el-table-column prop="materialName" label="品名" show-overflow-tooltip width="100px" header-align="center" align="center">
89
 				<el-table-column prop="materialName" label="品名" show-overflow-tooltip width="100px" header-align="center" align="center">
90
 				</el-table-column>
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
 				<el-table-column prop="ordNo" label="订单号" width="180px" show-overflow-tooltip align="left">
95
 				<el-table-column prop="ordNo" label="订单号" width="180px" show-overflow-tooltip align="left">
92
 				</el-table-column>
96
 				</el-table-column>
93
 				<el-table-column prop="model" label="规格" show-overflow-tooltip width="180px" align="center">
97
 				<el-table-column prop="model" label="规格" show-overflow-tooltip width="180px" align="center">
94
 				</el-table-column>
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
 				</el-table-column>
100
 				</el-table-column>
97
 				<el-table-column prop="count" label="入库数量" width="100px" show-overflow-tooltip align="right">
101
 				<el-table-column prop="count" label="入库数量" width="100px" show-overflow-tooltip align="right">
98
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
114
 				</el-table-column>
113
 				<el-table-column prop="productionPlace" label="产地" width="250" show-overflow-tooltip header-align="center">
115
 				<el-table-column prop="productionPlace" label="产地" width="250" show-overflow-tooltip header-align="center">
114
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
122
 				</el-table-column>
119
 				<el-table-column prop="addUser.userDesc" label="入库操作人" width="120px" show-overflow-tooltip align="left">
123
 				<el-table-column prop="addUser.userDesc" label="入库操作人" width="120px" show-overflow-tooltip align="left">
120
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
128
 				</el-table-column>
125
 				<el-table-column prop="recordType" label="类型" width="100px" show-overflow-tooltip align="center" :formatter="typeFormatter">
129
 				<el-table-column prop="recordType" label="类型" width="100px" show-overflow-tooltip align="center" :formatter="typeFormatter">
126
 				</el-table-column>
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
 			</el-table>
132
 			</el-table>
131
 		</div>
133
 		</div>
230
 						break;
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
 			showMaterial() {
246
 			showMaterial() {
234
 				this.$refs.PopupMaterial.show()
247
 				this.$refs.PopupMaterial.show()
235
 			},
248
 			},

+ 21
- 27
src/view/record/outrecord.vue View File

94
 				</el-table-column>
94
 				</el-table-column>
95
 				<el-table-column prop="materialName" label="品名" show-overflow-tooltip width="100px" header-align="center" align="center">
95
 				<el-table-column prop="materialName" label="品名" show-overflow-tooltip width="100px" header-align="center" align="center">
96
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
106
 				</el-table-column>
109
 				<el-table-column prop="count" label="出库数量" width="100px" show-overflow-tooltip align="right">
107
 				<el-table-column prop="count" label="出库数量" width="100px" show-overflow-tooltip align="right">
110
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
120
 				</el-table-column>
127
 				<el-table-column prop="productionPlace" label="产地" width="250" show-overflow-tooltip header-align="center">
121
 				<el-table-column prop="productionPlace" label="产地" width="250" show-overflow-tooltip header-align="center">
128
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
126
 				</el-table-column>
133
 				<el-table-column prop="addId" label="出库操作人" width="120px" show-overflow-tooltip align="left">
127
 				<el-table-column prop="addId" label="出库操作人" width="120px" show-overflow-tooltip align="left">
134
 				</el-table-column>
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
 				</el-table-column>
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
 				</el-table-column>
138
 				</el-table-column>
139
 				<el-table-column prop="recordType" label="类型" width="100px" show-overflow-tooltip align="center" :formatter="typeFormatter">
139
 				<el-table-column prop="recordType" label="类型" width="100px" show-overflow-tooltip align="center" :formatter="typeFormatter">
140
 				</el-table-column>
140
 				</el-table-column>
141
 				<el-table-column prop="verifyAccountId" v-if="false" label="对账ID" width="100px" show-overflow-tooltip align="center" >
141
 				<el-table-column prop="verifyAccountId" v-if="false" label="对账ID" width="100px" show-overflow-tooltip align="center" >
142
 				</el-table-column>
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
 			</el-table>
143
 			</el-table>
150
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
144
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
151
 			 :page-sizes="pageSizes" style="margin-left: 25px" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="totalRows">
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 View File

12
 					<el-form-item label="垛位名称" style="margin-left: -35px">
12
 					<el-form-item label="垛位名称" style="margin-left: -35px">
13
 						<el-input v-model="query.stackName" size="small" style="width:120px;margin-left: -8px"></el-input>
13
 						<el-input v-model="query.stackName" size="small" style="width:120px;margin-left: -8px"></el-input>
14
 					</el-form-item>
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
 					<el-form-item label="物料名称" style="margin-left: -35px">
19
 					<el-form-item label="物料名称" style="margin-left: -35px">
16
 						<el-input v-model="query.materialName" size="small" style="width:120px;margin-left: -8px">
20
 						<el-input v-model="query.materialName" size="small" style="width:120px;margin-left: -8px">
17
 							<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
21
 							<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
23
 						</el-input>
27
 						</el-input>
24
 					</el-form-item>
28
 					</el-form-item>
25
 					<el-form-item label="客户名称" style="margin-left: -35px">
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
 					</el-form-item>
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
 						<el-input v-model="query.model" size="small" style="width:120px;margin-left: -8px">
42
 						<el-input v-model="query.model" size="small" style="width:120px;margin-left: -8px">
32
 						</el-input>
43
 						</el-input>
33
 					</el-form-item>
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
 					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
51
 					<el-form-item label="" style="margin-top: 0px;margin-left: 10px">
35
 						<el-button @click="handleSearch" size="small"  type="primary">查询</el-button>
52
 						<el-button @click="handleSearch" size="small"  type="primary">查询</el-button>
36
 						<el-button @click="showChangeCustomer" size="small"  type="primary">货权转移</el-button>
53
 						<el-button @click="showChangeCustomer" size="small"  type="primary">货权转移</el-button>
37
 						<el-button type="primary" size="small"  @click="showDistribution">配货</el-button>
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
 					</el-form-item>
70
 					</el-form-item>
39
 				</el-row>
71
 				</el-row>
40
 				
72
 				
89
 				</el-table-column>
121
 				</el-table-column>
90
 				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
122
 				<el-table-column prop="wgtDcnMtcCd" label="计量方式" width="100" show-overflow-tooltip header-align="center">
91
 				</el-table-column>
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
 				</el-table-column>
125
 				</el-table-column>
94
 				<el-table-column prop="inwareDay" label="存储天数" width="100" show-overflow-tooltip header-align="center">
126
 				<el-table-column prop="inwareDay" label="存储天数" width="100" show-overflow-tooltip header-align="center">
95
 				</el-table-column>
127
 				</el-table-column>
101
 
133
 
102
 		<popup-material ref="PopupMaterial" @receviceFromChild="receviceFromMaterial"></popup-material>
134
 		<popup-material ref="PopupMaterial" @receviceFromChild="receviceFromMaterial"></popup-material>
103
 		<popup-customer ref="PopupCustomer" @receviceFromChild="receviceFromCustomer"></popup-customer>
135
 		<popup-customer ref="PopupCustomer" @receviceFromChild="receviceFromCustomer"></popup-customer>
136
+		<popup-customer ref="PopupFKcustmer" @receviceFromChild="receviceFKcustmerr"></popup-customer>
104
 		<popup-customer ref="PopupNewCustomer" @receviceFromChild="receviceFromNewCustomer"></popup-customer>
137
 		<popup-customer ref="PopupNewCustomer" @receviceFromChild="receviceFromNewCustomer"></popup-customer>
105
 		<popup-address ref="PopupAddress" @receviceFromChild="receviceFromAddress"></popup-address>
138
 		<popup-address ref="PopupAddress" @receviceFromChild="receviceFromAddress"></popup-address>
106
 		<popup-distribution ref="PopupDistribution" @receviceFromChild="receviceFromDistreibution" :selectRows="selectRows"></popup-distribution>
139
 		<popup-distribution ref="PopupDistribution" @receviceFromChild="receviceFromDistreibution" :selectRows="selectRows"></popup-distribution>
108
 		<popup-in ref="PopupIn" @receviceFromChild="receviceFromIn" :wares="options" :wareId="query.wareId" :stack="moveFromStack"></popup-in>
141
 		<popup-in ref="PopupIn" @receviceFromChild="receviceFromIn" :wares="options" :wareId="query.wareId" :stack="moveFromStack"></popup-in>
109
 		<el-dialog title="货权转移" :visible.sync="customerDialogVisible" width="500px">
142
 		<el-dialog title="货权转移" :visible.sync="customerDialogVisible" width="500px">
110
 			<el-form>
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
 					</el-input>
146
 					</el-input>
115
 				</el-form-item>
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
 				<el-form-item label="修改地址">
154
 				<el-form-item label="修改地址">
117
 					<el-input v-model="newAddress">
155
 					<el-input v-model="newAddress">
118
 						<el-button slot="append" icon="el-icon-search" @click="showAddress"></el-button>
156
 						<el-button slot="append" icon="el-icon-search" @click="showAddress"></el-button>
124
 				</el-form-item>
162
 				</el-form-item>
125
 			</el-form>
163
 			</el-form>
126
 		</el-dialog>
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
 		<el-dialog title="库房明细" :visible.sync="importDialogVisible" width="1000px">
214
 		<el-dialog title="库房明细" :visible.sync="importDialogVisible" width="1000px">
128
 
215
 
129
 			<el-upload class="upload-demo" action="" :on-change="handleChange" :on-exceed="handleExceed" :on-remove="handleRemove"
216
 			<el-upload class="upload-demo" action="" :on-change="handleChange" :on-exceed="handleExceed" :on-remove="handleRemove"
160
 			</el-table>
247
 			</el-table>
161
 
248
 
162
 		</el-dialog>
249
 		</el-dialog>
250
+		
163
 	</div>
251
 	</div>
164
 </template>
252
 </template>
165
 
253
 
172
 	import PopupDistribution from '@/components/PopupDistribution.vue'
260
 	import PopupDistribution from '@/components/PopupDistribution.vue'
173
 	import PopupOut from '@/components/PopupOut.vue'
261
 	import PopupOut from '@/components/PopupOut.vue'
174
 	import PopupIn from '@/components/PopupIn.vue'
262
 	import PopupIn from '@/components/PopupIn.vue'
263
+	import Export2Excel from '../../excel/Export2Excel.js'
175
 	import {
264
 	import {
176
 		mapState
265
 		mapState
177
 	} from 'vuex'
266
 	} from 'vuex'
186
 			PopupIn,
275
 			PopupIn,
187
 		},
276
 		},
188
 		computed: {
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
 			...mapState({
286
 			...mapState({
190
 				serverName: state => state.app.serverName,
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
 		data() {
294
 		data() {
201
 					materialName: '',
302
 					materialName: '',
202
 					standard: '',
303
 					standard: '',
203
 					customerName: '',
304
 					customerName: '',
204
-					plateNo: '',
305
+					plateNo: [],
205
 					wareId:'',
306
 					wareId:'',
307
+					ordNo:[],
308
+					fkcustmerName:'',
309
+					remark1:''
206
 				},
310
 				},
207
 				multipleSelection: [],
311
 				multipleSelection: [],
208
 				tableData: [],
312
 				tableData: [],
209
 				optionsWare: [],
313
 				optionsWare: [],
210
 
314
 
211
-
315
+				oldCustomer:'',
212
 				newCustomer: {
316
 				newCustomer: {
213
 					id: '',
317
 					id: '',
214
 					name: ''
318
 					name: ''
217
 
321
 
218
 				currentPage: 1,
322
 				currentPage: 1,
219
 				totalRows: 0,
323
 				totalRows: 0,
220
-				pageSizes: [50, 100, 200],
221
-				pageSize: 50,
324
+				pageSizes: [50, 100, 200,1000],
325
+				pageSize: 1000,
222
 				HideAndShow: 0,
326
 				HideAndShow: 0,
223
 
327
 
224
 
328
 
230
 				fileTemp: [],
334
 				fileTemp: [],
231
 				imTableData: [],
335
 				imTableData: [],
232
 				moveStore: {},
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
 		mounted() {
351
 		mounted() {
236
 			this.getWare()
352
 			this.getWare()
353
+			this.getAllCustomer()
237
 			//this.getTableData()
354
 			//this.getTableData()
238
 		},
355
 		},
239
 		methods: {
356
 		methods: {
244
 				this.query.materialName = material.name
361
 				this.query.materialName = material.name
245
 				this.query.standard = material.standard
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
 			showCustomer() {
375
 			showCustomer() {
249
 				this.$refs.PopupCustomer.show()
376
 				this.$refs.PopupCustomer.show()
252
 				this.query.customerName = customer.name
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
 			showNewCustomer() {
390
 			showNewCustomer() {
256
 				this.$refs.PopupNewCustomer.show()
391
 				this.$refs.PopupNewCustomer.show()
257
 			},
392
 			},
278
 					'/import.xls')
413
 					'/import.xls')
279
 			},
414
 			},
280
 			showIn() {
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
 				this.$refs.PopupIn.show()
430
 				this.$refs.PopupIn.show()
282
 			},
431
 			},
283
 			handleInBack() {
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
 						type: 'error',
440
 						type: 'error',
287
 						message: '至少选择一条数据!',
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
 			showDistribution() {
475
 			showDistribution() {
308
 				//console.log(this.selectRows.length)
476
 				//console.log(this.selectRows.length)
315
 				this.$refs.PopupDistribution.show()
483
 				this.$refs.PopupDistribution.show()
316
 
484
 
317
 			},
485
 			},
486
+			handleChangeCustomer(){
487
+				this.newCustomername = '',
488
+				this.newFKCustomername='',
489
+				this.changeCUSTDialogVisible= true
490
+			},
318
 			showOut() {
491
 			showOut() {
319
 				this.$refs.PopupOut.show()
492
 				this.$refs.PopupOut.show()
320
 			},
493
 			},
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
 			handleSizeChange(val) {
512
 			handleSizeChange(val) {
333
 				this.pageSize = val
513
 				this.pageSize = val
334
 				this.getTableData()
514
 				this.getTableData()
355
 					model: this.query.model,
535
 					model: this.query.model,
356
 					materialName: this.query.materialName,
536
 					materialName: this.query.materialName,
357
 					standard: this.query.standard,
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
 				axios.get(url, param).then(response => {
545
 				axios.get(url, param).then(response => {
361
 					if (response.data.code == 0) {
546
 					if (response.data.code == 0) {
547
+						//console.log(response.data.data.list);
362
 						this.tableData = response.data.data.list
548
 						this.tableData = response.data.data.list
363
 						this.totalRows = response.data.data.total
549
 						this.totalRows = response.data.data.total
364
 					} else {
550
 					} else {
372
 			},
558
 			},
373
 			handleSelectionChange(val) {
559
 			handleSelectionChange(val) {
374
 				this.multipleSelection = val;
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
 			showChangeCustomer() {
569
 			showChangeCustomer() {
377
 				if (this.multipleSelection.length < 1) {
570
 				if (this.multipleSelection.length < 1) {
392
 					}
585
 					}
393
 				}
586
 				}
394
 				if (boolean) {
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
 					this.customerDialogVisible = true
592
 					this.customerDialogVisible = true
593
+					
398
 				} else {
594
 				} else {
399
 					this.$message({
595
 					this.$message({
400
 						type: 'error',
596
 						type: 'error',
404
 			},
600
 			},
405
 
601
 
406
 			handleCustomerSave() {
602
 			handleCustomerSave() {
603
+				this.newCustomer.id = this.newCustomer.name;
407
 				var url = 'WareChange/changeCustomer.do'
604
 				var url = 'WareChange/changeCustomer.do'
408
 				var param = {
605
 				var param = {
606
+
409
 					json: JSON.stringify(this.multipleSelection),
607
 					json: JSON.stringify(this.multipleSelection),
410
 					customer: JSON.stringify(this.newCustomer),
608
 					customer: JSON.stringify(this.newCustomer),
411
 					address: this.newAddress
609
 					address: this.newAddress
425
 			handleCustomerCancelSave() {
623
 			handleCustomerCancelSave() {
426
 				this.customerDialogVisible = false
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
 			inImport() {
679
 			inImport() {
429
 				var url = 'WareIn/inImport.do'
680
 				var url = 'WareIn/inImport.do'
430
 				var json = JSON.stringify(this.imTableData)
681
 				var json = JSON.stringify(this.imTableData)
575
 			handleTableSelect(selection, row) {  //第一个参数是目前所有选中的数据
826
 			handleTableSelect(selection, row) {  //第一个参数是目前所有选中的数据
576
 				console.log(JSON.stringify(row))
827
 				console.log(JSON.stringify(row))
577
 				if (row.lockFlag == '1') {
828
 				if (row.lockFlag == '1') {
829
+					// this.$message({
830
+					// 	type: 'error',
831
+					// 	message: '该行已被配货锁定',
832
+					// });
578
 					alert("该行已被配货锁定")
833
 					alert("该行已被配货锁定")
579
 					this.toggleSelection([row], false)
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
 				} else {
840
 				} else {
582
 					this.selectRows = selection
841
 					this.selectRows = selection
583
 					this.setLayerColor()
842
 					this.setLayerColor()
585
 			},
844
 			},
586
 			selectAll(selection){
845
 			selectAll(selection){
587
 				this.selectRows = selection;
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
 </script>
975
 </script>

Loading…
Cancel
Save