瀏覽代碼

修改价格管理界面

YL2767 3 月之前
父節點
當前提交
5b7dce03fb
共有 2 個檔案被更改,包括 52 行新增48 行删除
  1. 2
    2
      config/dev.env.js
  2. 50
    46
      src/view/maint/price.vue

+ 2
- 2
config/dev.env.js 查看文件

4
 
4
 
5
 module.exports = merge(prodEnv, {
5
 module.exports = merge(prodEnv, {
6
   NODE_ENV: '"development"',
6
   NODE_ENV: '"development"',
7
-  BASE_API: '"http://120.224.213.150/thware/"'
8
-	//BASE_API: '"http://localhost:8080/thware/"'
7
+  // BASE_API: '"http://120.224.213.150/thware/"'
8
+	BASE_API: '"http://localhost:8080/thware/"'
9
 	// BASE_API: '"http://47.104.245.159:8081/thware/"'
9
 	// BASE_API: '"http://47.104.245.159:8081/thware/"'
10
 })
10
 })

+ 50
- 46
src/view/maint/price.vue 查看文件

2
 	<div>
2
 	<div>
3
 		<el-row>
3
 		<el-row>
4
 			<el-form :model="query" label-width="100px" inline="">
4
 			<el-form :model="query" label-width="100px" inline="">
5
-				<el-form-item label="物料名称">
6
-					<el-input v-model="query.materialName" size="small" style="width: 300px;">
7
-						<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
8
-					</el-input>
9
-				</el-form-item>
10
-				<el-form-item label="钢种">
11
-					<el-input v-model="query.standard" size="small" style="width: 300px;">
12
-						<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
5
+				<el-form-item label="客户名称">
6
+					<el-input v-model="query.customerName" size="small" style="width: 300px;">
7
+						<el-button slot="append" icon="el-icon-search" @click="showCustomer"></el-button>
13
 					</el-input>
8
 					</el-input>
14
 				</el-form-item>
9
 				</el-form-item>
15
 				<el-button type="info" @click="search" size="small">查询</el-button>
10
 				<el-button type="info" @click="search" size="small">查询</el-button>
19
 
14
 
20
 		<el-table v-loading="loading" :data="tableData" border>
15
 		<el-table v-loading="loading" :data="tableData" border>
21
 			<el-table-column prop="id" label="编号" width="60" v-if="isShow"></el-table-column>
16
 			<el-table-column prop="id" label="编号" width="60" v-if="isShow"></el-table-column>
22
-			<el-table-column prop="material.name" label="物料" width="180" show-overflow-tooltip ></el-table-column>
23
-			<el-table-column prop="material.standard" label="钢种" width="180" show-overflow-tooltip ></el-table-column>
24
-			<el-table-column prop="storageType" label="类型" width="180" show-overflow-tooltip align="center" :formatter="typeFormatter"></el-table-column>
25
-			<el-table-column prop="storagePrice" label="价格" width="100" show-overflow-tooltip align="right"></el-table-column>
26
-				<el-table-column prop="weightPrice" label="价格" width="100" show-overflow-tooltip align="right"></el-table-column>
17
+			<el-table-column prop="customer.name" label="客户名称" width="180" show-overflow-tooltip ></el-table-column>
18
+			<el-table-column prop="keepDay" label="保存天数" width="180" show-overflow-tooltip ></el-table-column>
19
+			<el-table-column prop="ordPrice" label="价格" width="180" show-overflow-tooltip ></el-table-column>
20
+			<el-table-column prop="outOrdPrice" label="超期价格" width="180" show-overflow-tooltip ></el-table-column>
27
 			<el-table-column prop="addUser.userDesc" label="添加人" width="120" show-overflow-tooltip ></el-table-column>
21
 			<el-table-column prop="addUser.userDesc" label="添加人" width="120" show-overflow-tooltip ></el-table-column>
28
 			<el-table-column prop="addTime" label="添加时间" width="200" show-overflow-tooltip ></el-table-column>
22
 			<el-table-column prop="addTime" label="添加时间" width="200" show-overflow-tooltip ></el-table-column>
29
 			<el-table-column label="操作" width="200">
23
 			<el-table-column label="操作" width="200">
42
 
36
 
43
 		<!-- 弹出框  另起名字  var json = JSON.stringify(this.自己起的名字)
37
 		<!-- 弹出框  另起名字  var json = JSON.stringify(this.自己起的名字)
44
         var url = 后台对应的url 'MaintPrice/save.do' -->
38
         var url = 后台对应的url 'MaintPrice/save.do' -->
45
-		<el-dialog title="物料明细" :visible.sync="dialogVisible" width="500px">
39
+		<el-dialog title="价格配置" :visible.sync="dialogVisible" width="500px">
46
 			<el-form :model="obj" label-width="100px">
40
 			<el-form :model="obj" label-width="100px">
47
 				<el-form-item label="id" v-if="isShow">
41
 				<el-form-item label="id" v-if="isShow">
48
 					<el-input v-model="obj.id"></el-input>
42
 					<el-input v-model="obj.id"></el-input>
49
 				</el-form-item>
43
 				</el-form-item>
50
-				<el-form-item label="物料">
51
-					<el-input v-model="obj.material.name" style="width: 300px;">
52
-						<el-button slot="append" icon="el-icon-search" @click="showMaterialDialog"></el-button>
44
+				<el-form-item label="客户名称">
45
+					<el-input v-model="obj.customer.name" style="width: 300px;">
46
+						<el-button slot="append" icon="el-icon-search" @click="showCustomerDialog"></el-button>
53
 					</el-input>
47
 					</el-input>
54
 				</el-form-item>
48
 				</el-form-item>
55
-				<el-form-item label="钢种">
56
-					<el-input v-model="obj.material.standard" style="width: 300px;">
57
-						<el-button slot="append" icon="el-icon-search" @click="showMaterialDialog"></el-button>
58
-					</el-input>
49
+				<el-form-item label="保存时间">
50
+					<el-input v-model="obj.keepDay" style="width: 300px;"></el-input>
59
 				</el-form-item>
51
 				</el-form-item>
60
-				<el-form-item label="类型">
61
-					<el-select v-model="obj.storageType" placeholder="请选择" style="width: 300px;">
62
-						<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
63
-						</el-option>
64
-					</el-select>
52
+				<el-form-item label="价格">
53
+					<el-input v-model="obj.ordPrice" style="width: 300px;"></el-input>
65
 				</el-form-item>
54
 				</el-form-item>
66
-				<el-form-item label="库存单价">
67
-					<el-input v-model="obj.storagePrice" style="width: 300px;"></el-input>
68
-				</el-form-item>
69
-				<el-form-item label="过磅单价">
70
-					<el-input v-model="obj.weightPrice" style="width: 300px;"></el-input>
55
+				<el-form-item label="超期价格">
56
+					<el-input v-model="obj.outOrdPrice" style="width: 300px;"></el-input>
71
 				</el-form-item>
57
 				</el-form-item>
72
 				<el-form-item>
58
 				<el-form-item>
73
 					<el-button type="success" @click="handleSave">保存</el-button>
59
 					<el-button type="success" @click="handleSave">保存</el-button>
75
 				</el-form-item>
61
 				</el-form-item>
76
 			</el-form>
62
 			</el-form>
77
 		</el-dialog>
63
 		</el-dialog>
64
+
65
+
78
 		<popup-material ref="PopupMaterial" @receviceFromChild="receviceFromMaterial"></popup-material>
66
 		<popup-material ref="PopupMaterial" @receviceFromChild="receviceFromMaterial"></popup-material>
67
+		<popup-customer ref="PopupCustomer" @receviceFromChild="receviceFromCustomer"></popup-customer>
79
 		<popup-material-dialog ref="PopupMaterialDialog" @receviceFromChild="receviceFromMaterialDialog"></popup-material-dialog>
68
 		<popup-material-dialog ref="PopupMaterialDialog" @receviceFromChild="receviceFromMaterialDialog"></popup-material-dialog>
69
+		<popup-customer-dialog ref="PopupCustomerDialog" @receviceFromChild="receviceFromCustomerDialog"></popup-customer-dialog>
80
 	</div>
70
 	</div>
81
 </template>
71
 </template>
82
 <script>
72
 <script>
83
 	import axios from '@/axios'
73
 	import axios from '@/axios'
84
 	import PopupMaterial from '@/components/PopupMaterial.vue'
74
 	import PopupMaterial from '@/components/PopupMaterial.vue'
85
 	import PopupMaterialDialog from '@/components/PopupMaterial.vue'
75
 	import PopupMaterialDialog from '@/components/PopupMaterial.vue'
76
+	import PopupCustomer from '@/components/PopupCustomer.vue'
77
+	import PopupCustomerDialog from '@/components/PopupCustomer.vue'
86
 	export default {
78
 	export default {
87
 		components: {
79
 		components: {
88
 			PopupMaterial,
80
 			PopupMaterial,
89
-			PopupMaterialDialog
81
+			PopupCustomer,
82
+			PopupMaterialDialog,
83
+			PopupCustomerDialog
90
 		},
84
 		},
91
 		data() {
85
 		data() {
92
 			return {
86
 			return {
104
 				pageSize: 50,
98
 				pageSize: 50,
105
 				//查询条件
99
 				//查询条件
106
 				query: {
100
 				query: {
107
-					material: '',
108
-					standard: '',
101
+					customerName: ''
109
 				},
102
 				},
110
 				//录入框
103
 				//录入框
111
 				dialogVisible: false,
104
 				dialogVisible: false,
112
 				isShow: false,
105
 				isShow: false,
113
 				loading: true,
106
 				loading: true,
114
 				obj: {
107
 				obj: {
115
-					material: {
108
+					customer: {
116
 						id: '',
109
 						id: '',
117
 						name: '',
110
 						name: '',
118
-						standard: '',
119
 					},
111
 					},
120
-					storagePrice: '',
121
-					storageType: '',
122
-					weightType: '',
112
+					keepDay: '',
113
+					ordPrice: '',
114
+					outOrdPrice: '',
123
 				},
115
 				},
124
 
116
 
125
 			}
117
 			}
143
 			showMaterial() {
135
 			showMaterial() {
144
 				this.$refs.PopupMaterial.show()
136
 				this.$refs.PopupMaterial.show()
145
 			},
137
 			},
138
+			showCustomer() {
139
+				this.$refs.PopupCustomer.show()
140
+			},
146
 			receviceFromMaterial(material) {
141
 			receviceFromMaterial(material) {
147
 				this.query.materialName = material.name
142
 				this.query.materialName = material.name
148
 				this.query.standard = material.standard
143
 				this.query.standard = material.standard
149
 			},
144
 			},
145
+			receviceFromCustomer(customer) {
146
+				this.query.customerName = customer.name
147
+			},
150
 			showMaterialDialog() {
148
 			showMaterialDialog() {
151
 				this.$refs.PopupMaterialDialog.show()
149
 				this.$refs.PopupMaterialDialog.show()
152
 			},
150
 			},
151
+			showCustomerDialog() {
152
+				this.$refs.PopupCustomerDialog.show()
153
+			},
153
 			receviceFromMaterialDialog(material) {
154
 			receviceFromMaterialDialog(material) {
154
 				this.obj.material.id = material.id
155
 				this.obj.material.id = material.id
155
 				this.obj.material.name = material.name
156
 				this.obj.material.name = material.name
156
 				this.obj.material.standard = material.standard
157
 				this.obj.material.standard = material.standard
157
 			},
158
 			},
159
+			receviceFromCustomerDialog(customer) {
160
+				this.obj.customer.id = customer.id
161
+				this.obj.customer.name = customer.name
162
+			},
158
 			getTableData() {
163
 			getTableData() {
159
 				this.loading = true
164
 				this.loading = true
160
 				var url = 'MaintPrice/query.do'
165
 				var url = 'MaintPrice/query.do'
161
 				var param = {
166
 				var param = {
162
 					page: this.currentPage,
167
 					page: this.currentPage,
163
 					rows: this.pageSize,
168
 					rows: this.pageSize,
164
-					materialName: this.query.material,
165
-					standard: this.query.standard,
169
+					materialName: this.query.customerName,
166
 				}
170
 				}
167
 				axios.get(url, param).then(response => {
171
 				axios.get(url, param).then(response => {
168
 					if (response.data.code == 0) {
172
 					if (response.data.code == 0) {
198
 					json: json
202
 					json: json
199
 				}
203
 				}
200
 				axios.post(url, param).then(response => {
204
 				axios.post(url, param).then(response => {
201
-					alert(JSON.stringify(response))
205
+					//alert(JSON.stringify(response))
202
 					if (response.data.code == 0) {
206
 					if (response.data.code == 0) {
203
 						this.$message({
207
 						this.$message({
204
 							type: 'success',
208
 							type: 'success',
226
 			handleAdd() {
230
 			handleAdd() {
227
 				this.dialogVisible = true
231
 				this.dialogVisible = true
228
 				this.obj = {
232
 				this.obj = {
229
-					material: {
233
+					customer: {
230
 						id: '',
234
 						id: '',
231
 						name: '',
235
 						name: '',
232
-						standard: '',
233
 					},
236
 					},
234
-					storagePrice: '',
235
-					storageType: '',
237
+					keepDay: '',
238
+					ordPrice: '',
239
+					outOrdPrice: '',
236
 				}
240
 				}
237
 
241
 
238
 			},
242
 			},

Loading…
取消
儲存