diff --git a/.env.development b/.env.development index 4358f3b..4ffe842 100644 --- a/.env.development +++ b/.env.development @@ -13,5 +13,5 @@ VUE_APP_OA_URL_TYPE = '{"采购入库":51,"请示入库":54,"调拨入库":55," #VUE_APP_UPLOAD_API = http://192.168.60.99:9004/api/admin/upload-file # 正式oa -VUE_APP_OA_URL = http://192.168.60.18:2021 -VUE_APP_OA_URL_TYPE = '{"采购入库":51,"请示入库":54,"调拨入库":55,"领用出库":56,"处置出库":57,"调令出库":53}' +#VUE_APP_OA_URL = http://192.168.60.18:2021 +#VUE_APP_OA_URL_TYPE = '{"采购入库":51,"请示入库":54,"调拨入库":55,"领用出库":56,"处置出库":57,"调令出库":53}' diff --git a/src/api/monitor.js b/src/api/monitor.js index 444fffc..cfc5275 100644 --- a/src/api/monitor.js +++ b/src/api/monitor.js @@ -1,9 +1,10 @@ import request from '@/utils/request' -export function getGasConfig() { +export function getGasConfig(params) { return request({ url: '/api/admin/gas-config/index', - method: 'get' + method: 'get', + params }) } diff --git a/src/api/system/stocktaking.js b/src/api/system/stocktaking.js index ce6819f..506bb9a 100644 --- a/src/api/system/stocktaking.js +++ b/src/api/system/stocktaking.js @@ -51,6 +51,14 @@ export function getStocktakingPlanLinkList(data) { }) } +// 删除盘点计划物资关联 +export function deleteStocktakingPlanLink(params) { + return request({ + url: '/api/admin/material-infos-plan-link/destroy', + method: 'get', + params + }) +} // 获取单个盘点计划详情 export function getStocktakingPlanLinkDetail(params) { return request({ diff --git a/src/views/inventorys/index.vue b/src/views/inventorys/index.vue index a335362..74a90b6 100644 --- a/src/views/inventorys/index.vue +++ b/src/views/inventorys/index.vue @@ -573,32 +573,63 @@ window.open('/admin/#/myprint?ids=' + this.printArr, '_blank') }, async exportExcel(sheetName) { + const export_fields = { + 'wuzibianma': '物资编码', + 'wuzibianma_material_infos_wuzibianma_relation.fenlei_detail.name': '所属种类', + 'zichanmingcheng': '物资名称', + 'wuzileixing': '物资类型', + 'guigexinghao': '物资型号', + 'wuziguige': '物资规格', + 'wuzibianma_material_infos_wuzibianma_relation.jiliangdanwei': '单位', + 'rukupici': '入库批次', + 'zaikushuliang': '在库数量', + 'shunxuhao': '顺序号', + 'wuzizhuangtai_detail.value': '物资状态', + 'chubeifangshi_detail.value': '储备方式', + 'materialstorages.cangkumingcheng': '所在仓库', + 'shelfs.huojiamingcheng': '所在货架', + 'huojiaceng': '所在货架层', + 'dengjifenlei_detail.value': '等级分类', + 'chanquanxinxi_detail.value': '产权信息', + 'shifouweigudingzichan': '是否为固定资产', + 'gudingzichanbianma': '固定资产编码', + 'chubeinnianxian': '储备年限', + 'cunfangyaoqiu': '存放要求', + 'weihuyaoqiu': '维护要求', + 'equipment_maintain_configs_id_relation.name': '保养频次', + } const res = await index(Object.assign(this.select, { page: 1, page_size: 9999, - table_name: 'inventorys' + table_name: 'inventorys', + is_export: 1, + "export_fields[wuzibianma]": '物资编码', + "export_fields[wuzibianma_material_infos_wuzibianma_relation.material_info_type]": '一级分类', + "export_fields[wuzibianma_material_infos_wuzibianma_relation.material_info_type]": '二级分类', + "export_fields[wuzibianma_material_infos_wuzibianma_relation.fenlei_detail.name]": '所属种类', + "export_fields[zichanmingcheng]": '物资名称', + "export_fields[wuzileixing]": '物资类型', + "export_fields[guigexinghao]": '物资型号', + "export_fields[wuziguige]": '物资规格', + "export_fields[wuzibianma_material_infos_wuzibianma_relation.jiliangdanwei]": '单位', + "export_fields[rukupici]": '入库批次', + "export_fields[zaikushuliang]": '在库数量', + "export_fields[shunxuhao]": '顺序号', + "export_fields[wuzizhuangtai_detail.value]": '物资状态', + "export_fields[chubeifangshi_detail.value]": '储备方式', + "export_fields[materialstorages.cangkumingcheng]": '所在仓库', + "export_fields[shelfs.huojiamingcheng]": '所在货架', + "export_fields[huojiaceng]": '所在货架层', + "export_fields[dengjifenlei_detail.value]": '等级分类', + "export_fields[chanquanxinxi_detail.value]": '产权信息', + "export_fields[shifouweigudingzichan]": '是否为固定资产', + "export_fields[gudingzichanbianma]": '固定资产编码', + "export_fields[chubeinnianxian]": '储备年限', + "export_fields[cunfangyaoqiu]": '存放要求', + "export_fields[weihuyaoqiu]": '维护要求', + "export_fields[equipment_maintain_configs_id_relation.name]": '保养频次', }),true) - if (res.data) { - const headers = this.form.map(i => { - return { - key: i.field, - title: i.name - } - }) - const data = res.data.map(row => headers.map(header => row[header.key])) - data.unshift(headers.map(header => header.title)) - const wb = XLSX.utils.book_new() - const ws = XLSX.utils.aoa_to_sheet(data) - XLSX.utils.book_append_sheet(wb, ws, sheetName) - const wbout = XLSX.write(wb, { - bookType: 'xlsx', - bookSST: true, - type: 'array' - }) - saveAs(new Blob([wbout], { - type: 'application/octet-stream' - }), `自管物资${sheetName}.xlsx`) - } + }, showCode(e, row) { console.log(e, row) diff --git a/src/views/inventorys/stocktaking.vue b/src/views/inventorys/stocktaking.vue index 9f1d83d..bfe4e94 100644 --- a/src/views/inventorys/stocktaking.vue +++ b/src/views/inventorys/stocktaking.vue @@ -11,19 +11,22 @@
关键词: - +
计划日期: - -
-
- 状态: - +
@@ -40,12 +43,28 @@ @@ -76,22 +116,107 @@
- +
+ + + + +
+
+ 关键词: + +
+
+ 计划日期: + +
+
+ + +
+
+ + + + + + +
+ + +
+ +
+
+ + +
关键词: - +
所属计划:
@@ -125,11 +250,19 @@ {{ row.material_infos_plan ? row.material_infos_plan.end_date : '-' }} @@ -146,6 +279,8 @@ @current-change="handleListPageChange" />
+ +
@@ -172,7 +307,12 @@ - +