Commit 4acf64e25d19f7707a3637266c0971cae649d586

Authored by pengyongcheng
1 parent 47977ca8

fix: 页面优化

ant-design-vue-jeecg/src/views/system/config/MaterialTypeList.vue
... ... @@ -38,17 +38,17 @@
38 38 <a-dropdown v-if="selectedRowKeys.length > 0">
39 39 <a-menu slot="overlay" v-has="'materialType:deleteBatch'">
40 40 <a-menu-item key="1" @click="batchDel">
41   - <a-icon type="delete"/>
  41 + <a-icon type="delete" />
42 42 删除
43 43 </a-menu-item>
44 44 </a-menu>
45 45 <a-button style="margin-left: 8px"> 批量操作
46   - <a-icon type="down"/>
  46 + <a-icon type="down" />
47 47 </a-button>
48 48 </a-dropdown>
49 49  
50 50 <j-super-query :fieldList="superFieldList" v-has="'materialType:superQuery'"
51   - @handleSuperQuery="handleSuperQuery"/>
  51 + @handleSuperQuery="handleSuperQuery" />
52 52 </div>
53 53  
54 54 <!-- table区域-begin -->
... ... @@ -73,13 +73,19 @@
73 73 class="j-table-force-nowrap"
74 74 @change="handleTableChange">
75 75  
  76 + <span slot="companyCode" slot-scope="companyCode">
  77 + <a-tag :key="companyCode" color=blue>
  78 + {{ solutionCompany(companyCode) }}
  79 + </a-tag>
  80 + </span>
  81 +
76 82 <template slot="htmlSlot" slot-scope="text">
77 83 <div v-html="text"></div>
78 84 </template>
79 85 <template slot="imgSlot" slot-scope="text">
80 86 <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
81 87 <img v-else :src="getImgView(text)" height="25px" alt=""
82   - style="max-width:80px;font-size: 12px;font-style: italic;"/>
  88 + style="max-width:80px;font-size: 12px;font-style: italic;" />
83 89 </template>
84 90 <template slot="fileSlot" slot-scope="text">
85 91 <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
... ... @@ -97,9 +103,9 @@
97 103 <span slot="action" slot-scope="text, record">
98 104 <a v-has="'materialType:edit'" @click="handleEdit(record)">编辑</a>
99 105  
100   - <a-divider type="vertical"/>
  106 + <a-divider type="vertical" />
101 107 <a-dropdown>
102   - <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
  108 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
103 109 <a-menu slot="overlay">
104 110 <a-menu-item>
105 111 <a @click="handleDetail(record)">详情</a>
... ... @@ -123,9 +129,10 @@
123 129 <script>
124 130  
125 131 import '@/assets/less/TableExpand.less'
126   -import {mixinDevice} from '@/utils/mixin'
127   -import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  132 +import { mixinDevice } from '@/utils/mixin'
  133 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
128 134 import MaterialTypeModal from './modules/MaterialTypeModal'
  135 +import { getCompanyList } from '@api/api'
129 136  
130 137 export default {
131 138 name: 'MaterialTypeList',
... ... @@ -143,153 +150,173 @@ export default {
143 150 dataIndex: '',
144 151 key: 'rowIndex',
145 152 width: 60,
146   - align: "center",
147   - customRender: function (t, r, index) {
148   - return parseInt(index) + 1;
  153 + align: 'center',
  154 + customRender: function(t, r, index) {
  155 + return parseInt(index) + 1
149 156 }
150 157 },
151 158 {
152 159 title: '编码',
153   - align: "center",
  160 + align: 'center',
154 161 dataIndex: 'code'
155 162 },
156 163 {
157 164 title: '名称',
158   - align: "center",
  165 + align: 'center',
159 166 dataIndex: 'name'
160 167 },
161 168 {
162   - title: '货主编码',
163   - align: "center",
164   - dataIndex: 'companyCode'
  169 + title: '货主',
  170 + align: 'center',
  171 + dataIndex: 'companyCode',
  172 + key: 'companyCode',
  173 + scopedSlots: { customRender: 'companyCode' }
165 174 },
166 175 {
167 176 title: 'ABC分类',
168   - align: "center",
  177 + align: 'center',
169 178 dataIndex: 'abcclass'
170 179 },
171 180 {
172 181 title: '物料分区',
173   - align: "center",
  182 + align: 'center',
174 183 dataIndex: 'materialareaCode'
175 184 },
176 185 {
177 186 title: '保质期(天)',
178   - align: "center",
  187 + align: 'center',
179 188 dataIndex: 'daystoexpire'
180 189 },
181 190 {
182 191 title: '定位规则',
183   - align: "center",
  192 + align: 'center',
184 193 dataIndex: 'locatingrule'
185 194 },
186 195 {
187 196 title: '分配规则',
188   - align: "center",
  197 + align: 'center',
189 198 dataIndex: 'allocationrule'
190 199 },
191 200 {
192 201 title: '空货位规则',
193   - align: "center",
  202 + align: 'center',
194 203 dataIndex: 'emptylocrule'
195 204 },
196 205 {
197 206 title: '拣货规则',
198   - align: "center",
  207 + align: 'center',
199 208 dataIndex: 'pickingrule'
200 209 },
201 210 {
202 211 title: '入库流程',
203   - align: "center",
  212 + align: 'center',
204 213 dataIndex: 'receivingflow'
205 214 },
206 215 {
207 216 title: '出库流程',
208   - align: "center",
  217 + align: 'center',
209 218 dataIndex: 'shippingflow'
210 219 },
211 220 {
212 221 title: '临期预警天数',
213   - align: "center",
  222 + align: 'center',
214 223 dataIndex: 'expiringdays'
215 224 },
216 225 {
217 226 title: '收货预警天数',
218   - align: "center",
  227 + align: 'center',
219 228 dataIndex: 'minshelflifedays'
220 229 },
221 230 {
222 231 title: '创建人',
223   - align: "center",
  232 + align: 'center',
224 233 dataIndex: 'createBy'
225 234 },
226 235 {
227 236 title: '创建日期',
228   - align: "center",
  237 + align: 'center',
229 238 dataIndex: 'createTime'
230 239 },
231 240 {
232 241 title: '更新人',
233   - align: "center",
  242 + align: 'center',
234 243 dataIndex: 'updateBy'
235 244 },
236 245 {
237 246 title: '更新日期',
238   - align: "center",
  247 + align: 'center',
239 248 dataIndex: 'updateTime'
240 249 },
241 250 {
242 251 title: '操作',
243 252 dataIndex: 'action',
244   - align: "center",
245   - fixed: "right",
  253 + align: 'center',
  254 + fixed: 'right',
246 255 width: 147,
247   - scopedSlots: {customRender: 'action'}
  256 + scopedSlots: { customRender: 'action' }
248 257 }
249 258 ],
250 259 url: {
251   - list: "/config/materialType/list",
252   - delete: "/config/materialType/delete",
253   - deleteBatch: "/config/materialType/deleteBatch",
254   - exportXlsUrl: "/config/materialType/exportXls",
255   - importExcelUrl: "config/materialType/importExcel",
  260 + list: '/config/materialType/list',
  261 + delete: '/config/materialType/delete',
  262 + deleteBatch: '/config/materialType/deleteBatch',
  263 + exportXlsUrl: '/config/materialType/exportXls',
  264 + importExcelUrl: 'config/materialType/importExcel'
256 265  
257 266 },
258 267 dictOptions: {},
259   - superFieldList: [],
  268 + superFieldList: []
260 269 }
261 270 },
262 271 created() {
263   - this.getSuperFieldList();
  272 + this.getSuperFieldList()
  273 + this.loadForm()
264 274 },
265 275 computed: {
266   - importExcelUrl: function () {
267   - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
268   - },
  276 + importExcelUrl: function() {
  277 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  278 + }
269 279 },
270 280 methods: {
  281 + loadForm() {
  282 + getCompanyList().then((res) => {
  283 + if (res.success) {
  284 + this.companyList = res.result
  285 + }
  286 + })
  287 + },
271 288 initDictConfig() {
272 289 },
  290 + solutionCompany(value) {
  291 + let actions = []
  292 + Object.keys(this.companyList).some((key) => {
  293 + if (this.companyList[key].code === ('' + value)) {
  294 + actions.push(this.companyList[key].name)
  295 + return true
  296 + }
  297 + })
  298 + return actions.join('')
  299 + },
273 300 getSuperFieldList() {
274   - let fieldList = [];
275   - fieldList.push({type: 'string', value: 'code', text: '编码', dictCode: ''})
276   - fieldList.push({type: 'string', value: 'name', text: '名称', dictCode: ''})
277   - fieldList.push({type: 'string', value: 'companyCode', text: '货主编码', dictCode: ''})
278   - fieldList.push({type: 'string', value: 'abcclass', text: 'ABC分类', dictCode: ''})
279   - fieldList.push({type: 'string', value: 'materialareaCode', text: '物料分区', dictCode: ''})
280   - fieldList.push({type: 'int', value: 'daystoexpire', text: '保质期(天)', dictCode: ''})
281   - fieldList.push({type: 'string', value: 'locatingrule', text: '定位规则', dictCode: ''})
282   - fieldList.push({type: 'string', value: 'allocationrule', text: '分配规则', dictCode: ''})
283   - fieldList.push({type: 'string', value: 'emptylocrule', text: '空货位规则', dictCode: ''})
284   - fieldList.push({type: 'string', value: 'pickingrule', text: '拣货规则', dictCode: ''})
285   - fieldList.push({type: 'string', value: 'receivingflow', text: '入库流程', dictCode: ''})
286   - fieldList.push({type: 'string', value: 'shippingflow', text: '出库流程', dictCode: ''})
287   - fieldList.push({type: 'string', value: 'expiringdays', text: '临期预警天数', dictCode: ''})
288   - fieldList.push({type: 'int', value: 'minshelflifedays', text: '收货预警天数', dictCode: ''})
289   - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''})
290   - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'})
291   - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''})
292   - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'})
  301 + let fieldList = []
  302 + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' })
  303 + fieldList.push({ type: 'string', value: 'name', text: '名称', dictCode: '' })
  304 + fieldList.push({ type: 'string', value: 'companyCode', text: '货主编码', dictCode: '' })
  305 + fieldList.push({ type: 'string', value: 'abcclass', text: 'ABC分类', dictCode: '' })
  306 + fieldList.push({ type: 'string', value: 'materialareaCode', text: '物料分区', dictCode: '' })
  307 + fieldList.push({ type: 'int', value: 'daystoexpire', text: '保质期(天)', dictCode: '' })
  308 + fieldList.push({ type: 'string', value: 'locatingrule', text: '定位规则', dictCode: '' })
  309 + fieldList.push({ type: 'string', value: 'allocationrule', text: '分配规则', dictCode: '' })
  310 + fieldList.push({ type: 'string', value: 'emptylocrule', text: '空货位规则', dictCode: '' })
  311 + fieldList.push({ type: 'string', value: 'pickingrule', text: '拣货规则', dictCode: '' })
  312 + fieldList.push({ type: 'string', value: 'receivingflow', text: '入库流程', dictCode: '' })
  313 + fieldList.push({ type: 'string', value: 'shippingflow', text: '出库流程', dictCode: '' })
  314 + fieldList.push({ type: 'string', value: 'expiringdays', text: '临期预警天数', dictCode: '' })
  315 + fieldList.push({ type: 'int', value: 'minshelflifedays', text: '收货预警天数', dictCode: '' })
  316 + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' })
  317 + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' })
  318 + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' })
  319 + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' })
293 320 this.superFieldList = fieldList
294 321 }
295 322 }
... ...
ant-design-vue-jeecg/src/views/system/config/MaterialWarningList.vue
... ... @@ -43,17 +43,17 @@
43 43 <a-dropdown v-if="selectedRowKeys.length > 0">
44 44 <a-menu slot="overlay" v-has="'materialWarning:deleteBatch'">
45 45 <a-menu-item key="1" @click="batchDel">
46   - <a-icon type="delete"/>
  46 + <a-icon type="delete" />
47 47 删除
48 48 </a-menu-item>
49 49 </a-menu>
50 50 <a-button style="margin-left: 8px"> 批量操作
51   - <a-icon type="down"/>
  51 + <a-icon type="down" />
52 52 </a-button>
53 53 </a-dropdown>
54 54  
55 55 <j-super-query :fieldList="superFieldList" v-has="'materialWarning:superQuery'"
56   - @handleSuperQuery="handleSuperQuery"/>
  56 + @handleSuperQuery="handleSuperQuery" />
57 57 </div>
58 58  
59 59 <!-- table区域-begin -->
... ... @@ -84,7 +84,7 @@
84 84 <template slot="imgSlot" slot-scope="text">
85 85 <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
86 86 <img v-else :src="getImgView(text)" height="25px" alt=""
87   - style="max-width:80px;font-size: 12px;font-style: italic;"/>
  87 + style="max-width:80px;font-size: 12px;font-style: italic;" />
88 88 </template>
89 89 <template slot="fileSlot" slot-scope="text">
90 90 <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
... ... @@ -99,12 +99,18 @@
99 99 </a-button>
100 100 </template>
101 101  
  102 + <span slot="companyCode" slot-scope="companyCode">
  103 + <a-tag :key="companyCode" color=blue>
  104 + {{ solutionCompany(companyCode) }}
  105 + </a-tag>
  106 + </span>
  107 +
102 108 <span slot="action" slot-scope="text, record">
103 109 <a v-has="'materialWarning:edit'" @click="handleEdit(record)">编辑</a>
104 110  
105   - <a-divider type="vertical"/>
  111 + <a-divider type="vertical" />
106 112 <a-dropdown>
107   - <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
  113 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
108 114 <a-menu slot="overlay">
109 115 <a-menu-item>
110 116 <a @click="handleDetail(record)">详情</a>
... ... @@ -117,10 +123,8 @@
117 123 </a-menu>
118 124 </a-dropdown>
119 125 </span>
120   -
121 126 </a-table>
122 127 </div>
123   -
124 128 <material-warning-modal ref="modalForm" @ok="modalFormOk"></material-warning-modal>
125 129 </a-card>
126 130 </template>
... ... @@ -128,9 +132,10 @@
128 132 <script>
129 133  
130 134 import '@/assets/less/TableExpand.less'
131   -import {mixinDevice} from '@/utils/mixin'
132   -import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  135 +import { mixinDevice } from '@/utils/mixin'
  136 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
133 137 import MaterialWarningModal from './modules/MaterialWarningModal'
  138 +import { getCompanyList } from '@api/api'
134 139  
135 140 export default {
136 141 name: 'MaterialWarningList',
... ... @@ -148,136 +153,157 @@ export default {
148 153 dataIndex: '',
149 154 key: 'rowIndex',
150 155 width: 60,
151   - align: "center",
152   - customRender: function (t, r, index) {
153   - return parseInt(index) + 1;
  156 + align: 'center',
  157 + customRender: function(t, r, index) {
  158 + return parseInt(index) + 1
154 159 }
155 160 },
156 161 {
157 162 title: '预警类别代码',
158   - align: "center",
  163 + align: 'center',
159 164 dataIndex: 'alarmType'
160 165 },
161 166 {
162   - title: '货主编码',
163   - align: "center",
164   - dataIndex: 'companyCode'
  167 + title: '货主',
  168 + align: 'center',
  169 + dataIndex: 'companyCode',
  170 + key: 'companyCode',
  171 + scopedSlots: { customRender: 'companyCode' }
165 172 },
166 173 {
167 174 title: '物料编码',
168   - align: "center",
  175 + align: 'center',
169 176 dataIndex: 'materialCode'
170 177 },
171 178 {
172 179 title: '物料名称',
173   - align: "center",
  180 + align: 'center',
174 181 dataIndex: 'materialName'
175 182 },
176 183 {
177 184 title: '物料规格',
178   - align: "center",
  185 + align: 'center',
179 186 dataIndex: 'materialSpec'
180 187 },
181 188 {
182 189 title: '物料单位',
183   - align: "center",
  190 + align: 'center',
184 191 dataIndex: 'materialUnit'
185 192 },
186 193 {
187 194 title: '最大',
188   - align: "center",
  195 + align: 'center',
189 196 dataIndex: 'max'
190 197 },
191 198 {
192 199 title: '最小',
193   - align: "center",
  200 + align: 'center',
194 201 dataIndex: 'min'
195 202 },
196 203 {
197 204 title: '上限预警值',
198   - align: "center",
  205 + align: 'center',
199 206 dataIndex: 'upper'
200 207 },
201 208 {
202 209 title: '下限预警值',
203   - align: "center",
  210 + align: 'center',
204 211 dataIndex: 'lower'
205 212 },
206 213 {
207 214 title: '备注',
208   - align: "center",
  215 + align: 'center',
209 216 dataIndex: 'remark'
210 217 },
211 218 {
212 219 title: '创建人',
213   - align: "center",
  220 + align: 'center',
214 221 dataIndex: 'createBy'
215 222 },
216 223 {
217 224 title: '创建日期',
218   - align: "center",
  225 + align: 'center',
219 226 dataIndex: 'createTime'
220 227 },
221 228 {
222 229 title: '更新人',
223   - align: "center",
  230 + align: 'center',
224 231 dataIndex: 'updateBy'
225 232 },
226 233 {
227 234 title: '更新日期',
228   - align: "center",
  235 + align: 'center',
229 236 dataIndex: 'updateTime'
230 237 },
231 238 {
232 239 title: '操作',
233 240 dataIndex: 'action',
234   - align: "center",
235   - fixed: "right",
  241 + align: 'center',
  242 + fixed: 'right',
236 243 width: 147,
237   - scopedSlots: {customRender: 'action'}
  244 + scopedSlots: { customRender: 'action' }
238 245 }
239 246 ],
240 247 url: {
241   - list: "/config/materialWarning/list",
242   - delete: "/config/materialWarning/delete",
243   - deleteBatch: "/config/materialWarning/deleteBatch",
244   - exportXlsUrl: "/config/materialWarning/exportXls",
245   - importExcelUrl: "config/materialWarning/importExcel",
  248 + list: '/config/materialWarning/list',
  249 + delete: '/config/materialWarning/delete',
  250 + deleteBatch: '/config/materialWarning/deleteBatch',
  251 + exportXlsUrl: '/config/materialWarning/exportXls',
  252 + importExcelUrl: 'config/materialWarning/importExcel'
246 253  
247 254 },
248 255 dictOptions: {},
249 256 superFieldList: [],
  257 + companyList: []
250 258 }
251 259 },
252 260 created() {
253   - this.getSuperFieldList();
  261 + this.getSuperFieldList()
  262 + this.loadForm()
254 263 },
255 264 computed: {
256   - importExcelUrl: function () {
257   - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
258   - },
  265 + importExcelUrl: function() {
  266 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  267 + }
259 268 },
260 269 methods: {
  270 + loadForm() {
  271 + getCompanyList().then((res) => {
  272 + if (res.success) {
  273 + this.companyList = res.result
  274 + }
  275 + })
  276 + },
261 277 initDictConfig() {
262 278 },
  279 + solutionCompany(value) {
  280 + let actions = []
  281 + Object.keys(this.companyList).some((key) => {
  282 + if (this.companyList[key].code === ('' + value)) {
  283 + actions.push(this.companyList[key].name)
  284 + return true
  285 + }
  286 + })
  287 + return actions.join('')
  288 + },
263 289 getSuperFieldList() {
264   - let fieldList = [];
265   - fieldList.push({type: 'string', value: 'alarmType', text: '预警类别代码', dictCode: ''})
266   - fieldList.push({type: 'string', value: 'warehouseCode', text: '仓库编码', dictCode: ''})
267   - fieldList.push({type: 'string', value: 'companyCode', text: '货主编码', dictCode: ''})
268   - fieldList.push({type: 'string', value: 'materialCode', text: '物料编码', dictCode: ''})
269   - fieldList.push({type: 'string', value: 'materialName', text: '物料名称', dictCode: ''})
270   - fieldList.push({type: 'string', value: 'materialSpec', text: '物料规格', dictCode: ''})
271   - fieldList.push({type: 'string', value: 'materialUnit', text: '物料单位', dictCode: ''})
272   - fieldList.push({type: 'string', value: 'max', text: '最大', dictCode: ''})
273   - fieldList.push({type: 'string', value: 'min', text: '最小', dictCode: ''})
274   - fieldList.push({type: 'int', value: 'upper', text: '上限预警值', dictCode: ''})
275   - fieldList.push({type: 'int', value: 'lower', text: '下限预警值', dictCode: ''})
276   - fieldList.push({type: 'string', value: 'remark', text: '备注', dictCode: ''})
277   - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''})
278   - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'})
279   - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''})
280   - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'})
  290 + let fieldList = []
  291 + fieldList.push({ type: 'string', value: 'alarmType', text: '预警类别代码', dictCode: '' })
  292 + fieldList.push({ type: 'string', value: 'warehouseCode', text: '仓库编码', dictCode: '' })
  293 + fieldList.push({ type: 'string', value: 'companyCode', text: '货主编码', dictCode: '' })
  294 + fieldList.push({ type: 'string', value: 'materialCode', text: '物料编码', dictCode: '' })
  295 + fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' })
  296 + fieldList.push({ type: 'string', value: 'materialSpec', text: '物料规格', dictCode: '' })
  297 + fieldList.push({ type: 'string', value: 'materialUnit', text: '物料单位', dictCode: '' })
  298 + fieldList.push({ type: 'string', value: 'max', text: '最大', dictCode: '' })
  299 + fieldList.push({ type: 'string', value: 'min', text: '最小', dictCode: '' })
  300 + fieldList.push({ type: 'int', value: 'upper', text: '上限预警值', dictCode: '' })
  301 + fieldList.push({ type: 'int', value: 'lower', text: '下限预警值', dictCode: '' })
  302 + fieldList.push({ type: 'string', value: 'remark', text: '备注', dictCode: '' })
  303 + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' })
  304 + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' })
  305 + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' })
  306 + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' })
281 307 this.superFieldList = fieldList
282 308 }
283 309 }
... ...
ant-design-vue-jeecg/src/views/system/config/modules/ContainerCapacityForm.vue
... ... @@ -17,8 +17,14 @@
17 17 </a-form-model-item>
18 18 </a-col>
19 19 <a-col :span="24">
20   - <a-form-model-item label="物料编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
21   - <a-input v-model="model.materialCode" placeholder="请输入物料编码"></a-input>
  20 + <a-form-model-item label="物料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
  21 + <j-search-select-tag
  22 + v-model="model.materialCode"
  23 + dict="material,name,code"
  24 + placeholder="请选择物料编码"
  25 + :pageSize="10"
  26 + :async="true"
  27 + />
22 28 </a-form-model-item>
23 29 </a-col>
24 30 <a-col :span="24">
... ...
ant-design-vue-jeecg/src/views/system/config/modules/MaterialForm.vue
... ... @@ -148,8 +148,8 @@ export default {
148 148 methods: {
149 149 add() {
150 150 this.edit(this.modelDefault);
151   - model.enable = 1;
152   - this.form.setFieldsValue({enable: 1});
  151 + this.model.enable = 1;
  152 + //this.$refs.form.setFieldsValue({enable: 1});
153 153 },
154 154 edit(record) {
155 155 this.model = Object.assign({}, record);
... ...
ant-design-vue-jeecg/src/views/system/config/modules/MaterialTypeForm.vue
... ... @@ -14,8 +14,16 @@
14 14 </a-form-model-item>
15 15 </a-col>
16 16 <a-col :span="24">
17   - <a-form-model-item label="货主编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode">
18   - <a-input v-model="model.companyCode" placeholder="请输入货主编码"></a-input>
  17 + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode">
  18 + <a-select
  19 + show-search
  20 + placeholder="请选择货主"
  21 + option-filter-prop="children"
  22 + v-model="model.companyCode">
  23 + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">
  24 + {{ item.name }}
  25 + </a-select-option>
  26 + </a-select>
19 27 </a-form-model-item>
20 28 </a-col>
21 29 <a-col :span="24">
... ... @@ -30,7 +38,7 @@
30 38 </a-col>
31 39 <a-col :span="24">
32 40 <a-form-model-item label="保质期(天)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="daystoexpire">
33   - <a-input-number v-model="model.daystoexpire" placeholder="请输入保质期(天)" style="width: 100%"/>
  41 + <a-input-number v-model="model.daystoexpire" placeholder="请输入保质期(天)" style="width: 100%" />
34 42 </a-form-model-item>
35 43 </a-col>
36 44 <a-col :span="24">
... ... @@ -70,7 +78,7 @@
70 78 </a-col>
71 79 <a-col :span="24">
72 80 <a-form-model-item label="收货预警天数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="minshelflifedays">
73   - <a-input-number v-model="model.minshelflifedays" placeholder="请输入收货预警天数" style="width: 100%"/>
  81 + <a-input-number v-model="model.minshelflifedays" placeholder="请输入收货预警天数" style="width: 100%" />
74 82 </a-form-model-item>
75 83 </a-col>
76 84 </a-row>
... ... @@ -81,8 +89,8 @@
81 89  
82 90 <script>
83 91  
84   -import {httpAction, getAction} from '@/api/manage'
85   -import {validateDuplicateValue} from '@/utils/util'
  92 +import { httpAction } from '@/api/manage'
  93 +import { getCompanyList } from '@api/api'
86 94  
87 95 export default {
88 96 name: 'MaterialTypeForm',
... ... @@ -99,41 +107,48 @@ export default {
99 107 return {
100 108 model: {},
101 109 labelCol: {
102   - xs: {span: 24},
103   - sm: {span: 5},
  110 + xs: { span: 24 },
  111 + sm: { span: 5 }
104 112 },
105 113 wrapperCol: {
106   - xs: {span: 24},
107   - sm: {span: 16},
  114 + xs: { span: 24 },
  115 + sm: { span: 16 }
108 116 },
109 117 confirmLoading: false,
110 118 validatorRules: {
111 119 code: [
112   - {required: true, message: '请输入编码!'},
  120 + { required: true, message: '请输入编码!' }
113 121 ],
114 122 name: [
115   - {required: true, message: '请输入名称!'},
116   - ],
  123 + { required: true, message: '请输入名称!' }
  124 + ]
117 125 },
118 126 url: {
119   - add: "/config/materialType/add",
120   - edit: "/config/materialType/edit",
121   - queryById: "/config/materialType/queryById"
122   - }
  127 + add: '/config/materialType/add',
  128 + edit: '/config/materialType/edit',
  129 + queryById: '/config/materialType/queryById'
  130 + },
  131 + companyList: []
123 132 }
124 133 },
125 134 computed: {
126 135 formDisabled() {
127 136 return this.disabled
128   - },
  137 + }
129 138 },
130 139 created() {
131 140 //备份model原始值
132   - this.modelDefault = JSON.parse(JSON.stringify(this.model));
  141 + this.modelDefault = JSON.parse(JSON.stringify(this.model))
  142 +
  143 + getCompanyList().then((res) => {
  144 + if (res.success) {
  145 + this.companyList = res.result
  146 + }
  147 + })
133 148 },
134 149 methods: {
135 150 add() {
136   - this.edit(this.modelDefault);
  151 + this.edit(this.modelDefault)
137 152 },
138 153 edit(record) {
139 154 this.model = Object.assign({}, record);
... ... @@ -167,7 +182,7 @@ export default {
167 182 }
168 183  
169 184 })
170   - },
  185 + }
171 186 }
172 187 }
173 188 </script>
174 189 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/config/modules/MaterialWarningForm.vue
... ... @@ -9,8 +9,16 @@
9 9 </a-form-model-item>
10 10 </a-col>
11 11 <a-col :span="24">
12   - <a-form-model-item label="货主编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode">
13   - <a-input v-model="model.companyCode" placeholder="请输入货主编码"></a-input>
  12 + <a-form-model-item label="货主" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCode">
  13 + <a-select
  14 + show-search
  15 + placeholder="请选择货主"
  16 + option-filter-prop="children"
  17 + v-model="model.companyCode">
  18 + <a-select-option v-for="item in companyList" :key="item.name" :value="item.code">
  19 + {{ item.name }}
  20 + </a-select-option>
  21 + </a-select>
14 22 </a-form-model-item>
15 23 </a-col>
16 24 <a-col :span="24">
... ... @@ -67,7 +75,7 @@
67 75 <script>
68 76  
69 77 import {httpAction, getAction} from '@/api/manage'
70   -import {validateDuplicateValue} from '@/utils/util'
  78 +import { getCompanyList } from '@api/api'
71 79  
72 80 export default {
73 81 name: 'MaterialWarningForm',
... ... @@ -104,7 +112,8 @@ export default {
104 112 add: "/config/materialWarning/add",
105 113 edit: "/config/materialWarning/edit",
106 114 queryById: "/config/materialWarning/queryById"
107   - }
  115 + },
  116 + companyList: [],
108 117 }
109 118 },
110 119 computed: {
... ... @@ -115,6 +124,12 @@ export default {
115 124 created() {
116 125 //备份model原始值
117 126 this.modelDefault = JSON.parse(JSON.stringify(this.model));
  127 +
  128 + getCompanyList().then((res) => {
  129 + if (res.success) {
  130 + this.companyList = res.result
  131 + }
  132 + });
118 133 },
119 134 methods: {
120 135 add() {
... ... @@ -150,7 +165,6 @@ export default {
150 165 that.confirmLoading = false;
151 166 })
152 167 }
153   -
154 168 })
155 169 },
156 170 }
... ...