| | |
| | | // 上传路径 |
| | | ftpUrl: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | // 接口请求地址 |
| | | // apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发 |
| | | apiBaseURL: 'http://172.16.60.155:8083/lowConsum',//开发 |
| | | apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发 |
| | | // apiBaseURL: 'http://172.16.60.155:8083/lowConsum',//开发 |
| | | // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//开发 |
| | | debug: false //调试开关 true时会输出请求日志 |
| | | }; |
| | |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | placeholder: '请选择', |
| | | cascader: [ |
| | | {key: 'inWarehouseId', queryKey: 'tenantId'}, |
| | | {key: 'goodsTemplateId', queryKey: 'agencyId'} |
| | | ], |
| | | optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null}, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'inWarehouseId', |
| | | label: '部门', |
| | | placeholder: '请选择', |
| | | optionsConfig: { |
| | | url: `/pc/fin/sys/tenant/department/list/all`, |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key: 'goodsModelId', queryKey: 'goodsTemplatesId'}], |
| | |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'departmentId', |
| | | label: '部门', |
| | | placeholder: '请选择', |
| | | optionsConfig: { |
| | | url: `/pc/fin/sys/tenant/department/list/all?tenantId=${getUserDetail().tenantId}`, |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'operatorName', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | |
| | | }, |
| | | {title: '规格型号', field: 'goodsModelName', align: 'left', minWidth: 130}, |
| | | {title: '分发数量', field: 'goodsCount', align: 'center'}, |
| | | {title: '所属机构', field: 'tenantName', align: 'left', minWidth: 130}, |
| | | /*{title: '所属机构', field: 'tenantName', align: 'left', minWidth: 130},*/ |
| | | {title: '部门', field: 'departmentName', align: 'left', minWidth: 130}, |
| | | {title: '分发人', field: 'operatorName', align: 'center'}, |
| | | { |
| | |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--添加/编辑弹窗--> |
| | | <detail v-if="detailSetting.show" :setting="detailSetting" @close="detailSetting.show = false"/> |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | <!--详情--> |
| | | <detail v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false"/> |
| | | </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 detail from '@/views/departmentitem/itemret/returnNote/detail' |
| | | import detail from '../returnNote/detail'; |
| | | import * as DateFormatter from "@/utils/DateFormatter"; |
| | | import {getUserDetail} from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, MyTableV2,detail}, |
| | | name: 'index', |
| | | components: {MyButton, MyTableV2, detail}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '退回单号', |
| | | dataIndex: 'businessFormCode', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'name', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key: 'goodsModelId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + `/pc/base/goods/template/query/goodsTemplate?tenantId=${getUserDetail().tenantId}`, |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'goodsModelId', |
| | | label: '规格型号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options:[] |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | type: 'select', |
| | | dataIndex: 'departmentId', |
| | | label: '部门', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | optionsConfig: { |
| | | url: `/pc/fin/sys/tenant/department/list/all?tenantId=${getUserDetail().tenantId}`, |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'name', |
| | | label: '部门', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options:[] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'operatorName', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'startTime', |
| | | label: '时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'endTime', |
| | | label: '至', |
| | | defaultValue: '', |
| | | }, |
| | | ], |
| | | // 树数据 |
| | | treeDataList: [], |
| | | // 搜索条件 |
| | | filterFrom: { |
| | | tenantId: null, |
| | | userName: null, |
| | | userPhone: null, |
| | | status: 1 |
| | | status: 1, |
| | | }, |
| | | editSetting: { |
| | | title: '', |
| | | id: '', |
| | | orgId: '', |
| | | show: false, |
| | | }, |
| | | 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/department/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: 'businessFormCode', align: 'center', width: 130}, |
| | | {title: '物品名称', field: 'goodsName', align: 'left', minWidth: 140}, |
| | | /*{ |
| | | title: '类别', field: 'type', align: 'center', formatter: (row) => { |
| | | return {value: row.type + '类'}; |
| | | }, |
| | | },*/ |
| | | {title: '规格型号', field: 'goodsModelName', align: 'left', minWidth: 130}, |
| | | {title: '报废数量', field: 'count', align: 'center'}, |
| | | /*{title: '所属机构', field: 'tenantName', align: 'left', minWidth: 130},*/ |
| | | {title: '部门', field: 'departmentName', align: 'left', minWidth: 130}, |
| | | {title: '创建人', field: 'operatorName', align: 'center', width: 100}, |
| | | { |
| | | title: '操作时间', field: 'createTime', align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return {value: DateFormatter.LongToDateTime(row.createTime)}; |
| | | }, |
| | | }, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | width: 90, // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |
| | | type: 'info', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | this.handleDetail(row); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | total: 0, |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.title = '详情'; |
| | | this.editSetting.show = true; |
| | | 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> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <span>退回单号:</span> |
| | | <span>SL2023001</span> |
| | | <span>{{detail.businessFormCode}}</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <span>所属机构:</span> |
| | | <span>河南省邮政分公司</span> |
| | | <span>{{detail.departmentName}}</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <span>部门:</span> |
| | | <span>金融业务部</span> |
| | | <span>{{detail.departmentName}}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20" style="margin-top: 20px"> |
| | | <el-col :span="8"> |
| | | <span>退回人:</span> |
| | | <span>张爱生</span> |
| | | <span>{{detail.operatorName}}</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <span>退回时间:</span> |
| | | <span>2023-08-08 10:23:12</span> |
| | | <span>{{detail.dealTime | formatTime }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20" style="margin-top: 20px"> |
| | | <el-col class="img-row" :span="24"> |
| | | <span>报废手续:</span> |
| | | <span>退回手续:</span> |
| | | <div class="img-box" v-for="(item, index) in fileList" :key="index" @click="handlePreview(item)"> |
| | | <img class="img" :src="getUrl(item.path)" alt="" /> |
| | | </div> |
| | |
| | | </el-row> |
| | | <div class="goods-card" v-for="(goodsItem, goodsIndex) in detail.procureGoods" :key="goodsIndex"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-col :span="8"> |
| | | <span>物品分类:</span> |
| | | <span>{{ goodsItem.baseCategoryName }}</span> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="8"> |
| | | <span>物品名称:</span> |
| | | <span>{{ goodsItem.goodsTemplateName }}</span> |
| | | <span>{{ goodsItem.baseGoodsTemplateName }}</span> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="4"> |
| | | <span>物品类别:</span> |
| | | <span>{{ goodsItem.supplier }}</span> |
| | | <span>{{ goodsItem.modelName }}</span> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="4"> |
| | | <span>分发单号:</span> |
| | | <span>{{ goodsItem.supplier }}</span> |
| | | <span>{{ goodsItem.businessFormCode }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <div> |
| | | <el-table :data="goodsItem.models" :stripe="true" style="margin-top: 20px"> |
| | | <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center"> |
| | | <div v-for="(mItem, mIndex) in goodsItem.models" :key="mIndex"> |
| | | <el-row :gutter="24" type="flex" align="middle" style="height: 50px"> |
| | | <el-col :span="8"> |
| | | <span>规格型号:</span> |
| | | <span>{{ mItem[0].modelName }}</span> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <span>单位:</span> |
| | | <span>{{ mItem[0].unit }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="mItem" :stripe="true" style="margin-top: 20px"> |
| | | <el-table-column prop="baseGoodsModelsName" label="规格型号" align="center" v-if="!mItem[0].nowUserName"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.baseGoodsModelsName }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="单位" align="center"> |
| | | <el-table-column label="单位" align="center" v-if="!mItem[0].nowUserName"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.unit }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="使用人" align="center" v-if="goodsItem.type===1"> |
| | | <el-table-column label="使用人" align="center" v-if="mItem[0].nowUserName"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.unit }} |
| | | {{ scope.row.nowUserName }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="退回数量" align="center"> |
| | |
| | | {{ scope.row.counts }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="counts" label="再用数量" align="center"> |
| | | <el-table-column prop="counts" label="在用数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.counts }} |
| | | {{ scope.row.userUseCount }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <template> |
| | | <win-md class="stock-edit" title="物品退回" @close="close" :width="'800px'"> |
| | | <win-md class="stock-edit" title="物品退回" @close="close" width="900px" :loading="loading"> |
| | | <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 label="部门" prop="departmentId"> |
| | | <el-select ref="department" v-model="formData.departmentId" clearable placeholder="请选择" |
| | | style="width: 100%"> |
| | | <el-option v-for="item in departmentOptions" :key="item.id" :label="item.name" :value="item.id" |
| | | clearable/> |
| | | </el-select> |
| | | </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 label="退回人" prop="operatorName"> |
| | | <el-input v-model="formData.operatorName" 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%" |
| | | 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-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item |
| | | label="物品分类" |
| | | :prop="`goods[${goodsIndex}].baseCategoryIds`" |
| | | :rules="{ |
| | | label="物品分类" |
| | | :prop="`goods.${goodsIndex}.baseCategoryId`" |
| | | :rules="{ |
| | | required: true, |
| | | message: '请选择', |
| | | message: '请选择物品分类', |
| | | trigger: 'change', |
| | | }" |
| | | > |
| | | <el-cascader |
| | | v-model="goodsItem.baseCategoryIds" |
| | | :options="categoryOptions" |
| | | :props="{ value: 'id' }" |
| | | @change="categoryChange($event, goodsIndex)" |
| | | style="width: 100%" |
| | | v-model="goodsItem.baseCategoryId" |
| | | :options="categoryOptions" |
| | | :props="{ value: 'id',emitPath: false }" |
| | | :show-all-levels="false" |
| | | filterable |
| | | clearable |
| | | @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" |
| | | 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)" |
| | | v-model="goodsItem.baseGoodsTemplateId" |
| | | :placeholder="goodsItem.baseCategoryId?'请选择物品':'请先选择物品分类'" |
| | | filterable |
| | | clearable |
| | | :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" |
| | | 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> |
| | | <el-form-item |
| | | label="选择分发单" |
| | | :prop="`goods.${goodsIndex}.businessFormCode`" |
| | | :rules="rules.businessFormCode"> |
| | | <div @click="showFenFa(goodsIndex)"> |
| | | <el-input |
| | | placeholder="请选择分发单" |
| | | readonly |
| | | v-model="goodsItem.businessFormCode" |
| | | :placeholder="goodsItem.baseGoodsTemplateId?'请选择分发单':'请先选择物品'" |
| | | :disabled="!goodsItem.baseGoodsTemplateId" |
| | | suffix-icon="el-icon-arrow-down" |
| | | class="cursor-p"></el-input> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div 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-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="baseGoodsModelsId" style="margin-bottom: 0"> |
| | | {{ getGoodsModelsName(mItem.baseGoodsModelsId) }} |
| | | {{ mItem[0].modelName }} |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="单位:" prop="baseGoodsModelsId" style="margin-bottom: 0" label-width="80"> |
| | | 50 |
| | | {{ mItem[0].unit }} |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="物品类别:" prop="baseGoodsModelsId" style="margin-bottom: 0" label-width="80"> |
| | | A类 |
| | | {{ mItem[0].classification }} |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="mItem.models" :stripe="true"> |
| | | <el-table :data="mItem" :stripe="true"> |
| | | <!-- A类商品显示 --> |
| | | <el-table-column prop="price" label="使用人" align="center" v-if="goodsItem.models.type===1"> |
| | | <el-table-column width="100" prop="price" label="使用人" align="center" v-if="mItem[0].nowUserName"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.worehouseCount }} |
| | | {{ scope.row.nowUserName }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="分发数量" align="center"> |
| | | <el-table-column width="100" prop="price" label="分发数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.worehouseCount }} |
| | | {{ scope.row.goodsNum }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="可退数量" align="center"> |
| | | <el-table-column width="100" prop="price" label="可退数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.worehouseCount }} |
| | | {{ scope.row.userUseCount }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="counts" label="退回数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | <template slot-scope="{row,$index}"> |
| | | <el-form-item |
| | | label-width="0" |
| | | style="margin-bottom: 0" |
| | | :prop="`goods[${goodsIndex}].models[${scope.$index}].counts`" |
| | | :rules="rules.counts" |
| | | label-width="0" |
| | | :prop="`goods.${goodsIndex}.models.${mIndex}.counts`" |
| | | :rules="[ |
| | | {validator: checkCounts,counts:row.counts,userUseCount: row.userUseCount, trigger: ['blur', 'change']} |
| | | ]" |
| | | > |
| | | <el-input |
| | | type="number" |
| | | v-model="scope.row.counts" |
| | | @change="countsChange($event, goodsIndex, scope.$index)" |
| | | type="number" |
| | | v-model.number="row.counts" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | </div> |
| | | <div class="btn-group"> |
| | | <el-button |
| | | v-if="formData.goods.length > 1" |
| | | name="移除" |
| | | type="danger" |
| | | plain |
| | | size="mini" |
| | | @click="removeGoods(goodsIndex)" |
| | | >移除</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 |
| | | 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" /> |
| | | <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> |
| | | <win-md v-if="fenfaSetting.show" title="选择分发单" @close="fenfaSetting.show=false" :width="'800px'"> |
| | | <el-table @current-change="handleCurrentChange" :data="fenfaData" highlight-current-row height="407"> |
| | | <el-table-column label="分发单号" prop="businessFormCode" align="left"></el-table-column> |
| | | <el-table-column label="物品名称" prop="baseGoodsTemplateName" align="left"></el-table-column> |
| | | <el-table-column label="分发数量" prop="totalCount" align="center"></el-table-column> |
| | | <el-table-column label="剩余数量" prop="useCount" align="center"></el-table-column> |
| | | <el-table-column label="分发时间" prop="inTime" width="160" align="center"> |
| | | <template slot-scope="{row}"> |
| | | {{ DateFormatter.LongToDateTime(row.inTime) }} |
| | | </template> |
| | | </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" /> |
| | | <my-button name="取消" site="form" |
| | | @click="fenfaSetting.show=false;fenfaSetting.baseGoodsTemplateId=null;curFenfa=null;fenfaData=[]"/> |
| | | <el-button @click="handleConfirm" type="primary" size="medium">确定</el-button> |
| | | </div> |
| | | </win-sm> |
| | | </div> |
| | | </win-md> |
| | | </win-md> |
| | | </template> |
| | | <script> |
| | | import {goodsTemplate, selectTenantWarehouse,} from '@/api/baseSetting/finsystenant'; |
| | | import {departmentListAll} from '@/api/system/deptment'; |
| | | import {goodsTemplate} from '@/api/baseSetting/finsystenant'; |
| | | import {outputAdd} from '@/api/stock/accessStock'; |
| | | import {getTree} from '@/api/foudation/classification'; |
| | | import MyButton from '@/components/myButton/myButton'; |
| | |
| | | import upload from '@/components/upload/index'; |
| | | import {getUploadUrl} from '@/utils/base'; |
| | | import {mapGetters} from 'vuex'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | import {getFfOrderByGoodsIdAndDept, getGoodsUseInfoByFfOrderAndGoodId} from "@/api/deptGoods/scrap"; |
| | | import {getDicts} from "@/api/system/dict/data"; |
| | | |
| | | export default { |
| | | components: { MyButton, winMd, winSm, upload }, |
| | | components: {MyButton, winMd, winSm, upload}, |
| | | props: { |
| | | setting: { |
| | | type: Object, |
| | | default: () => {}, |
| | | default: () => { |
| | | }, |
| | | }, |
| | | }, |
| | | data() { |
| | | // 自定义校验 |
| | | // 物品重复校验 |
| | | var checkGoodsTemplateId = (rule, value, callback) => { |
| | | var checkBusinessFormCode = (rule, value, callback) => { |
| | | if (!value) { |
| | | return callback(new Error('请选择')); |
| | | } |
| | | let temp = this.formData.goods.filter((v) => v.baseGoodsTemplateId == value); |
| | | let temp = this.formData.goods.filter((v) => v.businessFormCode == value); |
| | | if (!temp || temp.length != 1) { |
| | | return callback(new Error('已选过此物品')); |
| | | return callback(new Error('已选过此分发单')); |
| | | } |
| | | callback(); |
| | | }; |
| | | return { |
| | | loading: false, |
| | | warehouseOptions: [], // 退回仓库列表 |
| | | checkCounts: (rule, value, callback) => { |
| | | if (!rule.counts) { |
| | | return callback(new Error('请输入退回数量')); |
| | | } |
| | | if (!Number.isInteger(rule.counts)) { |
| | | // this.$message.warning('请输入数字值'); |
| | | return callback(new Error('请输入数字值')); |
| | | } |
| | | if (rule.counts < 1) { |
| | | // this.$message.warning('数字值不能为0'); |
| | | return callback(new Error('数字值必须大于0')); |
| | | } |
| | | if (rule.counts > rule.userUseCount) { |
| | | // this.$message.warning('分发数量不能大于剩余数量'); |
| | | return callback(new Error('退回数量不能大于在用数量')); |
| | | } |
| | | callback(); |
| | | }, |
| | | DateFormatter: DateFormatter, |
| | | loading: true, |
| | | departmentOptions: [], // 部门列表 |
| | | categoryOptions: [], // 物品分类列表 |
| | | modelList: [], //型号列表 |
| | | fenfaSetting: { |
| | | show: false, |
| | | goodsIdx: null, |
| | | baseGoodsTemplateId: null, |
| | | id: '', |
| | | }, |
| | | fenfaData:[], |
| | | curFenfa: null, |
| | | fenfaData: [], |
| | | formData: { |
| | | warehouseId: '', // 退回仓库id |
| | | departmentId: '', // 退回部门id |
| | | dealTime: '', // 退回时间 |
| | | procureDoc: '', |
| | | goods: [], |
| | | }, |
| | | goodsItem: { |
| | | baseCategoryIds: '', // 分类编号数组 |
| | | businessFormCode: '', // 分发单id |
| | | transBusinessId: '', // 分发单id |
| | | baseCategoryId: '', // 分类编号 |
| | | baseGoodsTemplateId: '', // 物品模版编号 |
| | | goodsTemplateName: '', // 物品模版名称 |
| | | goodsOptions: [], // 物品列表select |
| | | modelsOptions: [], //规格型号select |
| | | models: [], // 物品名称 |
| | | modelsIds: [], //规格型号 |
| | | }, |
| | | modelsItem: { |
| | | baseGoodsModelsId: '', // 规格型号编号 |
| | |
| | | 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' }], |
| | | departmentId: [{required: true, message: '请选择部门', trigger: 'change'}], |
| | | dealTime: [{required: true, message: '请选择', trigger: 'change'}], |
| | | procureDoc: [{required: true, message: '请上传', trigger: 'change'}], |
| | | baseCategoryId: [{required: true, message: '请选择', trigger: 'change'}], |
| | | baseGoodsTemplateId: [{ |
| | | required: true, |
| | | message: '请选择物品', |
| | | trigger: 'change' |
| | | }], |
| | | businessFormCode: [{ |
| | | required: true, |
| | | message: '请选择分发单', |
| | | trigger: 'change' |
| | | }, {validator: checkBusinessFormCode, trigger: ['blur', 'change']}], |
| | | counts: [{required: true, message: '请输入', trigger: 'change'}], |
| | | reason: [{required: true, message: '请选择', trigger: 'change'}], |
| | | }, |
| | | |
| | | uploadSettings: { |
| | |
| | | }, |
| | | methods: { |
| | | async init() { |
| | | this.getWarehouseList(); |
| | | this.getgoodsTemplate(); |
| | | // 获取物品分类列表 |
| | | await this.getdeptmentList(); |
| | | const treeRes = await getTree(); |
| | | this.categoryOptions = this.removeEmptyChildren(treeRes); |
| | | this.formData.departmentName = this.userInfo.sysDeptName; |
| | | this.formData.createName = this.userInfo.userName; |
| | | this.getgoodsTemplate(); |
| | | // 获取物品分类列表 |
| | | this.formData.departmentId = this.userInfo.sysDeptId; |
| | | this.formData.operatorName = this.userInfo.userName; |
| | | this.loading = false |
| | | }, |
| | | |
| | | // 获取退回仓库列表 |
| | | getWarehouseList() { |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }) |
| | | .then((res) => { |
| | | this.warehouseOptions = res; |
| | | if (res.length) { |
| | | // 获取部门列表 |
| | | async getdeptmentList() { |
| | | await departmentListAll({tenantId: this.userInfo.tenantId}) |
| | | .then((res) => { |
| | | this.departmentOptions = res; |
| | | 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); |
| | | }); |
| | | }) |
| | | .catch((err) => { |
| | | console.log('err', err); |
| | | }); |
| | | }, |
| | | |
| | | removeEmptyChildren(arr) { |
| | |
| | | |
| | | // 获取物品名称列表 |
| | | getgoodsTemplate(id, index) { |
| | | goodsTemplate({ categoryId: id || '' }).then((res) => { |
| | | goodsTemplate({categoryId: id || ''}).then((res) => { |
| | | if (index || index == 0) { |
| | | this.$set(this.formData.goods[index], 'goodsOptions', res); |
| | | } else { |
| | |
| | | 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); |
| | | this.getgoodsTemplate(e, 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); |
| | | }, |
| | | |
| | | }, |
| | | showFenFa(index) { |
| | | this.loading = true |
| | | getFfOrderByGoodsIdAndDept({ |
| | | departmentId: this.formData.departmentId, |
| | | baseGoodsTemplateId: this.formData.goods[index].baseGoodsTemplateId |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (!res || res.length === 0) { |
| | | this.$message.error('未查询到分发单'); |
| | | return |
| | | } |
| | | this.fenfaSetting.show = true |
| | | this.fenfaSetting.baseGoodsTemplateId = this.formData.goods[index].baseGoodsTemplateId |
| | | this.fenfaSetting.goodsIdx = index |
| | | this.fenfaData = res |
| | | }).catch((err) => { |
| | | this.loading = false |
| | | }); |
| | | }, |
| | | // 上传 |
| | | uploadChange() { |
| | | let arr = this.$refs.uploadRef.fileList; |
| | |
| | | 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; |
| | | } |
| | | handleCurrentChange(e) { |
| | | this.curFenfa = e |
| | | }, |
| | | |
| | | handleConfirm(){ |
| | | |
| | | handleConfirm() { |
| | | if (!this.curFenfa) { |
| | | this.$message.error('请选择分发单'); |
| | | return |
| | | } |
| | | getGoodsUseInfoByFfOrderAndGoodId({ |
| | | transBusinessId: this.curFenfa.transBusinessId, |
| | | baseGoodsTemplateId: this.fenfaSetting.baseGoodsTemplateId |
| | | }).then(res => { |
| | | if (res) { |
| | | let arr = [] |
| | | for (let resKey in res) { |
| | | const item = res[resKey] |
| | | item.map(t => { |
| | | t.counts = null |
| | | }) |
| | | arr.push(item) |
| | | } |
| | | this.formData.goods[this.fenfaSetting.goodsIdx].models = arr |
| | | this.formData.goods[this.fenfaSetting.goodsIdx].businessFormCode = this.curFenfa.businessFormCode |
| | | this.formData.goods[this.fenfaSetting.goodsIdx].transBusinessId = this.curFenfa.transBusinessId |
| | | } |
| | | this.fenfaSetting.show = false |
| | | }) |
| | | }, |
| | | |
| | | // 提交 |
| | | 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'); |
| | | let params = JSON.parse(JSON.stringify(this.formData)) |
| | | params.goods.map((g,gid)=>{ |
| | | delete g.goodsOptions |
| | | let arr=[] |
| | | g.models.map(m=>{ |
| | | arr=arr.concat(m) |
| | | }) |
| | | .catch((err) => { |
| | | console.log('edit err', err); |
| | | this.$message.error('保存失败'); |
| | | }); |
| | | g.models = arr |
| | | }) |
| | | console.log('params', params); |
| | | return |
| | | 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: '', // 退回时间 |
| | | warehouseId: '', // 报废仓库id |
| | | dealTime: '', // 报废时间 |
| | | goods: [], |
| | | }; |
| | | this.$emit('close'); |
| | |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | @import url(../../../../styles/store.scss); |
| | | |
| | | .cursor-p { |
| | | ::v-deep { |
| | | .el-input__inner { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .card3 { |
| | | border-radius: 2px; |
| | | background: #ffffff; |
| | |
| | | </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.departmentName }}</div> |
| | | <div class="box"><span class="span-two">操作人:</span>{{ item.operatorName }}</div> |
| | | <div class="box"> |
| | | <span class="span-two">退回时间:</span>{{ item.dealTime | formatTime }} |
| | |
| | | import edit from './edit'; |
| | | import detail from './detail'; |
| | | import listPage from '@/views/mixins/listPage' |
| | | import {getUserDetail} from "@/utils/auth"; |
| | | import SettingIplatform from "@/utils/settingIplatform"; |
| | | |
| | | export default { |
| | | name: 'index', |
| | |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goodsName', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | type: 'select', |
| | | dataIndex: 'inAgencyId', |
| | | label: '分发部门', |
| | | placeholder: '请选择', |
| | | optionsConfig: { |
| | | url: `/pc/fin/sys/tenant/department/list/all?tenantId=${getUserDetail().tenantId}`, |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + `/pc/base/goods/template/query/goodsTemplate?tenantId=${getUserDetail().tenantId}`, |
| | | }, |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | |
| | | this.total = res.totalRows; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | fifterForm(params) { |
| | | 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); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/> |
| | | </el-col> |
| | | </el-row> |
| | | <!--详情--> |
| | | <detail v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false"/> |
| | | <!--添加/编辑弹窗--> |
| | | <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 detail from '@/views/departmentitem/itemscr/scrapping/detail' |
| | | import myImport from '@/views/components/myImport' |
| | | import {getBaseUrl} from '@/utils/base'; |
| | | import detail from '../scrapping/detail'; |
| | | import * as DateFormatter from "@/utils/DateFormatter"; |
| | | import {getUserDetail} from "@/utils/auth"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | components: {MyButton, MyTableV2, detail, myImport}, |
| | | name: 'index', |
| | | components: {MyButton, MyTableV2, detail}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | | items: [ |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'businessFormCode', |
| | | label: '单号', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | label: '物品名称', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'name', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key: 'goodsModelId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + `/pc/base/goods/template/query/goodsTemplate?tenantId=${getUserDetail().tenantId}`, |
| | | }, |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'goodsModelId', |
| | | label: '规格型号', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options:[] |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'modelName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | dataIndex: 'agencyId', |
| | | label: '机构', |
| | | type: 'select', |
| | | dataIndex: 'departmentId', |
| | | label: '部门', |
| | | placeholder: '请选择', |
| | | optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null }, |
| | | optionsConfig: { |
| | | url: `/pc/fin/sys/tenant/department/list/all?tenantId=${getUserDetail().tenantId}`, |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | defaultValue: '', |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'name', |
| | | label: '部门', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options:[] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'name', |
| | | dataIndex: 'operatorName', |
| | | label: '创建人', |
| | | placeholder: '请输入', |
| | | defaultValue: '' |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'startTime', |
| | | label: '时间', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | | dataIndex: 'endTime', |
| | | 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: '', |
| | |
| | | table: { |
| | | showIndex: true, // 是否显示序号 |
| | | expand: false, // 是否显示详情数据 |
| | | url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 请求地址 |
| | | url: SettingIplatform.apiBaseURL + '/pc/l/wh/form/transfer/department/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: 'businessFormCode', align: 'center', width: 130}, |
| | | {title: '物品名称', field: 'goodsName', align: 'left', minWidth: 140}, |
| | | /*{ |
| | | title: '类别', field: 'type', align: 'center', formatter: (row) => { |
| | | return {value: row.type + '类'}; |
| | | }, |
| | | },*/ |
| | | {title: '规格型号', field: 'goodsModelName', align: 'left', minWidth: 130}, |
| | | {title: '报废数量', field: 'count', align: 'center'}, |
| | | /*{title: '所属机构', field: 'tenantName', align: 'left', minWidth: 130},*/ |
| | | {title: '部门', field: 'departmentName', align: 'left', minWidth: 130}, |
| | | {title: '创建人', field: 'operatorName', align: 'center', width: 100}, |
| | | { |
| | | title: '操作时间', field: 'createTime', align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return {value: DateFormatter.LongToDateTime(row.createTime)}; |
| | | }, |
| | | }, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | | show: true, // 显示操作列 |
| | | width: '150', // 列宽 |
| | | width: 90, // 列宽 |
| | | attr: [ |
| | | { |
| | | title: '详情', |
| | | type: 'info', |
| | | events: (row) => { |
| | | this.showAudit(row); |
| | | this.handleDetail(row); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | small: false, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | total: 0, |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | // 获取机构树 |
| | | this.initTreeData() |
| | | }, |
| | | methods: { |
| | | showAudit(row) { |
| | | this.editSetting.id = row.id; |
| | | this.editSetting.title = '详情'; |
| | | this.editSetting.show = true; |
| | | 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> |
| | |
| | | </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.departmentName }}</div> |
| | | <div class="box"><span class="span-two">操作人:</span>{{ item.operatorName }}</div> |
| | | <div class="box"> |
| | | <span class="span-two">报废时间:</span>{{ item.dealTime | formatTime }} |
| | |
| | | import edit from './edit'; |
| | | import detail from './detail'; |
| | | import listPage from '@/views/mixins/listPage' |
| | | import {getUserDetail} from "@/utils/auth"; |
| | | import SettingIplatform from "@/utils/settingIplatform"; |
| | | |
| | | export default { |
| | | name: 'index', |
| | |
| | | }, |
| | | { |
| | | type: 'select', |
| | | dataIndex: 'businessFormCode', |
| | | dataIndex: 'inAgencyId', |
| | | label: '分发部门', |
| | | placeholder: '请输入', |
| | | placeholder: '请选择', |
| | | optionsConfig: { |
| | | url: `/pc/fin/sys/tenant/department/list/all?tenantId=${getUserDetail().tenantId}`, |
| | | label: 'name', |
| | | value: 'id', |
| | | }, |
| | | defaultValue: '', |
| | | options:[] |
| | | options: [], |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'goodsName', |
| | | type: 'select', |
| | | dataIndex: 'goodsTemplateId', |
| | | label: '物品名称', |
| | | placeholder: '可模糊搜索', |
| | | defaultValue: '', |
| | | }, |
| | | { |
| | | type: 'text', |
| | | dataIndex: 'createName', |
| | | label: '报废人', |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + `/pc/base/goods/template/query/goodsTemplate?tenantId=${getUserDetail().tenantId}`, |
| | | }, |
| | | }, |
| | | { |
| | | type: 'date-picker', |
| | |
| | | this.total = res.totalRows; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | fifterForm(params) { |
| | | 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); |
| | | }, |
| | | }, |
| | | }; |