diff --git a/src/api/resource/allocationStorehouseDetailApi.js b/src/api/resource/allocationStorehouseDetailApi.js new file mode 100644 index 0000000..fa0226c --- /dev/null +++ b/src/api/resource/allocationStorehouseDetailApi.js @@ -0,0 +1,135 @@ +import request from '@/utils/request' +import { getCommunityId } from '@/api/community/communityApi' + +// 获取调拨仓库申请列表 +export function listAllocationStorehouseApplys(params) { + return new Promise((resolve, reject) => { + request({ + url: '/resourceStore.listAllocationStorehouseApplys', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 获取调拨仓库物品列表 +export function listAllocationStorehouses(params) { + return new Promise((resolve, reject) => { + request({ + url: '/resourceStore.listAllocationStorehouses', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 审核调拨仓库订单 +export function auditAllocationStoreOrder(data) { + return new Promise((resolve, reject) => { + request({ + url: '/resourceStore.auditAllocationStoreOrder', + method: 'post', + data: { + ...data, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询下一处理人 +export function queryNextDealUser(params) { + return new Promise((resolve, reject) => { + request({ + url: '/oaWorkflow.queryNextDealUser', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询工作流审核信息 +export function listWorkflowAuditInfo(params) { + return new Promise((resolve, reject) => { + request({ + url: '/workflow.listWorkflowAuditInfo', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询员工信息 +export function queryStaffInfos(params) { + return new Promise((resolve, reject) => { + request({ + url: '/query.staff.infos', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} + +// 查询组织树 +export function listOrgTree(params) { + return new Promise((resolve, reject) => { + request({ + url: '/org.listOrgTree', + method: 'get', + params: { + ...params, + communityId: getCommunityId() + } + }).then(response => { + const res = response.data + resolve(res) + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/i18n/commonLang.js b/src/i18n/commonLang.js index c14c9e5..6a6f0f4 100644 --- a/src/i18n/commonLang.js +++ b/src/i18n/commonLang.js @@ -57,6 +57,7 @@ export const messages = { choose:'Choose', submitSuccess:'Submit successfully', saveSuccess:'successfully', + noData:'No Data', } }, zh: { @@ -117,6 +118,7 @@ export const messages = { choose:'选择', submitSuccess:'提交成功', saveSuccess:'成功', + noData:'暂无数据', } } } \ No newline at end of file diff --git a/src/i18n/resourceI18n.js b/src/i18n/resourceI18n.js index 91d13bb..9af7f96 100644 --- a/src/i18n/resourceI18n.js +++ b/src/i18n/resourceI18n.js @@ -20,6 +20,7 @@ import { messages as allocationUserStorehouseManageMessages } from '../views/res import { messages as resourceStoreUseRecordManageMessages } from '../views/resource/resourceStoreUseRecordManageLang' import { messages as printEquipmentAccountLabelMessages } from '../views/resource/printEquipmentAccountLabelLang' import { messages as resourceDetailMessages } from '../views/resource/resourceDetailLang' +import { messages as allocationStorehouseDetailMessages } from '../views/resource/allocationStorehouseDetailLang' export const messages = { @@ -45,6 +46,7 @@ export const messages = { ...resourceStoreUseRecordManageMessages.en, ...printEquipmentAccountLabelMessages.en, ...resourceDetailMessages.en, + ...allocationStorehouseDetailMessages.en, }, zh: { ...resourceAuditFlowMessages.zh, @@ -68,5 +70,6 @@ export const messages = { ...resourceStoreUseRecordManageMessages.zh, ...printEquipmentAccountLabelMessages.zh, ...resourceDetailMessages.zh, + ...allocationStorehouseDetailMessages.zh, } } \ No newline at end of file diff --git a/src/router/resourceRouter.js b/src/router/resourceRouter.js index 407a01d..0501528 100644 --- a/src/router/resourceRouter.js +++ b/src/router/resourceRouter.js @@ -101,9 +101,14 @@ export default [ component: () => import('@/views/resource/resourceStoreUseRecordManageList.vue') }, { - path:'/views/resource/resourceDetail', - name:'/views/resource/resourceDetail', + path: '/views/resource/resourceDetail', + name: '/views/resource/resourceDetail', component: () => import('@/views/resource/resourceDetailList.vue') - }, + }, + { + path: '/pages/common/allocationStorehouseDetail', + name: '/pages/common/allocationStorehouseDetail', + component: () => import('@/views/resource/allocationStorehouseDetailList.vue') + }, ] \ No newline at end of file diff --git a/src/views/resource/addItemOutList.vue b/src/views/resource/addItemOutList.vue index 346ecc4..cc700ec 100644 --- a/src/views/resource/addItemOutList.vue +++ b/src/views/resource/addItemOutList.vue @@ -65,68 +65,83 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {{ $t('addItemOut.itemType') }} + + {{ $t('addItemOut.itemName') }} + + {{ $t('addItemOut.itemSpec') }} + + {{ $t('addItemOut.price') }} + + {{ $t('addItemOut.stock') }} + + {{ $t('addItemOut.applyQuantity') }} + + {{ $t('addItemOut.remark') }} + + {{ $t('addItemOut.operation') }} +
+ {{ item.parentRstName || '-' }} > {{ item.rstName || '-' }} + + {{ item.resName }}({{ item.resCode }}) + + {{ item.rssName || '-' }} + + + + {{ _getTimesStock(item) }}{{ item.unitCodeName }} + + +   {{ item.unitCodeName }} + + + + + + {{ $t('addItemOut.remove') }} + +
+ {{ $t('common.noData') }} +
@@ -329,20 +344,20 @@ export default { return } - let validate = true - resourceStores.forEach(item => { - const selectedStock = item.selectedStock || 0 - const quantity = parseFloat(item.quantity) || 0 - - if (quantity > selectedStock) { - validate = false - } - }) - - if (!validate) { - this.$message.error(this.$t('addItemOut.insufficientStock')) - return - } + //let validate = true + // resourceStores.forEach(item => { + // const selectedStock = item.selectedStock || 0 + // const quantity = parseFloat(item.quantity) || 0 + // console.log('item', item, selectedStock, quantity) + // if (quantity > selectedStock) { + // validate = false + // } + // }) + + // if (!validate) { + // this.$message.error(this.$t('addItemOut.insufficientStock')) + // return + // } this.addItemOutInfo.endUserName = this.addItemOutInfo.endUserInfo.staffName this.addItemOutInfo.endUserTel = this.addItemOutInfo.endUserInfo.staffTel @@ -394,6 +409,9 @@ export default { this.addItemOutInfo.resourceStores[index].selectedStock = item.stock } }) + this.$nextTick(() => { + this.$forceUpdate() + }) }, _getTimesStock(resourceStore) { if (!resourceStore.timesId) return "-" @@ -405,9 +423,6 @@ export default { } }) - if (!resourceStore.quantity) { - resourceStore.quantity = '' - } return stock }, @@ -483,4 +498,48 @@ export default { .clearfix:after { clear: both; } + +.custom-table { + width: 100%; + border-collapse: collapse; + border: 1px solid #ebeef5; +} + +.custom-table th { + background-color: #fafafa; + color: #606266; + font-weight: 500; + font-size: 14px; +} + +.custom-table td { + color: #606266; + font-size: 14px; +} + +.custom-table tr:hover { + background-color: #f5f7fa; +} + +.custom-select { + width: 100%; + height: 32px; + line-height: 32px; + border: 1px solid #dcdfe6; + border-radius: 4px; + padding: 0 12px; + font-size: 14px; + color: #606266; + background-color: #fff; + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); +} + +.custom-select:focus { + outline: none; + border-color: #409eff; +} + +.custom-select:hover { + border-color: #c0c4cc; +} \ No newline at end of file diff --git a/src/views/resource/allocationStorehouseApplyList.vue b/src/views/resource/allocationStorehouseApplyList.vue index d1981b1..ec26b4a 100644 --- a/src/views/resource/allocationStorehouseApplyList.vue +++ b/src/views/resource/allocationStorehouseApplyList.vue @@ -40,81 +40,99 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {{ $t('allocationStorehouseApply.itemType') }} + + {{ $t('allocationStorehouseApply.itemName') }} + + {{ $t('allocationStorehouseApply.itemSpec') }} + + {{ $t('allocationStorehouseApply.fixedItem') }} + + {{ $t('allocationStorehouseApply.sourceWarehouse') }} + + {{ $t('allocationStorehouseApply.referencePrice') }} + + {{ $t('allocationStorehouseApply.stock') }} + + {{ $t('allocationStorehouseApply.targetWarehouse') }} + + {{ $t('allocationStorehouseApply.transferQuantity') }} + + {{ $t('allocationStorehouseApply.operation') }} +
+ {{ item.parentRstName || '-' }} > {{ item.rstName || '-' }} + + {{ item.resName }}({{ item.resCode }}) + + {{ item.rssName || '-' }} + + {{ item.isFixedName }} + + {{ item.shaName }} + + + + {{ getTimesStock(item) }}{{ item.unitCodeName }} + + + + + {{ item.unitCodeName }} + + + {{ $t('allocationStorehouseApply.cancelTransfer') }} + +
+ {{ $t('common.noData') }} +
@@ -255,6 +273,9 @@ export default { this.resourceStores[index].selectedStock = item.stock } }) + this.$nextTick(() => { + this.$forceUpdate() + }) }, getTimesStock(item) { if (!item.timesId) return "-" @@ -397,5 +418,49 @@ export default { text-align: right; margin-top: 20px; } + + .custom-table { + width: 100%; + border-collapse: collapse; + border: 1px solid #ebeef5; + } + + .custom-table th { + background-color: #fafafa; + color: #606266; + font-weight: 500; + font-size: 14px; + } + + .custom-table td { + color: #606266; + font-size: 14px; + } + + .custom-table tr:hover { + background-color: #f5f7fa; + } + + .custom-select { + width: 100%; + height: 32px; + line-height: 32px; + border: 1px solid #dcdfe6; + border-radius: 4px; + padding: 0 12px; + font-size: 14px; + color: #606266; + background-color: #fff; + transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1); + } + + .custom-select:focus { + outline: none; + border-color: #409eff; + } + + .custom-select:hover { + border-color: #c0c4cc; + } } \ No newline at end of file diff --git a/src/views/resource/allocationStorehouseDetailLang.js b/src/views/resource/allocationStorehouseDetailLang.js new file mode 100644 index 0000000..296d79b --- /dev/null +++ b/src/views/resource/allocationStorehouseDetailLang.js @@ -0,0 +1,64 @@ +export const messages = { + en: { + allocationStorehouseDetail: { + applyInfo: 'Application Information', + print: 'Print', + back: 'Back', + applicant: 'Applicant:', + applyTime: 'Application Time:', + type: 'Type:', + status: 'Status:', + applyRemark: 'Application Remark:', + allocationGoods: 'Allocation Goods', + goodsId: 'Goods ID', + goodsType: 'Goods Type', + goodsName: 'Goods Name', + goodsSpec: 'Goods Specification', + goodsCode: 'Goods Code', + fixedGoods: 'Fixed Goods', + transferredWarehouse: 'Transferred Warehouse', + returnPerson: 'Return Person', + targetWarehouse: 'Target Warehouse', + originalStock: 'Original Stock', + allocationQuantity: 'Allocation Quantity', + workflow: 'Workflow Process', + serialNumber: 'No.', + handler: 'Handler', + processTime: 'Process Time', + timeConsuming: 'Time Consuming', + opinion: 'Opinion' + }, + + }, + zh: { + allocationStorehouseDetail: { + applyInfo: '申请信息', + print: '打印', + back: '返回', + applicant: '申请人:', + applyTime: '申请时间:', + type: '类型:', + status: '状态:', + applyRemark: '申请说明:', + allocationGoods: '调拨物品', + goodsId: '物品ID', + goodsType: '物品类型', + goodsName: '物品名称', + goodsSpec: '物品规格', + goodsCode: '物品编码', + fixedGoods: '固定物品', + transferredWarehouse: '被调仓库', + returnPerson: '退还人', + targetWarehouse: '目标仓库', + originalStock: '原库存', + allocationQuantity: '调拨数量', + workflow: '工单流转', + serialNumber: '序号', + handler: '处理人', + processTime: '处理时间', + timeConsuming: '耗时', + opinion: '意见' + }, + + } +} \ No newline at end of file diff --git a/src/views/resource/allocationStorehouseDetailList.vue b/src/views/resource/allocationStorehouseDetailList.vue new file mode 100644 index 0000000..303b89f --- /dev/null +++ b/src/views/resource/allocationStorehouseDetailList.vue @@ -0,0 +1,263 @@ + + + + + \ No newline at end of file diff --git a/src/views/resource/allocationStorehouseManageList.vue b/src/views/resource/allocationStorehouseManageList.vue index 5ac39cc..bd14525 100644 --- a/src/views/resource/allocationStorehouseManageList.vue +++ b/src/views/resource/allocationStorehouseManageList.vue @@ -1,12 +1,13 @@