From 5e10fe06e80c7d146cbb5eb8f7b3e1e447a80b88 Mon Sep 17 00:00:00 2001 From: haoyahui <2032914783@qq.com> Date: 星期五, 17 十一月 2023 17:07:53 +0800 Subject: [PATCH] 部门物品:物品分发,物品报废静态。调拨管理联调,price由元改为分,仓库管理库管员 --- admin-web/src/views/stock/transfer/transferdetails/index.vue | 314 +++---- admin-web/src/api/stock/transfer.js | 5 admin-web/src/views/stock/transfer/transferissue/detail.vue | 10 admin-web/src/views/foundation/store/person.vue | 62 + admin-web/src/views/departmentitem/itemdis/disDetails/index.vue | 275 ++---- admin-web/src/views/stock/transfer/transferApplication/index.vue | 4 admin-web/src/views/departmentitem/itemscr/scrappDetails/index.vue | 47 admin-web/src/views/departmentitem/itemscr/scrapping/detail.vue | 120 +++ admin-web/src/views/departmentitem/itemdis/disDetails/edit.vue | 302 +++++- admin-web/src/views/departmentitem/itemscr/scrapping/index.vue | 537 +++---------- admin-web/src/views/departmentitem/itemscr/scrapping/edit.vue | 436 ++++++++++ admin-web/src/views/stock/inventorycount/inventorytask/edit.vue | 6 admin-web/src/views/stock/transfer/transferApplication/detail.vue | 10 admin-web/src/views/departmentitem/itemdis/distribution/edit.vue | 180 ++-- admin-web/src/views/departmentitem/itemdis/distribution/index.vue | 84 - admin-web/src/api/foudation/store.js | 2 16 files changed, 1,352 insertions(+), 1,042 deletions(-) diff --git a/admin-web/src/api/foudation/store.js b/admin-web/src/api/foudation/store.js index 90589fb..a9fda17 100644 --- a/admin-web/src/api/foudation/store.js +++ b/admin-web/src/api/foudation/store.js @@ -11,7 +11,7 @@ // 娣诲姞浠撳簱绠$悊鍛� export function warehouseManagerAdd(data) { return request({ - url: '/pc/base/warehouse/manager/add', + url: '/pc/base/warehouse/manager/save', method: 'post', data }) diff --git a/admin-web/src/api/stock/transfer.js b/admin-web/src/api/stock/transfer.js index e67fc14..ac8792b 100644 --- a/admin-web/src/api/stock/transfer.js +++ b/admin-web/src/api/stock/transfer.js @@ -78,4 +78,9 @@ method: 'get', params, }); +} + +// 瀵煎嚭 +export function transferDetailListApi(params) { + return '/pc/l/wh/form/transfer/detail/list' } \ No newline at end of file diff --git a/admin-web/src/views/departmentitem/itemdis/disDetails/edit.vue b/admin-web/src/views/departmentitem/itemdis/disDetails/edit.vue index 37b0db9..43846f4 100644 --- a/admin-web/src/views/departmentitem/itemdis/disDetails/edit.vue +++ b/admin-web/src/views/departmentitem/itemdis/disDetails/edit.vue @@ -1,111 +1,267 @@ <template> - <win-sm :title="setting.title" @close="close" :width="'800px'"> - <el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> - <el-form-item label="缂栧彿" prop="code"> - <el-input disabled v-model="formData.code" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鍦板潃" > - <el-input v-model="formData.adss" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - <el-form-item label="鐘舵��" prop="status"> - <el-switch - v-model="formData.status" - active-color="#0d997c" - inactive-color="#C0CCDA"> - </el-switch> - </el-form-item> - </el-form> - <div slot="footer" align="center" class="dialog-footer"> - <my-button name="鍙栨秷" site="form" @click="close"/> - <my-button name="淇濆瓨" site="form" @click="save"/> + <el-dialog + width="1000px" + :visible="true" + :top="'15vh'" + :close-on-click-modal="false" + :append-to-body="true" + :destroy-on-close="true" + @close="close" + > + <div slot="title" align="left" class="dialog-title"> + <div + class="tab-item" + :class="tabIndex == index ? 'active' : ''" + v-for="(item, index) in tabs" + :key="index" + @click="tabIndex = index" + > + {{ item }} + </div> </div> - </win-sm> + <el-form v-show="tabIndex == 0" ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm"> + <div v-for="(item, index) in formData.list" :key="index"> + <el-row :gutter="20"> + <el-col :span="6"> + <el-form-item label="瑙勬牸鍨嬪彿:"> + {{ item.modelName }} + </el-form-item> + </el-col> + <el-col :span="6"> + <el-form-item label="鍗曚綅:"> + {{ item.unit }} + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" v-for="(childItem, childIndex) in item.list" :key="childIndex"> + <el-col :span="6"> + <el-form-item label="鍒嗗彂鏁伴噺:"> + {{ childItem.count }} + </el-form-item> + </el-col> + <el-col :span="6"> + <el-form-item label="浣跨敤浜�:"> + {{ childItem.user }} + </el-form-item> + </el-col> + <el-col :span="6"> + <el-form-item label="鑱旂郴鐢佃瘽:"> + <el-input v-if="childItem.isEdit" v-model="childItem.phone" style="width: 120px"></el-input> + <span v-else>{{ childItem.phone }}</span> + </el-form-item> + </el-col> + <el-col :span="6" v-if="!childItem.isEdit"> + <el-form-item> + <span class="edit-text" @click="handleEditItem(index, childIndex, childItem.isEdit)">淇敼</span> + </el-form-item> + </el-col> + </el-row> + </div> + </el-form> + + <el-form + v-show="tabIndex == 1" + ref="ruleForm" + :model="formData" + :rules="rules" + class="demo-ruleForm" + style="width: 96%" + > + <div v-for="(item, index) in formData.list" :key="index"> + <el-row :gutter="20" class="item-header"> + <el-col :span="6"> + <el-form-item label="淇敼鏃堕棿:"> + {{ item.time }} + </el-form-item> + </el-col> + <el-col :span="6"> + <el-form-item label="淇敼浜�:"> + {{ item.userName }} + </el-form-item> + </el-col> + </el-row> + <div class="line"></div> + <el-row :gutter="20"> + <el-col :span="6"> + <el-form-item label="瑙勬牸鍨嬪彿:"> + {{ item.modelName }} + </el-form-item> + </el-col> + <el-col :span="6"> + <el-form-item label="鍗曚綅:"> + {{ item.unit }} + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="20" v-for="(childItem, childIndex) in item.list" :key="childIndex"> + <el-col :span="6"> + <el-form-item label="鍒嗗彂鏁伴噺:"> + {{ childItem.count }} + </el-form-item> + </el-col> + <el-col :span="6"> + <el-form-item label="浣跨敤浜�:"> + {{ childItem.user }} + </el-form-item> + </el-col> + <el-col :span="6"> + <el-form-item label="鑱旂郴鐢佃瘽:"> + <span>{{ childItem.phone }}</span> + </el-form-item> + </el-col> + </el-row> + <div class="line"></div> + </div> + </el-form> + <div v-if="tabIndex == 0" slot="footer" align="center" class="dialog-footer"> + <my-button name="鍙栨秷" site="form" @click="close" /> + <my-button name="淇濆瓨" site="form" @click="save" /> + </div> + </el-dialog> </template> <script> -import winSm from '@/components/win/win-sm' -import myButton from '@/components/myButton/myButton' -import * as finsystenant from '@/api/baseSetting/finsystenant' +import myButton from '@/components/myButton/myButton'; +import * as finsystenant from '@/api/baseSetting/finsystenant'; export default { - components: {winSm, myButton}, + components: { myButton }, props: { setting: { type: Object, - default: () => { - } - } + default: () => {}, + }, }, data() { return { - checkAll: false, + tabs: ['淇敼浣跨敤浜�', '浣跨敤璁板綍'], + tabIndex: 0, checkedList: [], formData: { - code: '', - name: '', - status: true, - summary: '', + list: [ + { + modelName: '鍨嬪彿111111', + unit: '濂�', + time: '2023-08-08 10:23:34', + userName: '绠$悊鍛�', + list: [ + { + count: 1, + user: '寮犱笁', + phone: '18500000001', + isEdit: false, + }, + ], + }, + { + modelName: '鍨嬪彿222222', + unit: '濂�', + list: [ + { + count: 1, + user: '寮犱笁', + phone: '18500000001', + isEdit: false, + }, + ], + }, + ], }, rules: { - code: [ - {required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur'} - ], - name: [ - {required: true, message: '璇疯緭鍏ユ満鏋勫悕绉�', trigger: 'blur'} - ], - status: [ - {required: true, message: '璇烽�夋嫨鐘舵��', trigger: 'blur'} - ] - } - } + code: [{ required: true, message: '璇疯緭鍏ユ満鏋勭紪鍙�', trigger: 'blur' }], + name: [{ required: true, message: '璇疯緭鍏ユ満鏋勫悕绉�', trigger: 'blur' }], + status: [{ required: true, message: '璇烽�夋嫨鐘舵��', trigger: 'blur' }], + }, + }; }, - created() { - if(this.setting.info){ - this.formData = Object.assign({},JSON.parse(this.setting.info)) - } - }, + created() {}, methods: { - getEditInfo(id){ - + getEditInfo(id) {}, + handleEditItem(index, childIndex) { + this.formData.list[index].list[childIndex].isEdit = true; }, close() { - this.$emit('close') + this.$emit('close'); }, save() { this.$refs.ruleForm.validate((valid) => { if (valid) { - const params = Object.assign({}, this.formData) - if(this.setting.id){ + const params = Object.assign({}, this.formData); + if (this.setting.id) { // 缂栬緫鎺ュ彛 - finsystenant.edit(params).then(res => { + finsystenant.edit(params).then((res) => { if (res) { - this.$message.success('淇濆瓨鎴愬姛锛�') - this.close() - this.$emit('search') + this.$message.success('淇濆瓨鎴愬姛锛�'); + this.close(); + this.$emit('search'); } else { - this.$message.error('淇濆瓨澶辫触') + this.$message.error('淇濆瓨澶辫触'); } - }) - }else{ - params.orgId = this.setting.orgId - finsystenant.add(params).then(res => { + }); + } else { + params.orgId = this.setting.orgId; + finsystenant.add(params).then((res) => { if (res) { - this.$message.success('淇濆瓨鎴愬姛锛�') - this.close() - this.$emit('search') + this.$message.success('淇濆瓨鎴愬姛锛�'); + this.close(); + this.$emit('search'); } else { - this.$message.error('淇濆瓨澶辫触') + this.$message.error('淇濆瓨澶辫触'); } - }) + }); } } else { - this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��') + this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��'); } - }) + }); + }, + }, +}; +</script> +<style lang="scss" scoped> +.dialog-title { + display: flex; + align-items: center; + .tab-item { + color: #3d3d3d; + font-size: 16px; + font-style: normal; + padding: 0 10px; + position: relative; + cursor: pointer; + &.active::after { + content: ''; + width: 100%; + height: 2px; + background: #409eff; + position: absolute; + bottom: -10px; + left: 0; } } } -</script> +.edit-text { + color: #409eff; + cursor: pointer; +} +.item-header { + ::v-deep { + .el-form-item__label, + .el-form-item__content { + font-weight: 700; + } + } +} +::v-deep { + .el-form-item { + margin-top: 10px; + margin-bottom: 10px; + } +} +.line { + width: 100%; + height: 1px; + margin: 10px 0; + background: rgba($color: #dcdfe6, $alpha: 0.45); +} +</style> diff --git a/admin-web/src/views/departmentitem/itemdis/disDetails/index.vue b/admin-web/src/views/departmentitem/itemdis/disDetails/index.vue index 2936cd9..edd496a 100644 --- a/admin-web/src/views/departmentitem/itemdis/disDetails/index.vue +++ b/admin-web/src/views/departmentitem/itemdis/disDetails/index.vue @@ -10,34 +10,30 @@ <el-row style="margin-top: 15px"> <el-col> <!--鍒楄〃--> - <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> + <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" /> </el-col> </el-row> <!--娣诲姞/缂栬緫寮圭獥--> - <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> + <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search" /> + <detail v-if="detailSetting.show" :setting="detailSetting" @close="detailSetting.show = false" /> </el-card> </el-container> </el-container> - <my-import - :import-setting="importSetting" - :dialog-show="importSetting.dialogShow" - :dialog-title="importSetting.dialogTitle" - /> </div> </template> <script> -import MyTableV2 from "@/components/myTable/myTableV2"; -import MyButton from "@/components/myButton/myButton"; +import MyTableV2 from '@/components/myTable/myTableV2'; +import MyButton from '@/components/myButton/myButton'; import SettingIplatform from '@/utils/settingIplatform'; -import edit from './edit' -import * as finsystenant from '@/api/baseSetting/finsystenant' -import myImport from '@/views/components/myImport' -import {getBaseUrl} from '@/utils/base'; +import edit from './edit'; +import detail from '../distribution/detail'; +import * as finsystenant from '@/api/baseSetting/finsystenant'; +import { getBaseUrl } from '@/utils/base'; export default { - name: "index", - components: {MyButton, MyTableV2, edit, myImport}, + name: 'index', + components: { MyButton, MyTableV2, edit, detail }, data() { return { // 鎼滅储妗� @@ -47,68 +43,74 @@ dataIndex: 'name', label: '鍗曞彿', placeholder: '璇疯緭鍏�', - defaultValue: '' - }, - { - type: 'select', - dataIndex: 'status', - label: '绫诲瀷', - placeholder: '璇烽�夋嫨', - defaultValue: '1', - options: [ - { - label: '鍚敤', - value: '1' - }, - { - label: '绂佺敤', - value: '0' - } - ] + defaultValue: '', }, { type: 'text', dataIndex: 'name', label: '鐗╁搧鍚嶇О', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', + }, + { + type: 'select', + dataIndex: 'name', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], + }, + { + type: 'cascader', + dataIndex: 'agencyId', + label: '鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], + }, + { + type: 'select', + dataIndex: 'name', + label: '閮ㄩ棬', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], }, { type: 'text', dataIndex: 'name', label: '鍒涘缓浜�', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'incomeTimeStart', + label: '鏃堕棿', + defaultValue: '', + }, + { + type: 'date-picker', + dataIndex: 'incomeTimeEnd', + label: '鑷�', + defaultValue: '', }, ], - // 鏍戞暟鎹� - treeDataList: [], // 鎼滅储鏉′欢 filterFrom: { tenantId: null, userName: null, userPhone: null, - status: 1 - }, - // 瀵煎叆 - importSetting: { - dialogTitle: '瀵煎叆', - dialogShow: false, - fileSettings: { - data: {}, - uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 涓婁紶鍦板潃 - accept: '.xls', // 鏍煎紡 - type: 'text', // 鍥炴樉褰㈠紡 - loading: false // 瀵煎叆鏁堟灉 - }, - /* 妯℃澘涓嬭浇 */ - templateSettings: { - templateName: '瀵煎叆妯℃澘.xls', // 鍚嶇О - templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 涓嬭浇鍦板潃 - }, - onSuccess: null + status: 1, }, editSetting: { + title: '', + id: '', + orgId: '', + show: false, + }, + detailSetting: { title: '', id: '', orgId: '', @@ -121,37 +123,46 @@ url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃 // 宸ュ叿鏉� tools: { - columnsCtrl: {// 鍒楁帶鍒舵寜閽� - show: false + columnsCtrl: { + // 鍒楁帶鍒舵寜閽� + show: false, }, - generalExport: {// 閫氱敤瀵煎嚭鎸夐挳 - show: false + generalExport: { + // 閫氱敤瀵煎嚭鎸夐挳 + show: false, }, // 鑷畾涔夊伐鍏锋潯鎸夐挳 - custom: [ - ] + custom: [], }, // 鍒椾俊鎭� columns: [ - {title: '绫诲瀷', field: 'name', align: 'left',}, - {title: '鍗曞彿', field: 'code', align: 'center'}, - {title: '鐗╁搧鍚嶇О', field: 'lv', align: 'center', }, - {title: '瑙勬牸鍨嬪彿', field: 'lv', align: 'center', }, - {title: '鍑哄叆搴撴暟閲�', field: 'summary', align: 'left',}, - {title: '閲戦', field: 'summary', align: 'left',}, - {title: '鎵�灞炴満鏋�', field: 'summary', align: 'left',}, - {title: '鍒涘缓浜�', field: 'summary', align: 'left',}, - {title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left',}, + { title: '鍗曞彿', field: 'code', align: 'center' }, + { title: '鐗╁搧鍚嶇О', field: 'lv', align: 'center' }, + { title: '绫诲埆', field: 'lv', align: 'center' }, + { title: '瑙勬牸鍨嬪彿', field: 'lv', align: 'center' }, + { title: '鍒嗗彂鏁伴噺', field: 'summary', align: 'left' }, + { title: '鎵�灞炴満鏋�', field: 'summary', align: 'left' }, + { title: '閮ㄩ棬', field: 'summary', align: 'left' }, + { title: '鍒嗗彂浜�', field: 'summary', align: 'left' }, + { title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left' }, ], // 鎿嶄綔淇℃伅 operation: { show: true, // 鏄剧ず鎿嶄綔鍒� - width: '150', // 鍒楀 + width: '200', // 鍒楀 attr: [ { - title: '璇︽儏', + title: '浣跨敤浜�', + type: 'primary', events: (row) => { - this.showAudit(row); + this.handleEdit(row); + }, + }, + { + title: '璇︽儏', + type: 'info', + events: (row) => { + this.handleDetail(row); }, }, ], @@ -163,118 +174,40 @@ small: false, pageNum: 1, pageSize: 10, - total: 0 - } - } + total: 0, + }, + }, }, - } + }; }, - created() { - // 鑾峰彇鏈烘瀯鏍� - this.initTreeData() - }, + created() {}, methods: { - //瀵煎叆 - importOrg() { - this.importSetting.dialogShow = true - this.importSetting.onSuccess = (response, callBack) => { - if (response.code===1){ - this.$message.success(response.msg) - this.search(1) - }else{ - this.$message.warning(response.msg) - } - callBack() - } - }, - // 宸︿晶鏍戝垵濮嬪寲 - initTreeData() { - finsystenant.getTree().then(res => { - const content = res || [] - this.treeDataList.splice(0, this.treeDataList.length) - this.treeDataList = content - if (content.length > 0) { - this.importSetting.fileSettings.data = {pid: content[0].id} - } - }) - }, - updState(row) { - let vm = this - let text = row.status == 0 ? "鍚敤" : "绂佺敤"; - vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () { - let params = Object.assign({}, row) - params.status = row.status == 1 ? 0 : 1 - finsystenant.edit(params).then(res => { - if (res) { - row.status = row.status === 1 ? 0 : 1 - vm.$modal.msgSuccess(text + "鎴愬姛"); - vm.search() - } - }) - }) - }, - del(row) { - this.$modal - .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�') - .then(function () { - finsystenant.del({id: row.id}).then((res) => { - }); - }) - .then((res) => { - this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search() - }) - .catch(() => { - }); - }, - showAdd() { - // if (!this.editSetting.orgId) { - // this.$message.warning('璇峰厛閫夋嫨宸︿晶鏈烘瀯') - // } else { - this.editSetting.id = null; - this.editSetting.info = null; - this.editSetting.title = '鏂板'; - this.editSetting.show = true; - // } - }, - showAudit(row) { + handleEdit(row) { this.editSetting.id = row.id; this.editSetting.info = JSON.stringify(row); this.editSetting.title = '缂栬緫'; this.editSetting.show = true; }, - nodeClick(param) { - param = param || {} - this.p = Object.assign({}, { - id: param.id, - name: param.name - }) - if (this.p.id != undefined && this.p.id != null) { - this.filterFrom.tenantId = this.p.id - this.editSetting.orgId = this.p.id - } else { - this.filterFrom.tenantId = null - this.editSetting.orgId = null - } - this.importSetting.fileSettings.data = {pid: param.id} - this.search(1) + handleDetail(row) { + this.detailSetting.id = row.id; + this.detailSetting.info = JSON.stringify(row); + this.detailSetting.title = '璇︽儏'; + this.detailSetting.show = true; }, // 鏌ヨtable鍒楄〃 search(pageNum) { if (pageNum != undefined) { - this.$refs.myTable.search(pageNum) + this.$refs.myTable.search(pageNum); } else { - this.$refs.myTable.search() + this.$refs.myTable.search(); } }, fifterForm(params) { - this.filterFrom = Object.assign(this.filterFrom, params) - this.search(1) - } - } -} + this.filterFrom = Object.assign(this.filterFrom, params); + this.search(1); + }, + }, +}; </script> -<style scoped> - -</style> +<style scoped></style> diff --git a/admin-web/src/views/departmentitem/itemdis/distribution/edit.vue b/admin-web/src/views/departmentitem/itemdis/distribution/edit.vue index f9c6b1c..2c19940 100644 --- a/admin-web/src/views/departmentitem/itemdis/distribution/edit.vue +++ b/admin-web/src/views/departmentitem/itemdis/distribution/edit.vue @@ -1,13 +1,25 @@ <template> - <win-md class="stock-edit" :title="`${setting.title}閲囪喘鍏ュ簱`" @close="close" :width="'800px'"> + <win-md class="stock-edit" title="鐗╁搧鍒嗗彂" @close="close" :width="'800px'"> <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px"> <div class="main-w"> <el-row :gutter="24" class="headerHeight"> <el-col :span="12"> - <el-form-item label="鍏ュ簱浠撳簱" prop="warehouseId"> + <el-form-item label="閮ㄩ棬" prop="warehouseId"> <el-select v-model="formData.warehouseId" placeholder="璇烽�夋嫨" style="width: 100%"> - <el-option v-for="item in warehouses" :key="item.id" :label="item.warehouseName" :value="item.id" /> + <el-option v-for="item in departmentOptions" :key="item.id" :label="item.name" :value="item.id" /> </el-select> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="棰嗗彇浜�" prop="warehouseId"> + <el-input v-model="formData.warehouseId" placeholder="璇疯緭鍏�"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="24" class="headerHeight"> + <el-col :span="12"> + <el-form-item label="鑱旂郴鐢佃瘽" prop="buyType"> + <el-input v-model.number="formData.buyType" placeholder="璇疯緭鍏�"></el-input> </el-form-item> </el-col> <el-col :span="12"> @@ -25,17 +37,8 @@ </el-col> </el-row> <el-row :gutter="24" class="headerHeight"> - <el-col :span="12"> - <el-form-item label="閲囪喘绫诲瀷" prop="buyType"> - <el-select v-model="formData.buyType" placeholder="璇烽�夋嫨" style="width: 100%"> - <el-option v-for="item in buyTypeOptions" :key="item.value" :label="item.label" :value="item.value" /> - </el-select> - </el-form-item> - </el-col> - </el-row> - <el-row :gutter="24" class="headerHeight"> <el-col :span="24"> - <el-form-item label="閲囪喘鍏ュ簱鎵嬬画" prop="procureDoc"> + <el-form-item label="鍒嗗彂瀹℃壒鎵嬬画" prop="procureDoc"> <upload ref="uploadRef" :values="fileList" :settings="uploadSettings" @on-change="uploadChange"></upload> </el-form-item> </el-col> @@ -114,52 +117,59 @@ </el-select> </el-form-item> </el-col> - <el-col :span="12"> - <el-form-item label="渚涜揣鍟�" prop="supplier"> - <el-input v-model="goodsItem.supplier" clearable maxlength="20" show-word-limit /> - </el-form-item> - </el-col> </el-row> - <el-table :data="goodsItem.models" :stripe="true"> - <el-table-column prop="baseGoodsModelsId" label="瑙勬牸鍨嬪彿" align="center"> - <template slot-scope="scope"> - {{ getGoodsModelsName(scope.row.baseGoodsModelsId) }} - </template> - </el-table-column> - <el-table-column label="鍗曚綅" align="center"> - <template slot-scope="scope"> - {{ scope.row.unit }} - </template> - </el-table-column> - <el-table-column prop="priceYuan" label="鍗曚环锛堝厓锛�" align="center"> - <template slot-scope="scope"> - <el-form-item - label-width="0" - style="margin-bottom: 0" - :prop="`procureGoods[${goodsIndex}].models[${scope.$index}].priceYuan`" - :rules="rules.priceYuan" - > - <el-input - type="number" - v-model.number="scope.row.priceYuan" - @change="priceChange($event, goodsIndex, scope.$index)" - ></el-input> + <el-row class="card3" v-for="(mItem, mIndex) in goodsItem.models" :key="mIndex"> + <el-row :gutter="24" type="flex" align="middle" style="height: 50px"> + <el-col :span="8"> + <el-form-item label="瑙勬牸鍨嬪彿:" prop="baseGoodsModelsId" style="margin-bottom: 0"> + {{ getGoodsModelsName(mItem.baseGoodsModelsId) }} </el-form-item> - </template> - </el-table-column> - <el-table-column prop="counts" label="閲囪喘鏁伴噺" align="center"> - <template slot-scope="scope"> - <el-form-item - label-width="0" - style="margin-bottom: 0" - :prop="`procureGoods[${goodsIndex}].models[${scope.$index}].counts`" - :rules="rules.counts" - > - <el-input v-model.number="scope.row.counts"></el-input> + </el-col> + <el-col :span="6"> + <el-form-item label="鍓╀綑鏁伴噺:" prop="baseGoodsModelsId" style="margin-bottom: 0" label-width="80"> + 50 </el-form-item> - </template> - </el-table-column> - </el-table> + </el-col> + <el-col :span="10" v-if="true"> + <el-form-item label="鍒嗗彂鏁伴噺:" prop="baseGoodsModelsId" style="margin-bottom: 0" label-width="80"> + <el-input v-model.number="mItem.count" style="width: 160px;"></el-input> + </el-form-item> + </el-col> + </el-row> + <el-table :data="mItem.clist" :stripe="true" v-if="false"> + <el-table-column prop="count" label="鍒嗗彂鏁伴噺" align="center"> + <template slot-scope="scope"> + <el-input v-model="scope.row.count"></el-input> + </template> + </el-table-column> + <el-table-column prop="count" label="浣跨敤浜�" align="center"> + <template slot-scope="scope"> + <el-input v-model="scope.row.user" maxlength="20"></el-input> + </template> + </el-table-column> + <el-table-column prop="count" label="鑱旂郴鐢佃瘽" align="center"> + <template slot-scope="scope"> + <el-input v-model.number="scope.row.phone" maxlength="11"></el-input> + </template> + </el-table-column> + <el-table-column align="left" width="60"> + <template slot-scope="scope"> + <i + v-if="mItem.clist.length > 1" + class="el-icon-remove-outline" + style="color: #f56c6c; font-size: 16px; cursor: pointer" + @click="handleDel(goodsIndex, mIndex, scope.$index)" + ></i> + <i + v-if="mItem.clist.length - 1 == scope.$index" + class="el-icon-circle-plus-outline" + style="color: #0d997c; font-size: 16px; cursor: pointer" + @click="handleAdd(goodsIndex, mIndex, scope.$index)" + ></i> + </template> + </el-table-column> + </el-table> + </el-row> <div class="btn-group"> <el-button v-if="formData.procureGoods.length > 1" @@ -198,6 +208,7 @@ goodsModel, procureDetail, } from '@/api/stock/procure/purchaseOrder'; +import { departmentListAll } from '@/api/system/deptment'; import { getTree } from '@/api/foudation/classification'; import MyButton from '@/components/myButton/myButton'; import winMd from '@/components/win/win-md'; @@ -205,6 +216,7 @@ import { getUploadUrl, getDownUrl } from '@/utils/base'; import { findParentIds } from '@/utils/index'; import { mapGetters } from 'vuex'; +import * as DateFormatter from '@/utils/DateFormatter'; export default { components: { MyButton, winMd, upload }, @@ -224,18 +236,6 @@ let temp = this.formData.procureGoods.filter((v) => v.baseGoodsTemplateId == value); if (!temp || temp.length != 1) { return callback(new Error('宸查�夎繃姝ょ墿鍝�')); - } - callback(); - }; - // 閲戦鏍¢獙 - var checkPrice = (rule, value, callback) => { - console.log(value); - if (!value) { - return callback(new Error('璇疯緭鍏�')); - } - if (value == 0) { - this.$message.warning('鏁板瓧鍊间笉鑳戒负0'); - return callback(new Error('鏁板瓧鍊间笉鑳戒负0')); } callback(); }; @@ -268,14 +268,13 @@ }, ], fileList: [], - warehouses: [], // 鍏ュ簱浠撳簱鍒楄〃 + departmentOptions: [], // 閮ㄩ棬鍒楄〃 categoryOptions: [], // 鐗╁搧鍒嗙被鍒楄〃 modelList: [], //鍨嬪彿鍒楄〃 formData: { procureDoc: '', warehouseId: '', // 鍏ュ簱浠撳簱id - procureTime: '', // 閲囪喘鏃堕棿 - buyType: '2', // 閲囪喘鏂瑰紡锛�1锛氶泦閲囷紱2=鑷噰锛� + procureTime: DateFormatter.formatDate(new Date()), // 閲囪喘鏃堕棿 procureGoods: [], }, goodsItem: { @@ -292,10 +291,12 @@ }, modelsItem: { baseGoodsModelsId: '', // 瑙勬牸鍨嬪彿缂栧彿 - priceYuan: null, // 鍗曚环(鍏�) - price: null, // 鍗曚环(鍒� 閲囪喘闇�瑕侊紝璋冩嫧涓嶉渶瑕�) - counts: null, // 鎿嶄綔鏁伴噺 - unit: null, //鍗曚綅 + syCount: '', + }, + clistItem: { + count: null, + user: null, + phone: null, }, rules: { warehouseId: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], @@ -306,7 +307,6 @@ baseCategoryIds: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], baseGoodsTemplateId: [{ validator: checkGoodsTemplateId, trigger: ['blur', 'change'] }], modelsIds: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], - priceYuan: [{ validator: checkPrice, trigger: 'blur' }], counts: [{ validator: checkCounts, trigger: 'blur' }], }, @@ -331,7 +331,7 @@ }, methods: { async init() { - this.getWarehouseList(); + this.getdeptmentList(); this.getgoodsTemplate(); this.getgoodsModel(); // 鑾峰彇鐗╁搧鍒嗙被鍒楄〃 @@ -364,16 +364,16 @@ }, // 鑾峰彇鍏ュ簱浠撳簱鍒楄〃 - getWarehouseList() { - selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) + getdeptmentList() { + departmentListAll({ agencyId: this.userInfo.tenantId }) .then((res) => { - this.warehouses = res; + this.departmentOptions = res; if (!this.setting.id && res.length) { this.formData.procureGoods.push(JSON.parse(JSON.stringify(this.goodsItem))); } - if (this.warehouses.length && !this.formData.warehouseId) { + if (this.departmentOptions.length && !this.formData.warehouseId) { // 榛樿閫変腑绗竴涓粨搴� - this.formData.warehouseId = this.warehouses[0].id; + this.formData.warehouseId = this.departmentOptions[0].id; } }) .catch((err) => { @@ -463,8 +463,8 @@ let str = JSON.stringify(arr); e.forEach((item) => { if (str.indexOf(item) == -1) { - let temp = this.goodsModelAll.find((v) => v.id == item); - arr.push({ ...this.modelsItem, baseGoodsModelsId: item, unit: temp.unit }); + let clist = [JSON.parse(JSON.stringify(this.clistItem))]; + arr.push({ ...this.modelsItem, baseGoodsModelsId: item, clist }); } }); this.formData.procureGoods[index].models = arr; @@ -475,6 +475,14 @@ let arr = this.formData.procureGoods[index].models; let delIndex = arr.findIndex((v) => v.baseGoodsModelsId == e); this.formData.procureGoods[index].models.splice(delIndex, 1); + }, + + //鍨嬪彿鍒嗗彂鏂板 + handleAdd(goodsIndex, mIndex, cIndex) { + this.formData.procureGoods[goodsIndex].models[mIndex].clist.push(JSON.parse(JSON.stringify(this.clistItem))); + }, + handleDel(goodsIndex, mIndex, cIndex) { + this.formData.procureGoods[goodsIndex].models[mIndex].clist.splice(cIndex, 1); }, // 浠锋牸input鐩戝惉 杞负鍒� @@ -546,4 +554,8 @@ </script> <style scoped lang="scss"> @import url(../../../../styles/store.scss); +.card3 { + border-radius: 2px; + background: #ffffff; +} </style> diff --git a/admin-web/src/views/departmentitem/itemdis/distribution/index.vue b/admin-web/src/views/departmentitem/itemdis/distribution/index.vue index 0c1733b..d94c697 100644 --- a/admin-web/src/views/departmentitem/itemdis/distribution/index.vue +++ b/admin-web/src/views/departmentitem/itemdis/distribution/index.vue @@ -10,7 +10,7 @@ <el-col> <!--鍒楄〃--> <div class="table-tool-bar" style="margin-bottom: 15px"> - <my-button name="鏂板" @click="handleAdd" site="tools" size="medium" /> + <my-button name="鐗╁搧鍒嗗彂" @click="handleAdd" site="tools" size="medium" icon="el-icon-edit-outline" /> <my-button name="瀵煎叆" @click="importSetting.dialogShow = true" site="tools" size="medium" /> </div> <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> @@ -20,42 +20,20 @@ <div class="card-container"> <div class="card-header"> <div class="card-header-left"> - <span>鍏ュ簱鍗曞彿锛�</span> + <span>鍒嗗彂鍗曞彿锛�</span> <span class="value">{{ item.businessFormCode }}</span> - <div class="states" :class="item.states == 1 ? '' : 'states-success'"> - {{ item.states == 1 ? '寰呭叆搴�' : '宸插叆搴�' }} - </div> </div> <div class="card-header-right"> - <template v-if="item.states == 1"> - <el-button name="缂栬緫" site="form" type="success" size="mini" @click="handleEdit(item)" - >缂栬緫</el-button - > - <el-button name="鍏ュ簱" site="form" type="primary" size="mini" @click="handleIncome(item)" - >鍏ュ簱</el-button - > - <el-button name="鍒犻櫎" site="form" type="danger" size="mini" @click="del(item)" - >鍒犻櫎</el-button - > - </template> - <template v-if="item.states != 1"> - <el-button site="form" type="success" size="mini" @click="handleExport(item)" - >瀵煎嚭鍏ュ簱鍗�</el-button - > - </template> <el-button name="鏌ョ湅璇︽儏" site="form" type="info" size="mini" @click="handleDetail(item)" >鏌ョ湅璇︽儏</el-button > </div> </div> <div class="one-hed"> - <div class="box"><span class="span-two">鏈烘瀯锛�</span>{{ item.agencyId }}</div> - <div class="box"><span class="span-two">鎿嶄綔浜猴細</span>{{ item.buyerName }}</div> + <div class="box"><span class="span-two">閮ㄩ棬锛�</span>{{ item.agencyId }}</div> + <div class="box"><span class="span-two">鍒嗗彂浜猴細</span>{{ item.buyerName }}</div> <div class="box"> - <span class="span-two">閲囪喘鏃堕棿锛�</span>{{ item.procureTime | formatTime }} - </div> - <div class="box"> - <span class="span-two">鍏ュ簱鏃堕棿锛�</span>{{ item.incomeTime | formatTime }} + <span class="span-two">鍒嗗彂鏃堕棿锛�</span>{{ item.procureTime | formatTime }} </div> </div> <div class="card-end"> @@ -136,9 +114,17 @@ { type: 'text', dataIndex: 'businessFormCode', - label: '鍏ュ簱鍗曞彿', + label: '鍒嗗彂鍗曞彿', placeholder: '璇疯緭鍏�', defaultValue: '', + }, + { + type: 'select', + dataIndex: 'agencyId', + label: '鍒嗗彂閮ㄩ棬', + placeholder: '璇烽�夋嫨', + defaultValue: '', + options: [], }, { type: 'text', @@ -148,46 +134,16 @@ defaultValue: '', }, { - type: 'cascader', - dataIndex: 'agencyId', - label: '鏈烘瀯', - placeholder: '璇烽�夋嫨', - optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, - defaultValue: '', - options: [], - }, - { type: 'text', dataIndex: 'createName', - label: '鍒涘缓浜�', + label: '鍒嗗彂浜�', placeholder: '璇疯緭鍏�', defaultValue: '', }, { - type: 'select', - dataIndex: 'states', - label: '鐘舵��', - placeholder: '璇烽�夋嫨', - defaultValue: '', - options: [ - { - label: '鍏ㄩ儴', - value: '', - }, - { - label: '寰呭叆搴�', - value: '1', - }, - { - label: '宸插叆搴�', - value: '2', - }, - ], - }, - { type: 'date-picker', dataIndex: 'incomeTimeStart', - label: '鍏ュ簱鏃堕棿', + label: '鍒嗗彂鏃堕棿', defaultValue: '', }, { @@ -247,19 +203,19 @@ callBack(); }; }, - // 鍏ュ簱 + // 鍒嗗彂 handleIncome(row) { - this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 鍏ュ簱鍚�?`, '閲囪喘鍏ュ簱').then(() => { + this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 鍒嗗彂鍚�?`, '鍒嗗彂鍒嗗彂').then(() => { procureIncome({ id: row.id }) .then((res) => { - this.$message.success('鍏ュ簱鎴愬姛锛�'); + this.$message.success('鍒嗗彂鎴愬姛锛�'); this.search(); }) .catch(() => {}); }); }, del(row) { - this.$modal.confirm('鏄惁纭鍒犻櫎鍏ュ簱鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�').then( () => { + this.$modal.confirm('鏄惁纭鍒犻櫎鍒嗗彂鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�').then( () => { procureDel({ id: row.id }) .then((res) => { this.$message.success('鍒犻櫎鎴愬姛锛�'); diff --git a/admin-web/src/views/departmentitem/itemscr/scrappDetails/index.vue b/admin-web/src/views/departmentitem/itemscr/scrappDetails/index.vue index 2936cd9..6377cb4 100644 --- a/admin-web/src/views/departmentitem/itemscr/scrappDetails/index.vue +++ b/admin-web/src/views/departmentitem/itemscr/scrappDetails/index.vue @@ -50,28 +50,36 @@ defaultValue: '' }, { - type: 'select', - dataIndex: 'status', - label: '绫诲瀷', - placeholder: '璇烽�夋嫨', - defaultValue: '1', - options: [ - { - label: '鍚敤', - value: '1' - }, - { - label: '绂佺敤', - value: '0' - } - ] - }, - { type: 'text', dataIndex: 'name', label: '鐗╁搧鍚嶇О', placeholder: '璇疯緭鍏�', defaultValue: '' + }, + { + type: 'select', + dataIndex: 'name', + label: '瑙勬牸鍨嬪彿', + placeholder: '璇疯緭鍏�', + defaultValue: '', + options:[] + }, + { + type: 'cascader', + dataIndex: 'agencyId', + label: '鏈烘瀯', + placeholder: '璇烽�夋嫨', + optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, + defaultValue: '', + options: [], + }, + { + type: 'select', + dataIndex: 'name', + label: '閮ㄩ棬', + placeholder: '璇疯緭鍏�', + defaultValue: '', + options:[] }, { type: 'text', @@ -133,13 +141,12 @@ }, // 鍒椾俊鎭� columns: [ - {title: '绫诲瀷', field: 'name', align: 'left',}, {title: '鍗曞彿', field: 'code', align: 'center'}, {title: '鐗╁搧鍚嶇О', field: 'lv', align: 'center', }, {title: '瑙勬牸鍨嬪彿', field: 'lv', align: 'center', }, - {title: '鍑哄叆搴撴暟閲�', field: 'summary', align: 'left',}, - {title: '閲戦', field: 'summary', align: 'left',}, + {title: '鎶ュ簾鏁伴噺', field: 'summary', align: 'left',}, {title: '鎵�灞炴満鏋�', field: 'summary', align: 'left',}, + {title: '閮ㄩ棬', field: 'summary', align: 'left',}, {title: '鍒涘缓浜�', field: 'summary', align: 'left',}, {title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left',}, ], diff --git a/admin-web/src/views/departmentitem/itemscr/scrapping/detail.vue b/admin-web/src/views/departmentitem/itemscr/scrapping/detail.vue new file mode 100644 index 0000000..b513998 --- /dev/null +++ b/admin-web/src/views/departmentitem/itemscr/scrapping/detail.vue @@ -0,0 +1,120 @@ +<template> + <win-md class="stock-detail" :title="setting.title" @close="close" :width="'800px'"> + <el-row :gutter="20"> + <el-col :span="8"> + <span>鍑哄簱鍗曞彿锛�</span> + <span>{{ detail.businessFormCode }}</span> + </el-col> + <el-col :span="8"> + <span>鍑哄簱浠撳簱锛�</span> + <span>{{ detail.warehouseName }}</span> + </el-col> + <el-col :span="8"> + <span>鎵�灞炴満鏋勶細</span> + <span>{{ detail.agencyName }}</span> + </el-col> + </el-row> + <el-row :gutter="20" style="margin-top: 20px"> + <el-col :span="8"> + <span>鍒涘缓浜猴細</span> + <span>{{ detail.operatorName }}</span> + </el-col> + <el-col :span="8"> + <span>鍑哄簱鏃堕棿锛�</span> + <span>{{ detail.dealTime | formatTime }}</span> + </el-col> + </el-row> + <el-row v-if="detail.procureDoc" :gutter="20" style="margin-top: 20px"> + <el-col class="img-row" :span="24"> + <span>鍑哄簱鎵嬬画锛�</span> + <div class="img-box"></div> + </el-col> + </el-row> + <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.fromOutputGoods" :key="goodsIndex"> + <el-row :gutter="20"> + <el-col :span="8"> + <span>鐗╁搧鍒嗙被锛�</span> + <span>{{ goodsItem.categoryName }}</span> + </el-col> + <el-col :span="8"> + <span>鐗╁搧鍚嶇О锛�</span> + <span>{{ goodsItem.goodsName }}</span> + </el-col> + </el-row> + <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px"> + <el-table-column prop="baseGoodsModelsName" label="瑙勬牸鍨嬪彿" align="center"> + <template slot-scope="scope"> + {{ scope.row.baseGoodsModelsName }} + </template> + </el-table-column> + <el-table-column label="鍗曚綅" align="center"> + <template slot-scope="scope"> + {{ scope.row.unit }} + </template> + </el-table-column> + <el-table-column prop="counts" label="鍑哄簱鏁伴噺" align="center"> + <template slot-scope="scope"> + {{ scope.row.counts }} + </template> + </el-table-column> + <el-table-column prop="counts" label="閲戦" align="center"> + <template slot-scope="scope"> + {{ scope.row.price * scope.row.counts | formatPrice}} + </template> + </el-table-column> + </el-table> + </div> + </win-md> +</template> +<script> +import { outputDetail } from '@/api/stock/accessStock'; +import winMd from '@/components/win/win-md'; +import * as DateFormatter from '@/utils/DateFormatter'; + +export default { + components: { winMd }, + + props: { + setting: { + type: Object, + default: () => {}, + }, + }, + data() { + return { + detail: { + categoryName: '', + businessFormCode: '', + goodsName: '', + agencyId: '', + agencyName: '', + states: '', + createName: '', + fromOutputGoods: [], + }, + }; + }, + filters: { + formatTime(time) { + if (!time) return; + return DateFormatter.LongToDateTime(time); + }, + formatPrice(price) { + return price / 100 + } + }, + created() { + outputDetail({ id: this.setting.id }).then((res) => { + this.detail = res; + }); + }, + methods: { + close() { + this.$emit('close') + }, + }, +}; +</script> +<style lang="scss" scoped> +@import url(../../../../styles/store.scss); +</style> diff --git a/admin-web/src/views/departmentitem/itemscr/scrapping/edit.vue b/admin-web/src/views/departmentitem/itemscr/scrapping/edit.vue new file mode 100644 index 0000000..e73a9dc --- /dev/null +++ b/admin-web/src/views/departmentitem/itemscr/scrapping/edit.vue @@ -0,0 +1,436 @@ +<template> + <win-md class="stock-edit" title="鐗╁搧鎶ュ簾" @close="close" :width="'800px'"> + <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px"> + <div class="main-w"> + <el-row :gutter="24" class="headerHeight"> + <el-col :span="12"> + <el-form-item label="閮ㄩ棬" prop="warehouseId"> + <el-input v-model="formData.departmentName" disabled></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎶ュ簾浜�" prop="createName"> + <el-input v-model="formData.createName" disabled></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎶ュ簾鏃堕棿" prop="dealTime"> + <el-date-picker + v-model="formData.dealTime" + type="datetime" + value="yyyy-MM-dd HH:mm:ss" + value-format="yyyyMMddHHmmss" + placeholder="璇烽�夋嫨鏃ユ湡" + style="width: 100%" + > + </el-date-picker> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="24" class="headerHeight"> + <el-col :span="24"> + <el-form-item label="鎶ュ簾鎵嬬画" prop="procureDoc"> + <upload ref="uploadRef" :settings="uploadSettings" @on-change="uploadChange"></upload> + </el-form-item> + </el-col> + </el-row> + <div class="goods-card" v-for="(goodsItem, goodsIndex) in formData.goods" :key="goodsIndex"> + <el-row :gutter="24"> + <el-col :span="12"> + <el-form-item + label="鐗╁搧鍒嗙被" + :prop="`goods[${goodsIndex}].baseCategoryIds`" + :rules="{ + required: true, + message: '璇烽�夋嫨', + trigger: 'change', + }" + > + <el-cascader + v-model="goodsItem.baseCategoryIds" + :options="categoryOptions" + :props="{ value: 'id' }" + @change="categoryChange($event, goodsIndex)" + style="width: 100%" + ></el-cascader> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item + label="鐗╁搧鍚嶇О" + :prop="`goods[${goodsIndex}].baseGoodsTemplateId`" + :rules="rules.baseGoodsTemplateId" + > + <el-select + v-model="goodsItem.baseGoodsTemplateId" + placeholder="璇峰厛鎷╃墿鍝佸垎绫�" + filterable + :disabled="!goodsItem.baseCategoryId" + style="width: 100%" + @change="goodsTemplateChange($event, goodsIndex)" + > + <el-option + v-for="item in goodsItem.goodsOptions" + :key="item.id" + :label="item.goodsName" + :value="item.id" + /> + </el-select> + </el-form-item> + </el-col> + </el-row> + <el-row :gutter="24"> + <el-col :span="12"> + <el-form-item label="閫夋嫨鍒嗗彂鍗�" :prop="`goods[${goodsIndex}].modelsIds`"> + <el-input v-if="!goodsItem.baseGoodsTemplateId" placeholder="璇峰厛鎷╃墿鍝佸悕绉�" readonly suffix-icon="el-icon-arrow-down" class="cursor-p"></el-input> + <div v-else @click="fenfaSetting.show=true"> + <el-input placeholder="璇烽�夋嫨" readonly suffix-icon="el-icon-arrow-down" class="cursor-p"></el-input> + </div> + </el-form-item> + </el-col> + </el-row> + <el-table :data="goodsItem.models" :stripe="true"> + <el-table-column prop="baseGoodsModelsId" label="瑙勬牸鍨嬪彿" align="center"> + <template slot-scope="scope"> + {{ getGoodsModelsName(scope.row.baseGoodsModelsId) }} + </template> + </el-table-column> + <el-table-column label="鍗曚綅" align="center"> + <template slot-scope="scope"> + {{ scope.row.unit }} + </template> + </el-table-column> + <el-table-column prop="price" label="鐜版湁搴撳瓨" align="center"> + <template slot-scope="scope"> + {{ scope.row.worehouseCount }} + </template> + </el-table-column> + <el-table-column prop="counts" label="鎶ュ簾鏁伴噺" align="center"> + <template slot-scope="scope"> + <el-form-item + label-width="0" + style="margin-bottom: 0" + :prop="`goods[${goodsIndex}].models[${scope.$index}].counts`" + :rules="rules.counts" + > + <el-input + type="number" + v-model="scope.row.counts" + @change="countsChange($event, goodsIndex, scope.$index)" + ></el-input> + </el-form-item> + </template> + </el-table-column> + </el-table> + <div class="btn-group"> + <el-button + v-if="formData.goods.length > 1" + name="绉婚櫎" + type="danger" + plain + size="mini" + @click="removeGoods(goodsIndex)" + >绉婚櫎</el-button + > + <el-button + v-if="formData.goods.length - 1 == goodsIndex" + name="鏂板鐗╁搧" + type="primary" + plain + size="mini" + @click="addGoods" + >鏂板鐗╁搧</el-button + > + </div> + </div> + </div> + </el-form> + <div slot="footer" align="center" class="dialog-footer"> + <my-button name="鍙栨秷" site="form" @click="close" /> + <my-button name="淇濆瓨" site="form" @click="handleSubmit" /> + </div> + <div v-if="fenfaSetting.show"> + <win-sm title="閫夋嫨鍒嗗彂鍗�" @close="fenfaSetting.show=false" :width="'800px'"> + <el-table :data="fenfaData"> + <el-table-column type="selection" width="55"> </el-table-column> + <el-table-column label="鍒嗗彂鍗曞彿" prop="businessFormCode"></el-table-column> + <el-table-column label="鐗╁搧鍚嶇О" prop="modelName"></el-table-column> + <el-table-column label="鍒嗗彂鏁伴噺" prop="fenfaCount"></el-table-column> + <el-table-column label="鍓╀綑鏁伴噺" prop="count"></el-table-column> + <el-table-column label="鍒嗗彂鏃堕棿" prop="time"></el-table-column> + </el-table> + <div slot="footer" align="center" class="dialog-footer"> + <my-button name="鍙栨秷" site="form" @click="fenfaSetting.show=false" /> + <my-button name="纭畾" site="form" @click="handleConfirm" /> + </div> + </win-sm> + </div> + </win-md> +</template> +<script> +import { + goodsTemplate, + goodsModel, + selectTenantWarehouse, + warehouseSelectNumber, +} from '@/api/baseSetting/finsystenant'; +import { outputAdd } from '@/api/stock/accessStock'; +import { getTree } from '@/api/foudation/classification'; +import MyButton from '@/components/myButton/myButton'; +import winMd from '@/components/win/win-md'; +import winSm from '@/components/win/win-sm'; +import upload from '@/components/upload/index'; +import { getUploadUrl } from '@/utils/base'; +import { mapGetters } from 'vuex'; + +export default { + components: { MyButton, winMd, winSm, upload }, + props: { + setting: { + type: Object, + default: () => {}, + }, + }, + data() { + // 鑷畾涔夋牎楠� + // 鐗╁搧閲嶅鏍¢獙 + var checkGoodsTemplateId = (rule, value, callback) => { + if (!value) { + return callback(new Error('璇烽�夋嫨')); + } + let temp = this.formData.goods.filter((v) => v.baseGoodsTemplateId == value); + if (!temp || temp.length != 1) { + return callback(new Error('宸查�夎繃姝ょ墿鍝�')); + } + callback(); + }; + return { + loading: false, + warehouseOptions: [], // 鎶ュ簾浠撳簱鍒楄〃 + categoryOptions: [], // 鐗╁搧鍒嗙被鍒楄〃 + modelList: [], //鍨嬪彿鍒楄〃 + fenfaSetting: { + show: false, + id: '', + }, + fenfaData:[], + formData: { + warehouseId: '', // 鎶ュ簾浠撳簱id + dealTime: '', // 鎶ュ簾鏃堕棿 + procureDoc: '', + goods: [], + }, + goodsItem: { + baseCategoryIds: '', // 鍒嗙被缂栧彿鏁扮粍 + baseCategoryId: '', // 鍒嗙被缂栧彿 + baseGoodsTemplateId: '', // 鐗╁搧妯$増缂栧彿 + goodsTemplateName: '', // 鐗╁搧妯$増鍚嶇О + goodsOptions: [], // 鐗╁搧鍒楄〃select + modelsOptions: [], //瑙勬牸鍨嬪彿select + models: [], // 鐗╁搧鍚嶇О + modelsIds: [], //瑙勬牸鍨嬪彿 + }, + modelsItem: { + baseGoodsModelsId: '', // 瑙勬牸鍨嬪彿缂栧彿 + worehouseCount: 0, + counts: null, // 鎿嶄綔鏁伴噺 + unit: null, //鍗曚綅 + }, + rules: { + warehouseId: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], + dealTime: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], + buyType: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], + + baseCategoryIds: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], + baseGoodsTemplateId: [{ validator: checkGoodsTemplateId, trigger: ['blur', 'change'] }], + modelsIds: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }], + counts: [{ required: true, message: '璇疯緭鍏�', trigger: 'change' }], + }, + + uploadSettings: { + title: '涓婁紶', + max: 20, // 鏈�澶уぇ灏忥紝鍗曚綅M + num: 10, // 鏀寔涓婁紶鍥剧墖涓暟 + accept: '.jpg,.png', // 闄愬埗鏍煎紡 + tip: '', // 鎻愮ず 榛樿锛歚鍙兘涓婁紶${this.defaultSettings.num}涓�${this.defaultSettings.accept}鏂囦欢锛屼笖涓嶈秴杩�${this.defaultSettings.max}kb` + uploadUrl: getUploadUrl(), // 涓婁紶璺緞 + multiple: true, // 鏄惁鏀寔鎵归噺涓婁紶 + disabled: false, // 鏄惁绂佺敤 + type: 'picture', // text/picture + }, + }; + }, + computed: { + ...mapGetters(['userInfo']), + }, + created() { + this.init(); + }, + methods: { + async init() { + this.getWarehouseList(); + this.getgoodsTemplate(); + // 鑾峰彇鐗╁搧鍒嗙被鍒楄〃 + const treeRes = await getTree(); + this.categoryOptions = this.removeEmptyChildren(treeRes); + this.formData.departmentName = this.userInfo.sysDeptName; + this.formData.createName = this.userInfo.userName; + }, + + // 鑾峰彇鎶ュ簾浠撳簱鍒楄〃 + getWarehouseList() { + selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) + .then((res) => { + this.warehouseOptions = res; + if (res.length) { + this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem))); + } + if (this.warehouseOptions.length && !this.formData.warehouseId) { + // 榛樿閫変腑绗竴涓粨搴� + this.formData.warehouseId = this.warehouseOptions[0].id; + } + }) + .catch((err) => { + console.log('err', err); + }); + }, + + removeEmptyChildren(arr) { + arr.forEach((item) => { + if (!item.children || !item.children.length) { + delete item.children; + } else { + this.removeEmptyChildren(item.children); + } + }); + return arr; + }, + + // 鑾峰彇鐗╁搧鍚嶇О鍒楄〃 + getgoodsTemplate(id, index) { + goodsTemplate({ categoryId: id || '' }).then((res) => { + if (index || index == 0) { + this.$set(this.formData.goods[index], 'goodsOptions', res); + } else { + this.goodsTemplatelAll = res; + } + }); + }, + + // 鏍规嵁鐗╁搧鍚嶇Оid鑾峰彇鍚嶅瓧 + getGoodsTemplateName(id) { + let item = this.goodsTemplatelAll.find((v) => v.id == id); + if (item) { + return item.goodsName; + } + return; + }, + + // 鏍规嵁瑙勬牸鍨嬪彿id鑾峰彇鍚嶅瓧 + getGoodsModelsName(id) { + let item = this.goodsModelAll.find((v) => v.id == id); + if (item) { + return item.modelName; + } + return; + }, + + // 鐗╁搧鍒嗙被閫夋嫨 + categoryChange(e, index) { + this.formData.goods[index].goodsOptions = []; + this.formData.goods[index].baseGoodsTemplateId = ''; + this.formData.goods[index].goodsTemplateName = ''; + this.formData.goods[index].modelsOptions = []; + this.formData.goods[index].modelsIds = []; + this.formData.goods[index].models = []; + + this.formData.goods[index].baseCategoryId = e[e.length - 1]; + // 鏍规嵁閫変腑鍒嗙被璇锋眰鐗╁搧鍚嶇О鍒楄〃 + this.getgoodsTemplate(e[e.length - 1], index); + }, + + // 鐗╁搧鍚嶇О鍒楄〃閫夋嫨 + goodsTemplateChange(e, index) { + this.formData.goods[index].modelsOptions = []; + this.formData.goods[index].modelsIds = []; + this.formData.goods[index].models = []; + + this.formData.goods[index].goodsTemplateName = this.getGoodsTemplateName(e); + }, + + // 涓婁紶 + uploadChange() { + let arr = this.$refs.uploadRef.fileList; + this.formData.procureDoc = JSON.stringify(arr); + }, + + // 鐐瑰嚮鏂板鐗╁搧 + addGoods() { + this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem))); + }, + + // 鐐瑰嚮绉婚櫎 + removeGoods(index) { + this.formData.goods.splice(index, 1); + }, + + // 鎶ュ簾鏁伴噺鏍¢獙 + countsChange(e, goodsIndex, index) { + const curItem = this.formData.goods[goodsIndex].models[index]; + const worehouseCount = curItem.worehouseCount; + if (e == 0) { + this.$message.warning('鏁伴涓嶈兘涓�0'); + curItem.counts = null; + } + if (e > worehouseCount) { + this.$message.warning('鏁伴瓒呰繃鐜版湁搴撳瓨'); + curItem.counts = worehouseCount > 0 ? worehouseCount : null; + } + }, + + handleConfirm(){ + + }, + + // 鎻愪氦 + handleSubmit() { + this.$refs['ruleForm'].validate((valid) => { + if (valid) { + console.log('this.formData', this.formData); + outputAdd(this.formData) + .then((res) => { + this.$message.success('淇濆瓨鎴愬姛锛�'); + this.close(); + this.$emit('search'); + }) + .catch((err) => { + console.log('edit err', err); + this.$message.error('淇濆瓨澶辫触'); + }); + } else { + this.$message.error('鏍¢獙鏈�氳繃锛岃妫�鏌ャ��'); + } + }); + }, + + close() { + this.formData = { + warehouseId: '', // 鎶ュ簾浠撳簱id + dealTime: '', // 鎶ュ簾鏃堕棿 + goods: [], + }; + this.$emit('close'); + }, + }, +}; +</script> +<style scoped lang="scss"> +@import url(../../../../styles/store.scss); +.cursor-p { + ::v-deep { + .el-input__inner { + cursor: pointer; + } + } +} +</style> diff --git a/admin-web/src/views/departmentitem/itemscr/scrapping/index.vue b/admin-web/src/views/departmentitem/itemscr/scrapping/index.vue index ea1d5b0..77fadac 100644 --- a/admin-web/src/views/departmentitem/itemscr/scrapping/index.vue +++ b/admin-web/src/views/departmentitem/itemscr/scrapping/index.vue @@ -1,449 +1,172 @@ <template> - <div class="app-container"> + <div class="app-container stock-container"> <el-container> - <el-container> - <el-card class="box-card" style="width: 100%" shadow="never"> - <!--鎼滅储鏉′欢--> - <div class="filter-container"> - <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> - </div> - <el-row style="margin-top: 15px"> - <el-col> - <!--鍒楄〃--> - <my-button name="鏂板" @click="addtable" site="form" /> - <div :style="{'overflow-y': 'auto', height:`${clientHeight - 320}px`}"> - <el-row class="card" - :gutter="5"> - <el-col v-for="(item, index) in proData" :key="index" class="cm-item"> - <el-card class="card-data"> - <div class="card-container"> - <div class="hed-one">鍑哄簱鍗曞彿锛歿{ item.order_no }}</div> - <div class="one-hed"> - <div class="box"><span class="span-two">鏈烘瀯锛�</span>{{ item.customer_name }}</div> - <div class="box"><span class="span-two">鎿嶄綔浜猴細</span>{{ item.customer_name }}</div> - <div class="box"><span class="span-two">鍑哄簱鏃堕棿锛�</span>{{ item.customer_name }}</div> - </div> - <div class="card-end"> - <div v-for="(just, index) in item.data" class="two-end"> - <div class="item"><span>{{ just.order_no }}锛�</span>{{ just.customer_name }}</div> - </div> - </div> - </div> - <div class="card-but"> - <my-button name="鏌ョ湅璇︽儏" site="form" /> - <my-button name="瀵煎嚭鍑哄簱鍗�" site="form" /> - </div> - </el-card> - </el-col> - </el-row> - </div> - <el-pagination - :small="false" - :current-page="1" - :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]" - :page-size="10" - layout="total, sizes, prev, pager, next, jumper" - :total="0" - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - /> - </el-col> - </el-row> - <!--娣诲姞/缂栬緫寮圭獥--> - <el-dialog title="鏂板鍑哄簱" :close-on-click-modal="false" :visible.sync="adddialog" width="60%" > - <el-form ref="ruleForm" :model="formData" class="demo-ruleForm" label-width="100px"> - <el-row :gutter="24" class="headerHeight"> - <el-col :span="12"> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - </el-col> - </el-row> - <el-row :gutter="24" class="headerHeight"> - <el-col :span="24"> - <el-form-item label="鍑哄簱鎵嬬画" prop="name"> - 浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢 - </el-form-item> - </el-col> - </el-row> - <div style="position: relative;"> - <div style="background-color: #F9F9F9;width: 90%;"> - <el-row :gutter="24" class=""> - <el-col :span="12"> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - </el-col> - </el-row> - <el-row :gutter="24" class=""> - <el-col :span="12"> - <el-form-item label="浠撳簱鍚嶇О" prop="name"> - <el-input v-model="formData.name" clearable maxlength="20" show-word-limit style="width: 100%"/> - </el-form-item> - </el-col> - </el-row> - <el-table :data="formData.tableData" height="100%" :stripe="true"> - <el-table-column prop="projectName" label="瑙勬牸鍨嬪彿" align="center"> </el-table-column> - <el-table-column prop="time1" label="鍗曚綅" align="center"> </el-table-column> - <el-table-column prop="unit" label="鐜版湁搴撳瓨" align="center"> </el-table-column> - <el-table-column prop="time2" label="鍑哄簱鏁伴噺" align="center"> </el-table-column> - </el-table> - </div> - <div style="position: absolute;right: 0;top: 152px;"> - <my-button style="display: block;margin-left: 10px;margin-bottom: 5px;" name="绉婚櫎" site="form"/> - <my-button name="鏂板鐗╁搧" site="form"/> - </div> - </div> - </el-form> - <div slot="footer" align="center" class="dialog-footer"> - <my-button name="纭畾" site="form" /> - <my-button name="鍙栨秷" site="form" @click="adddialog = false"/> + <el-card class="box-card" style="width: 100%" shadow="never"> + <!--鎼滅储鏉′欢--> + <div class="filter-container"> + <my-search ref="searchBar" :items="items" @search="fifterForm"></my-search> + </div> + <el-row style="margin-top: 15px"> + <el-col> + <!--鍒楄〃--> + <div class="table-tool-bar" style="margin-bottom: 15px;"> + <my-button name="鏂板" @click="handleAdd" site="tools" size="medium" /> </div> - </el-dialog> - </el-card> - </el-container> + <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading"> + <el-row v-if="list.length" class="card" :gutter="5"> + <el-col v-for="(item, index) in list" :key="index" class="cm-item"> + <el-card class="card-data"> + <div class="card-container"> + <div class="card-header"> + <div class="card-header-left"> + <span>鎶ュ簾鍗曞彿锛�</span> + <span class="value">{{ item.businessFormCode }}</span> + </div> + <div class="card-header-right"> + <el-button site="form" type="success" size="mini" @click="handleExport(item)" + >瀵煎嚭鎶ュ簾鍗�</el-button + > + <el-button name="鏌ョ湅璇︽儏" site="form" type="info" size="mini" @click="handleDetail(item)" + >鏌ョ湅璇︽儏</el-button + > + </div> + </div> + <div class="one-hed"> + <div class="box"><span class="span-two">閮ㄩ棬锛�</span>{{ item.agencyName }}</div> + <div class="box"><span class="span-two">鎿嶄綔浜猴細</span>{{ item.operatorName }}</div> + <div class="box"> + <span class="span-two">鎶ュ簾鏃堕棿锛�</span>{{ item.dealTime | formatTime }} + </div> + </div> + <div class="card-end"> + <div v-for="(just, index) in item.formOutputTemplateInfoList" :key="index" class="item"> + <div class="name">{{ just.goodsName }}</div> + <div class="value-box"> + <div class="value-box-item"> + <span class="label">鏁伴噺锛�</span> + <span class="value">{{ just.count }}</span> + <span class="unit">{{ just.unit }}</span> + </div> + </div> + </div> + </div> + </div> + </el-card> + </el-col> + </el-row> + <div class="no-data" v-else>鏆傛棤鏁版嵁</div> + </div> + <el-pagination + :small="false" + :current-page="pageNum" + :page-sizes="[5, 10, 20, 50, 100, 200, 300, 400, 500]" + :page-size="pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="total" + @size-change="handleSizeChange" + @current-change="handleCurrentChange" + /> + </el-col> + </el-row> + </el-card> </el-container> - <my-import - :import-setting="importSetting" - :dialog-show="importSetting.dialogShow" - :dialog-title="importSetting.dialogTitle" - /> + <!--娣诲姞/缂栬緫寮圭獥--> + <edit v-if="editSetting.show" :setting="editSetting" ref="editRef" @close="editSetting.show=false" @search="refreshData"></edit> + <detail v-if="detailSetting.show" :setting="detailSetting" @close="detailSetting.show=false" ref="detailRef"></detail> </div> </template> <script> -import MyButton from "@/components/myButton/myButton"; -import SettingIplatform from '@/utils/settingIplatform'; -import myImport from '@/views/components/myImport' -import {getBaseUrl} from '@/utils/base'; +import { outputList } from '@/api/stock/accessStock'; +import MyButton from '@/components/myButton/myButton'; +import myImport from '@/views/components/myImport'; +import edit from './edit'; +import detail from './detail'; +import listPage from '../../../mixins/listPage' export default { - name: "index", - components: {MyButton, myImport}, + name: 'index', + mixins: [listPage], + components: { MyButton, myImport, edit, detail }, data() { return { - - adddialog: false, - formData:{ - tableData:[ - { - projectName:'555' - }, - { - projectName:'444' - } - ], - }, + list: [], // 鎼滅储妗� items: [ { type: 'text', - dataIndex: 'name', - label: '鍑哄簱鍗曞彿', + dataIndex: 'businessFormCode', + label: '鎶ュ簾鍗曞彿', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', + }, + { + type: 'select', + dataIndex: 'businessFormCode', + label: '鍒嗗彂閮ㄩ棬', + placeholder: '璇疯緭鍏�', + defaultValue: '', + options:[] }, { type: 'text', - dataIndex: 'name', + dataIndex: 'goodsName', label: '鐗╁搧鍚嶇О', placeholder: '鍙ā绯婃悳绱�', - defaultValue: '' + defaultValue: '', }, { type: 'text', - dataIndex: 'name', - label: '鍒涘缓浜�', + dataIndex: 'createName', + label: '鎶ュ簾浜�', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', }, { type: 'date-picker', - dataIndex: 'val1', - label: '鍑哄簱鏃堕棿', - defaultValue: '' + dataIndex: 'startTime', + label: '鎶ュ簾鏃堕棿', + defaultValue: '', }, { type: 'date-picker', - dataIndex: 'val2', + dataIndex: 'endTime', label: '鑷�', - defaultValue: '' + defaultValue: '', }, - // { - // type: 'select', - // dataIndex: 'status', - // label: '鐘舵��', - // placeholder: '璇烽�夋嫨', - // defaultValue: '1', - // options: [ - // { - // label: '鍚敤', - // value: '1' - // }, - // { - // label: '绂佺敤', - // value: '0' - // } - // ] - // } ], - proData: [ - { - order_no:'55555', - customer_name:'666', - data:[ - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'20浠�' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - ] - }, - { - order_no:'55555', - customer_name:'666', - data:[ - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - ] - }, - { - order_no:'55555', - customer_name:'666', - data:[ - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'20浠�' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - ] - }, - { - order_no:'55555', - customer_name:'666', - data:[ - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'20浠�' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - ] - - }, - { - order_no:'55555', - customer_name:'666', - data:[ - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'20浠�' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - ] - - }, - { - order_no:'55555', - customer_name:'666', - data:[ - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'20浠�' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - ] - - }, - { - order_no:'55555', - customer_name:'666', - data:[ - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'20浠�' - }, - { - order_no:'鐭冲嫆鑺鑹茬⒊绮�', - customer_name:'666' - }, - ] - - } - ], - // 鏍戞暟鎹� - treeDataList: [], - // 鎼滅储鏉′欢 - filterFrom: { - tenantId: null, - userName: null, - userPhone: null, - status: 1 - }, - // 瀵煎叆 - importSetting: { - dialogTitle: '瀵煎叆', - dialogShow: false, - fileSettings: { - data: {}, - uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 涓婁紶鍦板潃 - accept: '.xls', // 鏍煎紡 - type: 'text', // 鍥炴樉褰㈠紡 - loading: false // 瀵煎叆鏁堟灉 - }, - /* 妯℃澘涓嬭浇 */ - templateSettings: { - templateName: '瀵煎叆妯℃澘.xls', // 鍚嶇О - templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 涓嬭浇鍦板潃 - }, - onSuccess: null - }, - editSetting: { - title: '', - id: '', - orgId: '', - show: false, - }, - } - }, - computed: { - clientHeight () { - return document.documentElement.clientHeight - }, - }, - created() { + }; }, methods: { - handleSizeChange(){}, - handleCurrentChange(){}, - //瀵煎叆 - importOrg() { - this.importSetting.dialogShow = true - this.importSetting.onSuccess = (response, callBack) => { - if (response.code===1){ - this.$message.success(response.msg) - this.search(1) - }else{ - this.$message.warning(response.msg) - } - callBack() - } - }, - - addtable() { - this.adddialog = true - }, - // 鏌ヨtable鍒楄〃 - search(pageNum) { - if (pageNum != undefined) { - // this.$refs.myTable.search(pageNum) - } else { - // this.$refs.myTable.search() - } + fetchData() { + this.loading = true; + outputList({ + pageNum: this.pageNum, + pageSize: this.pageSize, + ...this.filterFrom, + }).then((res) => { + this.list = res.datas; + this.total = res.totalRows; + this.loading = false; + }); }, fifterForm(params) { - console.log(params,'555'); - this.filterFrom = Object.assign(this.filterFrom, params) - this.search(1) - } - } -} + this.filterFrom = Object.assign(this.filterFrom, params); + if (this.filterFrom.startTime) { + this.filterFrom.startTime = this.filterFrom.startTime.replace(/\-/g, ''); + } + if (this.filterFrom.endTime) { + this.filterFrom.endTime = this.filterFrom.endTime.replace(/\-/g, ''); + } + if (this.filterFrom.agencyId&&this.filterFrom.agencyId.length) { + this.filterFrom.agencyId = this.filterFrom.agencyId[this.filterFrom.agencyId.length - 1]; + } + this.search(1); + }, + }, +}; </script> -<style scoped> -.card { - display: flex; - flex-wrap: wrap; - margin: 0px !important; - .cm-item { - width: 100%; - } - .cm-item /deep/ .el-card__body { - padding: 10px; - } -} -.card-data{ - margin-top: 8px; - .card-container{ - display: inline-block; - width: 70%; - .hed-one{ - color: #2298EE; - font-size: 18px; - } - .one-hed{ - margin-top: 15px; - .box{ - display: inline-block; - margin-right: 20px; - } - } - .span-two{ - color: #83919e; - font-size: 14px; - } - .card-end{ - font-size: 14px; - color: #3d3d3d; - margin-top: 15px; - display: flex; - flex-wrap: wrap; - .two-end{ - width: calc(33.33% - 20px); - margin-bottom: 15px; - } - } - - } - .card-but{ - display: inline-block; - } - .end{ - display: inline-block; - } - -} - +<style scoped lang="scss"> +@import url(../../../../styles/store.scss); </style> diff --git a/admin-web/src/views/foundation/store/person.vue b/admin-web/src/views/foundation/store/person.vue index 040a042..1a4e5dc 100644 --- a/admin-web/src/views/foundation/store/person.vue +++ b/admin-web/src/views/foundation/store/person.vue @@ -7,7 +7,7 @@ <el-tree ref="tree" :data="treeData" node-key="id" :props="defaultProps" default-expand-all> <template slot-scope="{ node, data }"> <div v-if="data.type != 'user'">{{ data.name }}</div> - <div v-else class="leaf-node" :class="data.checked ? 'checked' : ''" @click="handleCheckItem(node, data)"> + <div v-else class="leaf-node" :class="data.checked ? 'checked' : ''" @click="handleCheckItem(data)"> {{ data.name }} </div> </template> @@ -59,10 +59,15 @@ children: 'children', label: 'name', }, + key: Math.random(), }; }, computed: { checkedKeys() { + console.log( + 1111, + this.selectdSections.map((v) => v.id), + ); return this.selectdSections.map((v) => v.id); }, }, @@ -71,18 +76,38 @@ if (this.setting.info) { this.formData = Object.assign({}, JSON.parse(this.setting.info)); } - this.initTree(); + this.init(); warehouseManagerList({ warehouseId: this.formData.id }).then((res) => { - console.log(res); + this.selectdSections = res.map((item) => { + item.name = item.managerName; + item.id = item.managerId; + return item; + }); + this.key = Math.random(); }); }, methods: { - initTree() { - userSelectDepartment({ agencyId: this.formData.agencyId }).then((res) => { - this.treeData = [res]; + async init() { + let managerRes = await warehouseManagerList({ warehouseId: this.formData.id }); + this.managerListStr = JSON.stringify(managerRes); + const res = await userSelectDepartment({ agencyId: this.formData.agencyId }); + this.treeData = this.deepList([res]); + }, + deepList(list) { + return list.map((item) => { + if (item.children && item.children.length) { + this.deepList(item.children); + } else { + if (this.managerListStr.includes(item.id)) { + item.checked = true; + } else { + item.checked = false; + } + } + return item; }); }, - handleCheckItem(node, data) { + handleCheckItem(data) { this.selectdSections = []; this.treeData[0].children.forEach((item, index) => { if (item.children) { @@ -96,14 +121,13 @@ }); } }); - console.log(this.treeData); }, handleDel(item) { - this.handleCheckItem({}, item); + this.handleCheckItem(item); }, handleClear() { this.selectdSections.forEach((item) => { - this.handleCheckItem({}, item); + this.handleCheckItem(item); }); this.selectdSections = []; }, @@ -111,23 +135,21 @@ this.$emit('close'); }, save() { - let params = []; + let params = { + warehouseId: this.setting.id, + warehouseManagerInfoList: [], + }; this.selectdSections.forEach((item) => { - params.push({ + params.warehouseManagerInfoList.push({ managerId: item.id, managerName: item.name, - baseWarehouseId: this.setting.id, }); }); debugger; warehouseManagerAdd(params).then((res) => { - if (res) { - this.$message.success('淇濆瓨鎴愬姛锛�'); - this.close(); - this.$emit('search'); - } else { - this.$message.error('淇濆瓨澶辫触'); - } + this.$message.success('淇濆瓨鎴愬姛锛�'); + this.close(); + this.$emit('search'); }); }, }, diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue b/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue index 8aa9b05..2ce7f4d 100644 --- a/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue +++ b/admin-web/src/views/stock/inventorycount/inventorytask/edit.vue @@ -49,6 +49,7 @@ import winSm from '@/components/win/win-sm'; import myButton from '@/components/myButton/myButton'; import {formatDate} from '@/utils/DateFormatter' +import { mapGetters } from 'vuex'; export default { components: { winSm, myButton }, @@ -73,6 +74,9 @@ }, }; }, + computed:{ + ...mapGetters(['userInfo']) + }, created() { if (this.setting.info) { this.formData = Object.assign({}, JSON.parse(this.setting.info)); @@ -87,7 +91,7 @@ methods: { // 鑾峰彇浠撳簱鍒楄〃 handleSelectTenantWarehouse() { - selectTenantWarehouse().then((res) => { + selectTenantWarehouse({agencyId:this.userInfo.tenantId}).then((res) => { this.warehouseOptions = res; }); }, diff --git a/admin-web/src/views/stock/transfer/transferApplication/detail.vue b/admin-web/src/views/stock/transfer/transferApplication/detail.vue index 1716dfe..6249a6d 100644 --- a/admin-web/src/views/stock/transfer/transferApplication/detail.vue +++ b/admin-web/src/views/stock/transfer/transferApplication/detail.vue @@ -59,16 +59,16 @@ {{ scope.row.unit }} </template> </el-table-column> - <el-table-column prop="price" label="鐜版湁搴撳瓨" align="center"> - <template slot-scope="scope"> - {{ scope.row.price }} - </template> - </el-table-column> <el-table-column prop="counts" label="璋冩嫧鏁伴噺" align="center"> <template slot-scope="scope"> {{ scope.row.counts }} </template> </el-table-column> + <el-table-column prop="price" label="閲戦" align="center"> + <template slot-scope="scope"> + {{ scope.row.price }} + </template> + </el-table-column> </el-table> </div> </div> diff --git a/admin-web/src/views/stock/transfer/transferApplication/index.vue b/admin-web/src/views/stock/transfer/transferApplication/index.vue index 4c6cfec..497b784 100644 --- a/admin-web/src/views/stock/transfer/transferApplication/index.vue +++ b/admin-web/src/views/stock/transfer/transferApplication/index.vue @@ -220,9 +220,9 @@ // 鍏ュ簱 handleIncome(row) { - this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 璋冩嫧鍑哄簱鍚�?`, '璋冩嫧鍑哄簱').then(() => { + this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode} 鎺ユ敹鍏ュ簱鍚�?`, '鎺ユ敹鍏ュ簱').then(() => { transfeIncome({ id: row.id }).then((res) => { - this.$message.success('璋冩嫧鍑哄簱鎴愬姛锛�'); + this.$message.success('鎺ユ敹鍏ュ簱鎴愬姛锛�'); this.search(1); }); }); diff --git a/admin-web/src/views/stock/transfer/transferdetails/index.vue b/admin-web/src/views/stock/transfer/transferdetails/index.vue index cfd17a1..cfca3d8 100644 --- a/admin-web/src/views/stock/transfer/transferdetails/index.vue +++ b/admin-web/src/views/stock/transfer/transferdetails/index.vue @@ -10,55 +10,57 @@ <el-row style="margin-top: 15px"> <el-col> <!--鍒楄〃--> - <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> + <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" /> </el-col> </el-row> <!--娣诲姞/缂栬緫寮圭獥--> - <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/> + <detail + v-if="detailSetting.show" + :setting="detailSetting" + @close="detailSetting.show = false" + @search="search" + /> </el-card> </el-container> </el-container> - <my-import - :import-setting="importSetting" - :dialog-show="importSetting.dialogShow" - :dialog-title="importSetting.dialogTitle" - /> </div> </template> <script> -import MyTableV2 from "@/components/myTable/myTableV2"; -import MyButton from "@/components/myButton/myButton"; +import MyTableV2 from '@/components/myTable/myTableV2'; +import MyButton from '@/components/myButton/myButton'; import SettingIplatform from '@/utils/settingIplatform'; -import edit from './edit' -import * as finsystenant from '@/api/baseSetting/finsystenant' -import myImport from '@/views/components/myImport' -import {getBaseUrl} from '@/utils/base'; +import detail from '../transferApplication/detail'; +import * as finsystenant from '@/api/baseSetting/finsystenant'; +import myImport from '@/views/components/myImport'; +import { getBaseUrl } from '@/utils/base'; +import { goodsModel } from '@/api/baseSetting/finsystenant'; +import * as DateFormatter from '@/utils/DateFormatter'; export default { - name: "index", - components: {MyButton, MyTableV2, edit, myImport}, + name: 'index', + components: { MyButton, MyTableV2, detail, myImport }, data() { return { // 鎼滅储妗� items: [ { type: 'text', - dataIndex: 'name', + dataIndex: 'businessFormCode', label: '鍗曞彿', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', }, { type: 'text', - dataIndex: 'name', + dataIndex: 'goodsName', label: '鐗╁搧鍚嶇О', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', }, { type: 'select', - dataIndex: 'warehouseId', + dataIndex: 'baseGoodsModelsId', label: '瑙勬牸鍨嬪彿', placeholder: '璇烽�夋嫨', defaultValue: '', @@ -66,7 +68,7 @@ }, { type: 'cascader', - dataIndex: 'name', + dataIndex: 'outAgencyId', label: '璋冩嫧鏈烘瀯', placeholder: '璇烽�夋嫨', optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, @@ -75,7 +77,7 @@ }, { type: 'cascader', - dataIndex: 'name', + dataIndex: 'inAgencyId', label: '鎺ユ敹鏈烘瀯', placeholder: '璇烽�夋嫨', optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, @@ -83,35 +85,11 @@ options: [], }, { - type: 'select', - dataIndex: 'status', - label: '绫诲瀷', - placeholder: '璇烽�夋嫨', - defaultValue: '1', - options: [ - { - label: '鍚敤', - value: '1' - }, - { - label: '绂佺敤', - value: '0' - } - ] - }, - { type: 'text', - dataIndex: 'name', - label: '鐗╁搧鍚嶇О', - placeholder: '璇疯緭鍏�', - defaultValue: '' - }, - { - type: 'text', - dataIndex: 'name', + dataIndex: 'operatorName', label: '鍒涘缓浜�', placeholder: '璇疯緭鍏�', - defaultValue: '' + defaultValue: '', }, { type: 'date-picker', @@ -138,69 +116,80 @@ defaultValue: '', }, ], - // 鏍戞暟鎹� - treeDataList: [], // 鎼滅储鏉′欢 filterFrom: { tenantId: null, userName: null, userPhone: null, - status: 1 + status: 1, }, - // 瀵煎叆 - importSetting: { - dialogTitle: '瀵煎叆', - dialogShow: false, - fileSettings: { - data: {}, - uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 涓婁紶鍦板潃 - accept: '.xls', // 鏍煎紡 - type: 'text', // 鍥炴樉褰㈠紡 - loading: false // 瀵煎叆鏁堟灉 - }, - /* 妯℃澘涓嬭浇 */ - templateSettings: { - templateName: '瀵煎叆妯℃澘.xls', // 鍚嶇О - templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 涓嬭浇鍦板潃 - }, - onSuccess: null - }, - editSetting: { + detailSetting: { title: '', id: '', - orgId: '', show: false, }, // 琛ㄦ牸鏁版嵁 table: { showIndex: true, // 鏄惁鏄剧ず搴忓彿 expand: false, // 鏄惁鏄剧ず璇︽儏鏁版嵁 - url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃 + url: SettingIplatform.apiBaseURL + '/pc/l/wh/form/transfer/detail/list', // 璇锋眰鍦板潃 // 宸ュ叿鏉� tools: { - columnsCtrl: {// 鍒楁帶鍒舵寜閽� - show: false + columnsCtrl: { + // 鍒楁帶鍒舵寜閽� + show: false, }, - generalExport: {// 閫氱敤瀵煎嚭鎸夐挳 - show: false + generalExport: { + // 閫氱敤瀵煎嚭鎸夐挳 + show: false, }, // 鑷畾涔夊伐鍏锋潯鎸夐挳 - custom: [ - ] + custom: [], }, // 鍒椾俊鎭� columns: [ - {title: '鍗曞彿', field: 'code', align: 'center'}, - {title: '鐗╁搧鍚嶇О', field: 'lv', align: 'center', }, - {title: '瑙勬牸鍨嬪彿', field: 'lv', align: 'center', }, - {title: '鏁伴噺', field: 'summary', align: 'left',}, - {title: '鎺ュ彈鏈烘瀯', field: 'summary', align: 'left',}, - {title: '鍒涘缓浜�', field: 'summary', align: 'left',}, - {title: '鐢宠鏃堕棿', field: 'summary', align: 'left',}, - {title: '鎺ユ敹鏃堕棿', field: 'summary', align: 'left',}, - {title: '璋冩嫧鏈烘瀯', field: 'summary', align: 'left',}, - {title: '璋冩嫧浜�', field: 'summary', align: 'left',}, - {title: '璋冩嫧鏃堕棿', field: 'summary', align: 'left',}, + { title: '鍗曞彿', field: 'businessFormCode', align: 'center' }, + { title: '鐗╁搧鍚嶇О', field: 'goodsName', align: 'center' }, + { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'center' }, + { title: '鏁伴噺', field: 'counts', align: 'left' }, + { title: '鎺ュ彈鏈烘瀯', field: 'inAgencyName', align: 'left' }, + { title: '鍒涘缓浜�', field: 'operatorName', align: 'left' }, + { + title: '鐢宠鏃堕棿', + field: 'createTime', + align: 'center', + width: 160, + formatter: (row) => { + return { value: DateFormatter.LongToDateTime(row.createTime) }; + }, + }, + { + title: '鎺ユ敹鏃堕棿', + field: 'inTime', + align: 'center', + width: 160, + formatter: (row) => { + return { value: row.inTime ? DateFormatter.LongToDateTime(row.inTime) : '-' }; + }, + }, + { title: '璋冩嫧鏈烘瀯', field: 'outAgencyName', align: 'left' }, + { + title: '璋冩嫧浜�', + field: 'outOperatorName', + align: 'center', + formatter: (row) => { + return { value: row.outOperatorName || '-' }; + }, + }, + { + title: '璋冩嫧鏃堕棿', + field: 'outputTime', + align: 'center', + width: 160, + formatter: (row) => { + return { value: row.outputTime ? DateFormatter.LongToDateTime(row.outputTime) : '-' }; + }, + }, ], // 鎿嶄綔淇℃伅 operation: { @@ -210,7 +199,7 @@ { title: '璇︽儏', events: (row) => { - this.showAudit(row); + this.showDetail(row); }, }, ], @@ -222,118 +211,65 @@ small: false, pageNum: 1, pageSize: 10, - total: 0 - } - } + total: 0, + }, + }, }, - } + }; }, created() { - // 鑾峰彇鏈烘瀯鏍� - this.initTreeData() + this.initSearch(); }, methods: { - //瀵煎叆 - importOrg() { - this.importSetting.dialogShow = true - this.importSetting.onSuccess = (response, callBack) => { - if (response.code===1){ - this.$message.success(response.msg) - this.search(1) - }else{ - this.$message.warning(response.msg) - } - callBack() - } - }, - // 宸︿晶鏍戝垵濮嬪寲 - initTreeData() { - finsystenant.getTree().then(res => { - const content = res || [] - this.treeDataList.splice(0, this.treeDataList.length) - this.treeDataList = content - if (content.length > 0) { - this.importSetting.fileSettings.data = {pid: content[0].id} - } - }) - }, - updState(row) { - let vm = this - let text = row.status == 0 ? "鍚敤" : "绂佺敤"; - vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () { - let params = Object.assign({}, row) - params.status = row.status == 1 ? 0 : 1 - finsystenant.edit(params).then(res => { - if (res) { - row.status = row.status === 1 ? 0 : 1 - vm.$modal.msgSuccess(text + "鎴愬姛"); - vm.search() - } - }) - }) - }, - del(row) { - this.$modal - .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�') - .then(function () { - finsystenant.del({id: row.id}).then((res) => { + initSearch() { + this.items.map(async (item) => { + if (item.label == '瑙勬牸鍨嬪彿') { + let res = await goodsModel(); + item.options = res.map((v) => { + v.label = v.modelName; + v.value = v.id; + return v; }); - }) - .then((res) => { - this.$message.success('鍒犻櫎鎴愬姛锛�'); - this.search() - }) - .catch(() => { - }); + } + return item; + }); }, - showAdd() { - // if (!this.editSetting.orgId) { - // this.$message.warning('璇峰厛閫夋嫨宸︿晶鏈烘瀯') - // } else { - this.editSetting.id = null; - this.editSetting.info = null; - this.editSetting.title = '鏂板'; - this.editSetting.show = true; - // } - }, - showAudit(row) { - this.editSetting.id = row.id; - this.editSetting.info = JSON.stringify(row); - this.editSetting.title = '缂栬緫'; - this.editSetting.show = true; - }, - nodeClick(param) { - param = param || {} - this.p = Object.assign({}, { - id: param.id, - name: param.name - }) - if (this.p.id != undefined && this.p.id != null) { - this.filterFrom.tenantId = this.p.id - this.editSetting.orgId = this.p.id - } else { - this.filterFrom.tenantId = null - this.editSetting.orgId = null - } - this.importSetting.fileSettings.data = {pid: param.id} - this.search(1) + showDetail(row) { + this.detailSetting.id = row.id; + this.detailSetting.info = JSON.stringify(row); + this.detailSetting.title = '璇︽儏'; + this.detailSetting.show = true; }, // 鏌ヨtable鍒楄〃 search(pageNum) { if (pageNum != undefined) { - this.$refs.myTable.search(pageNum) + this.$refs.myTable.search(pageNum); } else { - this.$refs.myTable.search() + this.$refs.myTable.search(); } }, fifterForm(params) { - this.filterFrom = Object.assign(this.filterFrom, params) - this.search(1) - } - } -} + this.filterFrom = Object.assign(this.filterFrom, params); + if (this.filterFrom.outAgencyId && this.filterFrom.outAgencyId.length) { + this.filterFrom.outAgencyId = this.filterFrom.outAgencyId[this.filterFrom.outAgencyId.length - 1]; + } + if (this.filterFrom.inAgencyId && this.filterFrom.inAgencyId.length) { + this.filterFrom.inAgencyId = this.filterFrom.inAgencyId[this.filterFrom.inAgencyId.length - 1]; + } + if (this.filterFrom.createTimeStart) { + this.filterFrom.createTimeStart = this.filterFrom.createTimeStart.replace(/\-/g, ''); + } + if (this.filterFrom.createTimeEnd) { + this.filterFrom.createTimeEnd = this.filterFrom.createTimeEnd.replace(/\-/g, ''); + } + if (this.filterFrom.startTime) { + this.filterFrom.startTime = this.filterFrom.startTime.replace(/\-/g, ''); + } + if (this.filterFrom.endTime) { + this.filterFrom.endTime = this.filterFrom.endTime.replace(/\-/g, ''); + } + this.search(1); + }, + }, +}; </script> - -<style scoped> - -</style> diff --git a/admin-web/src/views/stock/transfer/transferissue/detail.vue b/admin-web/src/views/stock/transfer/transferissue/detail.vue index 849ea34..99fff27 100644 --- a/admin-web/src/views/stock/transfer/transferissue/detail.vue +++ b/admin-web/src/views/stock/transfer/transferissue/detail.vue @@ -67,16 +67,16 @@ {{ scope.row.unit }} </template> </el-table-column> - <el-table-column prop="price" label="鐜版湁搴撳瓨" align="center"> - <template slot-scope="scope"> - {{ scope.row.price }} - </template> - </el-table-column> <el-table-column prop="counts" label="璋冩嫧鏁伴噺" align="center"> <template slot-scope="scope"> {{ scope.row.counts }} </template> </el-table-column> + <el-table-column prop="price" label="閲戦" align="center"> + <template slot-scope="scope"> + {{ scope.row.price }} + </template> + </el-table-column> </el-table> </div> </div> -- Gitblit v1.9.1