diff --git a/package.json b/package.json index 79ea8a9..a5936dc 100644 --- a/package.json +++ b/package.json @@ -47,10 +47,13 @@ "fuse.js": "6.4.3", "highlight.js": "9.18.5", "html-webpack-plugin": "^5.6.0", + "html2canvas": "^1.4.1", "js-beautify": "1.13.0", "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", + "jszip": "^3.10.1", "nprogress": "0.2.0", + "qrcodejs2": "0.0.2", "quill": "1.3.7", "screenfull": "5.0.2", "sm-crypto": "^0.3.13", diff --git a/src/api/purchase/binding.js b/src/api/purchase/binding.js index 08e4514..6c36453 100644 --- a/src/api/purchase/binding.js +++ b/src/api/purchase/binding.js @@ -20,6 +20,13 @@ export const submitCodeBindApi = (data) => { return request.post('/task/purchase/bind/addBind', data) } +/** 下载二维码 */ +export const downloadQrcode = (data) => { + return request.get('/task/purchase/bind/downloadQrCode', { + params: data + }) +} + diff --git a/src/api/purchase/warehouse.js b/src/api/purchase/warehouse.js new file mode 100644 index 0000000..558242a --- /dev/null +++ b/src/api/purchase/warehouse.js @@ -0,0 +1,25 @@ +/** + * 新购到货入库页面 API + */ +import request from '@/utils/request' + +/** 新购到货入库查询 */ +export const queryPurchaseStorageListApi = (data) => { + return request.get('/task/purchase/store/list', { + params: data + }) +} + +/** 新购到货入库二级页面查询 */ +export const queryPurchaseStorageInnerListApi = (data) => { + return request.get('/task/purchase/store/details', { + params: data + }) +} + +/** 新购到货入库操作 */ +export const newPurchaseWarehouseApi = (data) => { + return request.post('/task/purchase/store', data) +} + + diff --git a/src/views/purchase/binding/components/list-binding.vue b/src/views/purchase/binding/components/list-binding.vue index 71d9359..9c170e4 100644 --- a/src/views/purchase/binding/components/list-binding.vue +++ b/src/views/purchase/binding/components/list-binding.vue @@ -1,6 +1,6 @@ + @@ -60,7 +75,8 @@ import { columnsList, dialogConfig, formLabel } from './config' import { commonMixin } from '../mixins/common' import ListBinding from './components/list-binding.vue' import { - queryPurchaseBindListApi + queryPurchaseBindListApi, + downloadQrcode } from '@/api/purchase/binding' export default { @@ -72,10 +88,25 @@ export default { goBack() { this.isShowComponent = 'Index' }, + // 绑定 toggleBinding(data) { this.sendParams = {taskId:data.id} - console.log(data) this.isShowComponent = 'list-binding' + }, + // 下载 + toggleDownload(data) { + this.download( + 'task/purchase/bind/downloadQrCode', + { + id: data.id + }, + `二维码合集_${new Date().getTime()}.zip` + ) + /* downloadQrcode({ + id: data.id, + }).then(res => { + console.log(res) + }).catch(err => {}) */ } }, data() { diff --git a/src/views/purchase/warehouse/components/form-warehouse.vue b/src/views/purchase/warehouse/components/form-warehouse.vue deleted file mode 100644 index ac4df7c..0000000 --- a/src/views/purchase/warehouse/components/form-warehouse.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - - - diff --git a/src/views/purchase/warehouse/components/warehouse-detail.vue b/src/views/purchase/warehouse/components/warehouse-detail.vue new file mode 100644 index 0000000..9398bc1 --- /dev/null +++ b/src/views/purchase/warehouse/components/warehouse-detail.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/src/views/purchase/warehouse/config-warehouse-detail.js b/src/views/purchase/warehouse/config-warehouse-detail.js new file mode 100644 index 0000000..17431d3 --- /dev/null +++ b/src/views/purchase/warehouse/config-warehouse-detail.js @@ -0,0 +1,10 @@ +export const columnsList = [ + { t_props: 'materialName', t_label: '物资名称', }, + { t_props: 'materialModel', t_label: '规格型号' }, + { t_props: 'purchaseNum', t_label: '到货数量', t_slot: 'purchaseNum' }, + { t_props: 'unitName', t_label: '单位', }, + { t_props: 'supplierName', t_label: '供应商' }, + { t_props: 'productDate', t_label: '出厂日期' }, + { t_props: 'manageType', t_label: '管理模式', t_slot: 'manageType' }, + { t_props: 'status', t_label: '状态', t_slot: 'status' }, +] diff --git a/src/views/purchase/warehouse/config.js b/src/views/purchase/warehouse/config.js index fe946b9..cc3d031 100644 --- a/src/views/purchase/warehouse/config.js +++ b/src/views/purchase/warehouse/config.js @@ -1,22 +1,33 @@ +import { + queryStatusSelApi +} from '@/api/purchase/receive' + +export const queryStatusSelData = () => { + queryStatusSelApi().then(res => { + formLabel[3].f_selList = res.data.data.map(item => { + return { + label: item.dictLabel, + value: item.dictCode + } + }) + }) +} export const formLabel = [ { f_label: '开始时间', f_model: 'startTime', f_type: 'date' }, { f_label: '结束时间', f_model: 'endTime', f_type: 'date' }, { f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' }, - { f_label: '状态', f_model: 'keyWord', f_type: 'ipt' }, + { f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] }, ] export const columnsList = [ - { t_props: 'name', t_label: '到货时间', }, - { t_props: 'address', t_label: '采购单号' }, - { t_props: 'companyMan', t_label: '采购物资' }, - { t_props: 'mainPerson', t_label: '采购数量' }, - { t_props: 'phone', t_label: '采购价格(含税)', }, - { t_props: 'scopeBusiness', t_label: '采购价格(不含税)' }, - { t_props: 'picUrl', t_label: '税率', }, - { t_props: 'notes', t_label: '操作人' }, - { t_props: 'notes', t_label: '操作时间' }, - { t_props: 'notes', t_label: '状态' }, - { t_props: 'notes', t_label: '备注' }, + { t_props: 'arrivalTime', t_label: '到货时间', }, + { t_props: 'purchaseCode', t_label: '采购单号' }, + { t_props: 'purchaseMaterial', t_label: '采购物资', }, + { t_props: 'purchaseNum', t_label: '采购数量', t_slot: 'purchaseNum' }, + { t_props: 'createBy', t_label: '操作人' }, + { t_props: 'createTime', t_label: '操作时间' }, + { t_props: 'status', t_label: '状态', t_slot: 'status' }, + { t_props: 'remark', t_label: '备注' }, ] export const dialogConfig = { diff --git a/src/views/purchase/warehouse/index.vue b/src/views/purchase/warehouse/index.vue index ed462da..b7957cc 100644 --- a/src/views/purchase/warehouse/index.vue +++ b/src/views/purchase/warehouse/index.vue @@ -1,19 +1,29 @@