feat:
1、采购、调拨、库存盘点、报废管理 列表页面优化
2、物品报废详情对接 明细对接
| | |
| | | type="year" |
| | | :clearable="true" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyy'" |
| | | @change="(v) => panelChange(v, 'yyyy')" |
| | | /> |
| | | <!--月选择器--> |
| | |
| | | type="month" |
| | | :clearable="true" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyyMM'" |
| | | @change="(v) => panelChange(v, 'yyyy-MM')" |
| | | /> |
| | | <!--日选择器--> |
| | |
| | | type="date" |
| | | :clearable="true" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyyMMdd'" |
| | | @change="(v) => panelChange(v, 'yyyy-MM-dd')" |
| | | /> |
| | | <!--日期带时间选择器--> |
| | |
| | | } |
| | | }, |
| | | panelChange(v, type) { |
| | | var info = null |
| | | if (v && this.item.type !== 'date-time-picker') { |
| | | info = formatDates(v, type) |
| | | } else { |
| | | info = v |
| | | } |
| | | this.val = info |
| | | this.$emit('change', info) |
| | | this.$emit('change', v) |
| | | }, |
| | | filterOption(input, option) { |
| | | return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
| | |
| | | title: '附件上传', |
| | | max: 100, // 最大大小,单位M |
| | | num: 10, // 支持上传图片个数 |
| | | accept: '.jpg,.jpeg,.png,.bmp,.pdf,.doc,.docx,.xls,.xlsx,.apk,.zip', // 限制格式 |
| | | accept: '.jpg,.jpeg,.png,.pdf,.doc,.docx,.xls,.xlsx', // 限制格式 |
| | | tip: '', // 提示 默认:`只能上传${this.defaultSettings.num}个${this.defaultSettings.accept}文件,且不超过${this.defaultSettings.max}kb` |
| | | uploadUrl: '', // 上传路径 |
| | | multiple: true, // 是否支持批量上传 |
| | |
| | | <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> |
| | | </el-card> |
| | |
| | | import MyTableV2 from '@/components/myTable/myTableV2'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import { getBaseUrl } from '@/utils/base'; |
| | | import { mapGetters } from 'vuex'; |
| | | import { selectTenantWarehouse, goodsModel } from '@/api/baseSetting/finsystenant'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import {mapGetters} from 'vuex'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2 }, |
| | | components: {MyButton, MyTableV2}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null}, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{ key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId' }], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | }, |
| | | filterFrom: {}, |
| | | // 表格数据 |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '仓库', field: 'warehouseName', align: 'left' }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: '类型', field: 'inventoryResultType', align: 'center' }, |
| | | { title: '库存数量', field: 'initCounts', align: 'left' }, |
| | | { title: '盘点数量', field: 'inventoryCounts', align: 'left' }, |
| | | { title: '异常数量', field: 'errorCounts', align: 'left' }, |
| | | {title: '仓库', field: 'warehouseName', align: 'left', width: 140}, |
| | | {title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 130}, |
| | | {title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 120}, |
| | | {title: '类型', field: 'inventoryResultType', align: 'center'}, |
| | | {title: '库存数量', field: 'initCounts', align: 'left'}, |
| | | {title: '盘点数量', field: 'inventoryCounts', align: 'left'}, |
| | | {title: '异常数量', field: 'errorCounts', align: 'left'}, |
| | | { |
| | | title: '出入库类型', |
| | | field: 'inventoryType', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 100, |
| | | formatter: (row) => { |
| | | return { value: row.inventoryType, type: row.inventoryType && row.inventoryType.includes('盘盈') ? 'success' : 'danger' }; |
| | | return { |
| | | value: row.inventoryType, |
| | | type: row.inventoryType && row.inventoryType.includes('盘盈') ? 'success' : 'danger' |
| | | }; |
| | | }, |
| | | }, |
| | | { title: '出入库单号', field: 'warehouseFormCode', align: 'left' }, |
| | | { title: '机构', field: 'agencyName', align: 'left' }, |
| | | { title: '操作人', field: 'operatorName', align: 'left' }, |
| | | {title: '出入库单号', field: 'warehouseFormCode', align: 'center', width: 130}, |
| | | {title: '机构', field: 'agencyName', align: 'left', width: 130}, |
| | | {title: '操作人', field: 'operatorName', align: 'center', width: 90}, |
| | | { |
| | | title: '操作时间', |
| | | field: 'operatorTime', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: row.operatorTime ? DateFormatter.LongToDateTime(row.operatorTime) : '-' }; |
| | | return {value: row.operatorTime ? DateFormatter.LongToDateTime(row.operatorTime) : '-'}; |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | computed: { |
| | | ...mapGetters(['userInfo']), |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | |
| | | <el-table-column prop="baseGoodsModelsName" label="型号" align="center"> </el-table-column> |
| | | <el-table-column prop="inventoryCount" label="应盘数量" align="center"></el-table-column> |
| | | <el-table-column prop="realNum" label="实盘数量" align="center"></el-table-column> |
| | | <el-table-column prop="states" label="状态" align="center"></el-table-column> |
| | | <el-table-column prop="states" label="状态" align="center"> |
| | | <template slot-scope="{row}"> |
| | | {{row.inventoryResultType}} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </win-md> |
| | | </template> |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '盘点单号', field: 'businessFormCode', align: 'left' }, |
| | | { title: '任务名称', field: 'businessFormName', align: 'left' }, |
| | | { title: '盘点仓库', field: 'warehouseName', align: 'left' }, |
| | | { title: '盘点人', field: 'operatorName', align: 'left' }, |
| | | { title: '监盘人', field: 'operatorName2', align: 'left' }, |
| | | { title: '盘点单号', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: '任务名称', field: 'businessFormName', align: 'left', minWidth: 140 }, |
| | | { title: '盘点仓库', field: 'warehouseName', align: 'left', minWidth: 130 }, |
| | | { title: '盘点人', field: 'operatorName', align: 'center', width: 120 }, |
| | | { title: '监盘人', field: 'operatorName2', align: 'center', width: 120 }, |
| | | { |
| | | title: '盘点时间', |
| | | field: 'inventoryDate', |
| | |
| | | { |
| | | title: '状态', |
| | | field: 'states', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 90, |
| | | type: 'primary', |
| | | formatter: (row) => { |
| | | return { |
| | |
| | | }, |
| | | }, |
| | | { |
| | | title: '生产盘点表', |
| | | title: '生成盘点表', |
| | | type: 'primary', |
| | | hidden: (row) => { |
| | | if (row.states != 2) { |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '单号', field: 'businessFormCode', align: 'center' }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: '单号', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left', width: 140 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { |
| | | title: '单价', |
| | | field: 'price', |
| | |
| | | return { value: row.price / 100 }; |
| | | }, |
| | | }, |
| | | { title: '所属机构', field: 'agencyName', align: 'center' }, |
| | | { title: '创建人', field: 'buyerName', align: 'center' }, |
| | | { title: '所属机构', field: 'agencyName', align: 'center', width: 130 }, |
| | | { title: '创建人', field: 'buyerName', align: 'center', width: 90 }, |
| | | { |
| | | title: '操作时间', |
| | | field: 'procureTime', |
| | |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | width: 100, // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <span>物品分类:</span> |
| | | <span>{{ goodsItem.baseCategoryName }}</span> |
| | | <span>{{ goodsItem.categoryName }}</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <span>物品名称:</span> |
| | | <span>{{ goodsItem.goodsTemplateName }}</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="scrappedCode" label="报废原因" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ getDictName(scope.row.scrappedCode) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center"></el-table-column> |
| | | <el-table-column label="单位" prop="unit" align="center"></el-table-column> |
| | | <el-table-column prop="counts" label="报废数量" align="center"></el-table-column> |
| | | <el-table-column prop="scrappedName" label="报废原因" align="center"></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div id="uploadPreviewImages" style="display: none"> |
| | |
| | | states: '', |
| | | createName: '', |
| | | time: '', |
| | | scrappedGoodsInfo: [], |
| | | scrappedGoods: [], |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | <el-select v-model="scope.row.scrappedCode" placeholder="请选择"> |
| | | <el-option |
| | | v-for="item in scrapReasonOptions" |
| | | :key="item.dict_value" |
| | | :key="item.dict_code" |
| | | :label="item.dict_label" |
| | | :value="item.dict_value" |
| | | :value="item.dict_code" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | |
| | | warehouseId: [{ required: true, message: '请选择', trigger: 'change' }], |
| | | dealTime: [{ required: true, message: '请选择', trigger: 'change' }], |
| | | buyType: [{ required: true, message: '请选择', trigger: 'change' }], |
| | | |
| | | uploadFiles: [{ required: true, message: '请上传', trigger: 'change' }], |
| | | baseCategoryIds: [{ required: true, message: '请选择', trigger: 'change' }], |
| | | baseGoodsTemplateId: [{ validator: checkGoodsTemplateId, trigger: ['blur', 'change'] }], |
| | |
| | | title: '上传', |
| | | max: 20, // 最大大小,单位M |
| | | num: 10, // 支持上传图片个数 |
| | | accept: '.jpg,.png', // 限制格式 |
| | | tip: '', // 提示 默认:`只能上传${this.defaultSettings.num}个${this.defaultSettings.accept}文件,且不超过${this.defaultSettings.max}kb` |
| | | uploadUrl: getUploadUrl(), // 上传路径 |
| | | multiple: true, // 是否支持批量上传 |
| | |
| | | this.getWarehouseList(); |
| | | this.getgoodsTemplate(); |
| | | this.getgoodsModel(); |
| | | this.getCategoryTree(); |
| | | await this.getCategoryTree(); |
| | | this.formData.scrappedGoodsInfo.push(JSON.parse(JSON.stringify(this.goodsItem))); |
| | | this.formData.operatorId = this.userInfo.id; |
| | | this.formData.operatorName = this.userInfo.userName; |
| | |
| | | |
| | | // 获取报废仓库列表 |
| | | getWarehouseList() { |
| | | selectTenantWarehouse() |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) |
| | | .then((res) => { |
| | | this.warehouses = res; |
| | | if (this.warehouses.length && !this.formData.warehouseId) { |
| | |
| | | handleSubmit() { |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | console.log('this.formData', this.formData); |
| | | scrappedAdd(this.formData) |
| | | .then((res) => { |
| | | this.$message.success('保存成功!'); |
| | |
| | | <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)" |
| | |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeStart', |
| | | dataIndex: 'startTime', |
| | | label: '报废时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'incomeTimeEnd', |
| | | dataIndex: 'endTime', |
| | | label: '至', |
| | | defaultValue: '', |
| | | }, |
| | |
| | | this.list = res.datas; |
| | | this.total = res.totalRows; |
| | | this.loading = false; |
| | | console.log(this.list); |
| | | }); |
| | | }, |
| | | |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '单号', field: 'businessFormCode', align: 'left' }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: '报废数量', field: 'lv', align: 'center' }, |
| | | { title: '所属机构', field: 'agencyName', align: 'left' }, |
| | | { title: '单号', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 130 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { title: '报废数量', field: 'counts', align: 'center' }, |
| | | { title: '所属机构', field: 'agencyName', align: 'left', width: 130 }, |
| | | { title: '创建人', field: 'operatorName', align: 'left' }, |
| | | { |
| | | title: '操作时间', |
| | | field: 'dealTime', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.dealTime) }; |
| | | }, |
| | |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | width: 100, // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { 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: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: '物品名称', field: 'goodsName', align: 'left', width: 140 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { title: '数量', field: 'counts', align: 'center' }, |
| | | { title: '接受机构', field: 'inAgencyName', align: 'left', width: 130 }, |
| | | { title: '创建人', field: 'operatorName', align: 'center', width: 90 }, |
| | | { |
| | | title: '申请时间', |
| | | field: 'createTime', |
| | |
| | | return { value: row.inTime ? DateFormatter.LongToDateTime(row.inTime) : '-' }; |
| | | }, |
| | | }, |
| | | { title: '调拨机构', field: 'outAgencyName', align: 'left' }, |
| | | { title: '调拨机构', field: 'outAgencyName', align: 'left', width: 130 }, |
| | | { |
| | | title: '调拨人', |
| | | field: 'outOperatorName', |
| | | align: 'center', |
| | | width: 90, |
| | | formatter: (row) => { |
| | | return { value: row.outOperatorName || '-' }; |
| | | }, |
| | |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | width: 100, // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |