diff --git a/package.json b/package.json index c63d5c3..d0f72b4 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "fastclick": "^1.0.6", "jsencrypt": "^3.3.2", "vue": "^2.5.2", + "vue-infinite-scroll": "^2.0.2", "vue-router": "^3.0.1", "vuex": "^3.0.1" }, diff --git a/src/config/filter.js b/src/config/filter.js new file mode 100644 index 0000000..3d0058e --- /dev/null +++ b/src/config/filter.js @@ -0,0 +1,8 @@ +const filter = { + numeric (value, bit) { + if (!value) return '' + return Number(value).toFixed(bit) + } +} + +export default filter diff --git a/src/config/getData2.js b/src/config/getData2.js index 60c9ebb..13f92bf 100644 --- a/src/config/getData2.js +++ b/src/config/getData2.js @@ -123,8 +123,10 @@ export const getBcpStor = () => post('api/pda/bcp/in/getBcpStor', {}) // 1.2单据类型下拉框 export const getBillType = () => post('api/pda/bcp/in/getBillType', {}) // 1.3物料选择页面 -export const getMaterial = (code) => post('api/pda/bcp/in/getMaterial', { - material_code: code +export const getMaterial = (code, page, size) => post('api/pda/bcp/in/getMaterial', { + material_code: code, + page: page, + size: size }) // export const getMaterial = (code) => { // let res = { diff --git a/src/config/http.js b/src/config/http.js index 2f069ef..7ac5793 100644 --- a/src/config/http.js +++ b/src/config/http.js @@ -3,7 +3,7 @@ import { Dialog } from './utils.js' import store from '../vuex/store' import router from '@/router' -axios.defaults.timeout = 50000 +axios.defaults.timeout = 5000 axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8' axios.interceptors.request.use( diff --git a/src/main.js b/src/main.js index ae983c2..1347c70 100644 --- a/src/main.js +++ b/src/main.js @@ -7,13 +7,16 @@ import store from './vuex/store' import '@style/reset.css' import '@style/layout.styl' import fastClick from 'fastclick' +import infiniteScroll from 'vue-infinite-scroll' import { DatePicker, Select, Option } from 'element-ui' import '@config/rem.js' import {post} from '@config/http.js' import { Dialog, toast } from '@config/utils.js' +import filter from '@config/filter.js' import JSEncrypt from 'jsencrypt' fastClick.attach(document.body) +Vue.use(infiniteScroll) Vue.use(DatePicker) Vue.use(Select) Vue.use(Option) @@ -21,6 +24,9 @@ Vue.prototype.$post = post Vue.prototype.Dialog = Dialog Vue.prototype.toast = toast Vue.config.productionTip = false +for (let k in filter) { + Vue.filter(k, filter[k]) +} const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANL378k3RiZHWx5AfJqdH9xRNBmD9wGD\n' + '2iRe41HdTNF8RUhNnHit5NpMNtGL0NPTSSpPjjI1kJfVorRvaQerUgkCAwEAAQ==' diff --git a/src/pages/modules/semifinished/mater-search.vue b/src/pages/modules/semifinished/mater-search.vue index 7fba69c..54451f0 100644 --- a/src/pages/modules/semifinished/mater-search.vue +++ b/src/pages/modules/semifinished/mater-search.vue @@ -22,21 +22,23 @@
| 序号 | 物料编号 | 物料名称 | +物料规格 | 物料类别 | +单重 | 重量单位 | {{ i+1 }} | {{e.material_code}} | {{e.material_name}} | +{{ e.material_spec }} | {{e.class_code}} | +{{ e.net_weight | numeric(3) }} | {{e.unit_name}} |
|---|