正在显示
4 个修改的文件
包含
340 行增加
和
0 行删除
src/api/consigner/dangerous.js
0 → 100644
1 | +import axios from 'axios' | ||
2 | + | ||
3 | +let baseServiceURL = 'wms-server-warehouse' | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | +//危险品入库 | ||
8 | +export const dangerousImp = params => { return axios.get(`${baseServiceURL}/wms/newinventroyrecord/dangerousImport`, { params: params }); }; | ||
9 | +//危险品出库 | ||
10 | +export const dangerousExt = params => { return axios.get(`${baseServiceURL}/wms/newinventroyrecord/dangerousExt`, { params: params }); }; | ||
11 | +//预配信息查询 | ||
12 | +export const checkPre = params => { return axios.get(`${baseServiceURL}/wms/newinventroyrecord/checkPre`, { params: params }); }; |
@@ -127,6 +127,8 @@ import area from './views/deploy/area.vue' | @@ -127,6 +127,8 @@ import area from './views/deploy/area.vue' | ||
127 | import seller from './views/deploy/seller.vue' | 127 | import seller from './views/deploy/seller.vue' |
128 | import classification from './views/deploy/classification.vue' | 128 | import classification from './views/deploy/classification.vue' |
129 | import subscribe from './views/deploy/subscribe.vue' | 129 | import subscribe from './views/deploy/subscribe.vue' |
130 | +import DangerousImport from './views/deploy/dangerImport.vue' | ||
131 | +import DangerousExt from './views/deploy/dangerExt.vue' | ||
130 | 132 | ||
131 | 133 | ||
132 | 134 | ||
@@ -590,6 +592,8 @@ let routes = [ | @@ -590,6 +592,8 @@ let routes = [ | ||
590 | {path:'/seller',component:seller,name:'商品管理'}, | 592 | {path:'/seller',component:seller,name:'商品管理'}, |
591 | {path:'/classification',component:classification,name:'分类监管申请'}, | 593 | {path:'/classification',component:classification,name:'分类监管申请'}, |
592 | {path:'/subscribe',component:subscribe,name:'分类监管查询'}, | 594 | {path:'/subscribe',component:subscribe,name:'分类监管查询'}, |
595 | + {path:'/DangerousImport',component:DangerousImport,name:'危险品入库'}, | ||
596 | + {path:'/DangerousExt',component:DangerousExt,name:'危险品出库'}, | ||
593 | ] | 597 | ] |
594 | }, | 598 | }, |
595 | { | 599 | { |
src/views/deploy/dangerExt.vue
0 → 100644
1 | +<template> | ||
2 | + <el-container class="form-container"> | ||
3 | + <el-header> | ||
4 | + <h1>危险品出库</h1> | ||
5 | + </el-header> | ||
6 | + <el-main> | ||
7 | + <el-card class="form-card"> | ||
8 | + <el-form :label-position="labelPosition" :model="form" ref="form" label-width="100px" :rules="rules"> | ||
9 | + <el-form-item label="运单号" prop="waybill"> | ||
10 | + <el-input class="form-input" v-model="form.waybill" placeholder="请输入运单号" clearable @blur="handleBlur"></el-input> | ||
11 | + </el-form-item> | ||
12 | + <el-form-item label="件数" prop="pcs"> | ||
13 | + <el-input class="form-input" type="number" v-model="form.pcs" placeholder="请输入件数" clearable></el-input> | ||
14 | + </el-form-item> | ||
15 | + <el-form-item label="重量 (kg)" prop="weight"> | ||
16 | + <el-input class="form-input" type="number" v-model="form.weight" placeholder="请输入重量" clearable></el-input> | ||
17 | + </el-form-item> | ||
18 | + <el-form-item label="危险品" prop="hazardous"> | ||
19 | + <el-select class="form-input" v-model="form.hazardous" placeholder="请选择"> | ||
20 | + <el-option | ||
21 | + v-for="item in options" | ||
22 | + :key="item.value" | ||
23 | + :label="item.label" | ||
24 | + :value="item.value"> | ||
25 | + </el-option> | ||
26 | + </el-select> | ||
27 | + </el-form-item> | ||
28 | + <el-form-item> | ||
29 | + <el-button type="primary" @click="submitForm" class="submit-button">危险品出库</el-button> | ||
30 | + </el-form-item> | ||
31 | + </el-form> | ||
32 | + </el-card> | ||
33 | + </el-main> | ||
34 | + </el-container> | ||
35 | +</template> | ||
36 | + | ||
37 | +<script> | ||
38 | + import {selectNewInventroys} from '../../api/consigner/station' | ||
39 | + import {dangerousExt,} from '../../api/consigner/dangerous' | ||
40 | + export default { | ||
41 | + data() { | ||
42 | + return { | ||
43 | + options: [ | ||
44 | + { | ||
45 | + value: "3481", | ||
46 | + label: '一般危险品' | ||
47 | + }, { | ||
48 | + value: "3091", | ||
49 | + label: '锂电池' | ||
50 | + } | ||
51 | + ], | ||
52 | + labelPosition:'left', | ||
53 | + form: { | ||
54 | + waybill: '', | ||
55 | + pcs: null, | ||
56 | + weight: null, | ||
57 | + hazardous: '3481' | ||
58 | + }, | ||
59 | + queryInfo: { | ||
60 | + waybill:'', | ||
61 | + billfhl:'', | ||
62 | + locationno:'', | ||
63 | + // 当前页数 | ||
64 | + pageNum: 1, | ||
65 | + // 每页大小 | ||
66 | + pageSize: 10, | ||
67 | + starttime:'', | ||
68 | + endtime:'', | ||
69 | + remark2:'' | ||
70 | + }, | ||
71 | + rules: { | ||
72 | + waybill: [ | ||
73 | + { required: true, message: '运单号不能为空', trigger: 'blur' } | ||
74 | + ], | ||
75 | + pcs: [ | ||
76 | + { required: true, message: '件数不能为空', trigger: 'blur' } | ||
77 | + ], | ||
78 | + weight: [ | ||
79 | + { required: true, message: '重量不能为空', trigger: 'blur' } | ||
80 | + ], | ||
81 | + hazardous: [ | ||
82 | + { required: true, message: '请选择是否为危险品', trigger: 'change' } | ||
83 | + ] | ||
84 | + } | ||
85 | + }; | ||
86 | + }, | ||
87 | + methods: { | ||
88 | + submitForm() { | ||
89 | + this.$refs.form.validate((valid) => { | ||
90 | + if (valid) { | ||
91 | + dangerousExt(this.form).then((response) => { | ||
92 | + const res = response.data | ||
93 | + if (res.code !== '200') { | ||
94 | + return this.$message.error(res.msg) | ||
95 | + } | ||
96 | + this.$message.success(res.msg); | ||
97 | + this.$refs.form.resetFields(); | ||
98 | + }).catch(error => { | ||
99 | + // 关闭加载 | ||
100 | + this.$message.error(error.toString()) | ||
101 | + }) | ||
102 | + } else { | ||
103 | + return false; | ||
104 | + } | ||
105 | + }); | ||
106 | + }, | ||
107 | + handleBlur() { | ||
108 | + // 在这里处理失去焦点事件 | ||
109 | + if(this.form.waybill!==null && this.form.waybill!==''){ | ||
110 | + this.queryInfo.waybill=this.form.waybill; | ||
111 | + selectNewInventroys(this.queryInfo).then((response) => { | ||
112 | + const res = response.data | ||
113 | + if (res.code !== '200') { | ||
114 | + return this.$message.error('剩余库调取失败') | ||
115 | + } | ||
116 | + if(res.data.list!==null){ | ||
117 | + this.form.pcs=res.data.list[0].pcs; | ||
118 | + this.form.weight=res.data.list[0].weight; | ||
119 | + this.form.hazardous=res.data.list[0].remark3; | ||
120 | + } | ||
121 | + this.$message.success('库存调取成功') | ||
122 | + }).catch(error => { | ||
123 | + // 关闭加载 | ||
124 | + this.$message.error(error.toString()) | ||
125 | + }) | ||
126 | + } | ||
127 | + // 你可以在这里执行其他操作,比如验证输入或发送请求等 | ||
128 | + } | ||
129 | + } | ||
130 | + }; | ||
131 | +</script> | ||
132 | + | ||
133 | +<style scoped> | ||
134 | + .form-container { | ||
135 | + background-color: #f5f5f5; | ||
136 | + padding: 20px; | ||
137 | + min-height: 100vh; | ||
138 | + } | ||
139 | + | ||
140 | + .el-header { | ||
141 | + text-align: center; | ||
142 | + margin-bottom: 20px; | ||
143 | + color: #333; | ||
144 | + } | ||
145 | + | ||
146 | + .form-card { | ||
147 | + background-color: #ffffff; | ||
148 | + border-radius: 8px; | ||
149 | + padding: 20px; | ||
150 | + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); | ||
151 | + } | ||
152 | + | ||
153 | + .form-input { | ||
154 | + width: 100%; /* 设置宽度为100% */ | ||
155 | + } | ||
156 | + | ||
157 | + .submit-button { | ||
158 | + width: 100%; | ||
159 | + } | ||
160 | + | ||
161 | + .el-form-item { | ||
162 | + margin-bottom: 15px; | ||
163 | + } | ||
164 | + | ||
165 | + @media (max-width: 600px) { | ||
166 | + .form-container { | ||
167 | + padding: 10px; | ||
168 | + } | ||
169 | + } | ||
170 | +</style> |
src/views/deploy/dangerImport.vue
0 → 100644
1 | +<template> | ||
2 | + <el-container class="form-container"> | ||
3 | + <el-header> | ||
4 | + <h1>危险品入库</h1> | ||
5 | + </el-header> | ||
6 | + <el-main> | ||
7 | + <el-card class="form-card"> | ||
8 | + <el-form :label-position="labelPosition" :model="form" ref="form" label-width="100px" :rules="rules"> | ||
9 | + <el-form-item label="运单号" prop="waybill"> | ||
10 | + <el-input class="form-input" v-model="form.waybill" placeholder="请输入运单号" clearable @blur="handleBlur"></el-input> | ||
11 | + </el-form-item> | ||
12 | + <el-form-item label="件数" prop="pcs"> | ||
13 | + <el-input class="form-input" type="number" v-model="form.pcs" placeholder="请输入件数" clearable></el-input> | ||
14 | + </el-form-item> | ||
15 | + <el-form-item label="重量 (kg)" prop="weight"> | ||
16 | + <el-input class="form-input" type="number" v-model="form.weight" placeholder="请输入重量" clearable></el-input> | ||
17 | + </el-form-item> | ||
18 | + <el-form-item label="危险品" prop="hazardous"> | ||
19 | + <el-select class="form-input" v-model="form.hazardous" placeholder="请选择"> | ||
20 | + <el-option | ||
21 | + v-for="item in options" | ||
22 | + :key="item.value" | ||
23 | + :label="item.label" | ||
24 | + :value="item.value"> | ||
25 | + </el-option> | ||
26 | + </el-select> | ||
27 | + </el-form-item> | ||
28 | + <el-form-item> | ||
29 | + <el-button type="success" @click="submitForm" class="submit-button">危险品入库</el-button> | ||
30 | + </el-form-item> | ||
31 | + </el-form> | ||
32 | + </el-card> | ||
33 | + </el-main> | ||
34 | + </el-container> | ||
35 | +</template> | ||
36 | + | ||
37 | +<script> | ||
38 | + import {dangerousImp,checkPre} from '../../api/consigner/dangerous' | ||
39 | + import axios from 'axios'; | ||
40 | + export default { | ||
41 | + data() { | ||
42 | + return { | ||
43 | + responseData: null, | ||
44 | + options: [ | ||
45 | + { | ||
46 | + value: "3481", | ||
47 | + label: '一般危险品' | ||
48 | + }, { | ||
49 | + value: "3091", | ||
50 | + label: '锂电池' | ||
51 | + } | ||
52 | + ], | ||
53 | + labelPosition:'left', | ||
54 | + form: { | ||
55 | + waybill: '', | ||
56 | + pcs: null, | ||
57 | + weight: null, | ||
58 | + hazardous: '3481' | ||
59 | + }, | ||
60 | + rules: { | ||
61 | + waybill: [ | ||
62 | + { required: true, message: '运单号不能为空', trigger: 'blur' } | ||
63 | + ], | ||
64 | + pcs: [ | ||
65 | + { required: true, message: '件数不能为空', trigger: 'blur' } | ||
66 | + ], | ||
67 | + weight: [ | ||
68 | + { required: true, message: '重量不能为空', trigger: 'blur' } | ||
69 | + ], | ||
70 | + hazardous: [ | ||
71 | + { required: true, message: '请选择是否为危险品', trigger: 'change' } | ||
72 | + ] | ||
73 | + } | ||
74 | + }; | ||
75 | + }, | ||
76 | + methods: { | ||
77 | + submitForm() { | ||
78 | + this.$refs.form.validate((valid) => { | ||
79 | + if (valid) { | ||
80 | + dangerousImp(this.form).then((response) => { | ||
81 | + const res = response.data | ||
82 | + if (res.code !== '200') { | ||
83 | + return this.$message.error(res.msg) | ||
84 | + } | ||
85 | + this.$message.success(res.msg); | ||
86 | + this.$refs.form.resetFields(); | ||
87 | + }).catch(error => { | ||
88 | + // 关闭加载 | ||
89 | + this.$message.error(error.toString()) | ||
90 | + }) | ||
91 | + } else { | ||
92 | + return false; | ||
93 | + } | ||
94 | + }); | ||
95 | + }, | ||
96 | + handleBlur() { | ||
97 | + if(this.form.waybill!==null && this.form.waybill!==''){ | ||
98 | + checkPre({waybill:this.form.waybill}).then((response) => { | ||
99 | + const res = response.data | ||
100 | + if (res.code !== '200') { | ||
101 | + return this.$message.error(res.msg) | ||
102 | + } | ||
103 | + this.$message.success(res.msg); | ||
104 | + this.form.pcs=res.data.pcs; | ||
105 | + this.form.weight=res.data.weight; | ||
106 | + }).catch(error => { | ||
107 | + // 关闭加载 | ||
108 | + this.$message.error(error.toString()) | ||
109 | + }) | ||
110 | + } | ||
111 | + } | ||
112 | + }, | ||
113 | + | ||
114 | + }; | ||
115 | +</script> | ||
116 | + | ||
117 | +<style scoped> | ||
118 | + .form-container { | ||
119 | + background-color: #f5f5f5; | ||
120 | + padding: 20px; | ||
121 | + min-height: 100vh; | ||
122 | + } | ||
123 | + | ||
124 | + .el-header { | ||
125 | + text-align: center; | ||
126 | + margin-bottom: 20px; | ||
127 | + color: #333; | ||
128 | + } | ||
129 | + | ||
130 | + .form-card { | ||
131 | + background-color: #ffffff; | ||
132 | + border-radius: 8px; | ||
133 | + padding: 20px; | ||
134 | + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); | ||
135 | + } | ||
136 | + | ||
137 | + .form-input { | ||
138 | + width: 100%; /* 设置宽度为100% */ | ||
139 | + } | ||
140 | + | ||
141 | + .submit-button { | ||
142 | + width: 100%; | ||
143 | + } | ||
144 | + | ||
145 | + .el-form-item { | ||
146 | + margin-bottom: 15px; | ||
147 | + } | ||
148 | + | ||
149 | + @media (max-width: 600px) { | ||
150 | + .form-container { | ||
151 | + padding: 10px; | ||
152 | + } | ||
153 | + } | ||
154 | +</style> |
-
请 注册 或 登录 后发表评论