| | |
| | | <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 v-loading="loading" ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px"> |
| | | <el-form-item label="盘点单名" prop="businessFormName"> |
| | | <el-input |
| | | v-model="formData.businessFormName" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | loading:true, |
| | | count: 0, |
| | | loading: true, |
| | | checkAll: false, |
| | | checkedList: [], |
| | | warehouseOptions: [], // 仓库列表 |
| | | operatorOptions: [], |
| | | operatorOptions2: [], |
| | | formData: {}, |
| | | formData: { |
| | | businessFormName: '', |
| | | warehouseId: '', |
| | | operatorUserId: '', |
| | | monitorUserId: '', |
| | | remark: '', |
| | | }, |
| | | rules: { |
| | | businessFormName: [{ required: true, message: '请输入', trigger: 'blur' }], |
| | | warehouseId: [{ required: true, message: '请选择', trigger: 'blur' }], |
| | |
| | | // 获取仓库列表 |
| | | handleSelectTenantWarehouse() { |
| | | selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.warehouseOptions = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | // 获取盘点人 |
| | | getPdr() { |
| | | warehouseManagerList({ tenantId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.operatorOptions = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | // 获取监盘人 |
| | | getJpr() { |
| | | tenantUserQueryUser({ tenantId: this.userInfo.tenantId }).then((res) => { |
| | | this.count++ |
| | | this.operatorOptions2 = res; |
| | | if(this.count>1){ |
| | | this.loading = false |
| | | } |
| | | }); |
| | | }, |
| | | getEditInfo(id) {}, |
| | |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | const params = Object.assign({}, this.formData); |
| | | this.loading = true |
| | | if (this.setting.id) { |
| | | // 编辑接口 |
| | | inventoryEdit(params).then((res) => { |
| | | this.loading = false |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } else { |
| | | inventoryAdd(params).then((res) => { |
| | | this.loading = false |
| | | this.$message.success('保存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } |
| | | } else { |
| | |
| | | <template> |
| | | <win-md :title="setting.title" @close="close" :width="'1200px'"> |
| | | <el-form class="form" ref="ruleForm" :model="formData" :rules="rules"> |
| | | <el-form v-loading="loading" class="form" ref="ruleForm" :model="formData" :rules="rules"> |
| | | <el-row :gutter="20" style="margin-bottom: 20px" type="flex" align="middle"> |
| | | <el-col :span="6">盘点单号:{{ formData.businessFormCode }}</el-col> |
| | | <el-col :span="6">盘点任务:{{ formData.businessFormName }}</el-col> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="formData.formInventoryGoodsList" |
| | | :rules="rules" |
| | | height="500" |
| | |
| | | <el-table-column prop="realNum" label="实盘数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-form-item |
| | | style="margin-bottom: 0" |
| | | label-width="0" |
| | | :prop="`formInventoryGoodsList[${scope.$index}].realNum`" |
| | | :rules="rules.realNum" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | loading: true, |
| | | btnLoading: false, |
| | | formData: { |
| | | businessFormCode: '', |
| | |
| | | }, |
| | | created() { |
| | | const info = JSON.parse(this.setting.info); |
| | | console.log('info', info); |
| | | if (info.states == 1) { |
| | | // 继续盘点 |
| | | inventoryDetail({ id: this.setting.id }).then((res) => { |
| | | this.loading = false |
| | | this.formData = res; |
| | | this.formData.id = this.setting.id; |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } else { |
| | | inventoryQuery({ id: this.setting.id }).then((res) => { |
| | | this.loading = false |
| | | this.formData = res; |
| | | this.formData.id = this.setting.id; |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } |
| | | }, |
| | |
| | | id: this.formData.id, |
| | | inventoryGoodsList: this.formData.formInventoryGoodsList, |
| | | }; |
| | | this.loading = true |
| | | inventoryTemporaryStorage(params).then(() => { |
| | | this.loading = false |
| | | this.$message.success('暂存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | }, |
| | | save() { |
| | |
| | | ...this.formData, |
| | | inventoryGoodsList: this.formData.formInventoryGoodsList, |
| | | }; |
| | | this.loading = true |
| | | inventoryFinish(params).then(() => { |
| | | this.$message.success('暂存成功!'); |
| | | this.close(); |
| | | this.$emit('search'); |
| | | }).catch(()=>{ |
| | | this.loading = false |
| | | }); |
| | | } |
| | | }); |
| | |
| | | <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 MyButton from '@/components/myButton/myButton'; |
| | | import SettingIplatform from '@/utils/settingIplatform'; |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant'; |
| | | import { goodsModel, getCategorySelectTree } from '@/api/baseSetting/finsystenant'; |
| | | import { getDicts } from '@/api/system/dict/data'; |
| | | import {goodsModel, getCategorySelectTree} from '@/api/baseSetting/finsystenant'; |
| | | import {getDicts} from '@/api/system/dict/data'; |
| | | import * as DateFormatter from '@/utils/DateFormatter'; |
| | | |
| | | export default { |
| | | name: 'index', |
| | | components: { MyButton, MyTableV2 }, |
| | | components: {MyButton, MyTableV2}, |
| | | data() { |
| | | return { |
| | | // 搜索框 |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'label', |
| | | value: 'id', |
| | | url: SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', |
| | | props:{checkStrictly:false} |
| | | props: {checkStrictly: false} |
| | | }, |
| | | }, |
| | | { |
| | |
| | | placeholder: '请输入', |
| | | defaultValue: '', |
| | | options: [], |
| | | cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}], |
| | | cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}], |
| | | optionsConfig: { |
| | | label: 'goodsName', |
| | | value: 'id', |
| | |
| | | placeholder: '请选择', |
| | | defaultValue: '', |
| | | options: [{ |
| | | label:'A', |
| | | value:'1' |
| | | },{ |
| | | label:'B', |
| | | value:'2' |
| | | },{ |
| | | label:'C', |
| | | value:'3' |
| | | label: 'A', |
| | | value: '1' |
| | | }, { |
| | | label: 'B', |
| | | value: '2' |
| | | }, { |
| | | label: 'C', |
| | | value: '3' |
| | | }], |
| | | }, |
| | | ], |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '物品名称', field: 'baseGoodsTemplateName', align: 'left' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: '单位', field: 'unit', align: 'center' }, |
| | | { title: '当前库存', field: 'warehouseCount', align: 'center' }, |
| | | { title: '保底库存', field: 'lowerLimit', align: 'left' }, |
| | | { title: '封顶库存', field: 'upperLimit', align: 'left' }, |
| | | {title: '物品名称', field: 'baseGoodsTemplateName', align: 'left', minWidth: 140}, |
| | | {title: '规格型号', field: 'baseGoodsModelsName', align: 'left', minWidth: 130}, |
| | | {title: '单位', field: 'unit', align: 'center', width: 80}, |
| | | {title: '当前库存', field: 'warehouseCount', align: 'center', width: 130}, |
| | | {title: '保底库存', field: 'lowerLimit', align: 'center', width: 130}, |
| | | {title: '封顶库存', field: 'upperLimit', align: 'center', width: 130}, |
| | | { |
| | | title: '状态', |
| | | field: 'warningType', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 90, |
| | | formatter: (row) => { |
| | | return { |
| | | type: row.warningType == 1 ? 'warning' : 'danger', |
| | |
| | | { |
| | | title: '预警时间', |
| | | field: 'warningTime', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.warningTime) }; |
| | | return {value: DateFormatter.LongToDateTime(row.warningTime)}; |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | this.$modal |
| | | .confirm('是否确认删除名称为"' + row.name + '"的机构吗?') |
| | | .then(function () { |
| | | finsystenant.del({ id: row.id }).then((res) => {}); |
| | | finsystenant.del({id: row.id}).then((res) => { |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | this.$message.success('删除成功!'); |
| | | this.search(); |
| | | }) |
| | | .catch(() => {}); |
| | | .catch(() => { |
| | | }); |
| | | }, |
| | | // 查询table列表 |
| | | search(pageNum) { |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '机构', field: 'agencyName', align: 'left' }, |
| | | { title: '仓库', field: 'warehouseName', align: 'center' }, |
| | | { title: '分类', field: 'categoryName', align: 'center' }, |
| | | { title: '所属类别', field: 'costType', align: 'center' }, |
| | | { title: '物品名称', field: 'goodsName', align: 'left' }, |
| | | { title: '规格型号', field: 'modelName', align: 'left' }, |
| | | { title: '保底库存', field: 'lowerLimit', align: 'left' }, |
| | | { title: '封顶库存', field: 'upperLimit', align: 'left' }, |
| | | { title: '机构', field: 'agencyName', align: 'left', minWidth: 130 }, |
| | | { title: '仓库', field: 'warehouseName', align: 'left', minWidth: 130 }, |
| | | { title: '分类', field: 'categoryName', align: 'left', minWidth: 130 }, |
| | | { title: '所属类别', field: 'costType', align: 'center', width: 80 }, |
| | | { title: '物品名称', field: 'goodsName', align: 'left', minWidth: 130 }, |
| | | { title: '规格型号', field: 'modelName', align: 'left', minWidth: 130 }, |
| | | { title: '保底库存', field: 'lowerLimit', align: 'center', width: 100 }, |
| | | { title: '封顶库存', field: 'upperLimit', align: 'center', width: 100 }, |
| | | ], |
| | | // 操作信息 |
| | | operation: { |
| | |
| | | </el-card> |
| | | </el-container> |
| | | </el-container> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '机构', field: 'agencyName', align: 'center' }, |
| | | { title: '仓库', field: 'warehouseName', align: 'center' }, |
| | | { title: '分类', field: 'categoryName', align: 'center' }, |
| | | { title: '所属类别', field: 'costType', align: 'center' }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left' }, |
| | | { title: '单位', field: 'unit', align: 'left' }, |
| | | { title: '当前库存', field: 'kucun', align: 'left' }, |
| | | { title: '机构', field: 'agencyName', align: 'left', minWidth: 130 }, |
| | | { title: '仓库', field: 'warehouseName', align: 'left', minWidth: 130 }, |
| | | { title: '分类', field: 'categoryName', align: 'left', minWidth: 130 }, |
| | | { title: '所属类别', field: 'costType', align: 'center', width:80 }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 140 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', minWidth: 130 }, |
| | | { title: '单位', field: 'unit', align: 'center', width:80 }, |
| | | { title: '当前库存', field: 'kucun', align: 'center' }, |
| | | ], |
| | | paging: { |
| | | show: true, // 显示分页 |
| | |
| | | }, |
| | | // 列信息 |
| | | columns: [ |
| | | { title: '机构', field: 'agencyName', align: 'left' }, |
| | | { title: '仓库', field: 'warehouseName', align: 'center' }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'center' }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'center' }, |
| | | { title: '机构', field: 'agencyName', align: 'left', width: 130 }, |
| | | { title: '仓库', field: 'warehouseName', align: 'left', width: 130 }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 130 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { |
| | | title: '类型', |
| | | field: 'summary', |
| | | align: 'left', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | let result = stockType(row) |
| | | return { value: result }; |
| | | }, |
| | | }, |
| | | { title: '单号', field: 'businessFormCode', align: 'left' }, |
| | | { title: '数量', field: 'thisCount', align: 'left' }, |
| | | { title: '操作前数量', field: 'initialCount', align: 'left' }, |
| | | { title: '操作后数量', field: 'endCount', align: 'left' }, |
| | | { title: '在途', field: 'zaiTuCount', align: 'left' }, |
| | | { title: '单号', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: '数量', field: 'thisCount', align: 'center', width: 100 }, |
| | | { title: '操作前数量', field: 'initialCount', align: 'center', width: 100 }, |
| | | { title: '操作后数量', field: 'endCount', align: 'center', width: 100 }, |
| | | { title: '在途', field: 'zaiTuCount', align: 'center', width: 100 }, |
| | | { |
| | | title: '操作时间', |
| | | field: 'dealTime', |
| | | align: 'left', |
| | | align: 'center', |
| | | width: 160, |
| | | formatter: (row) => { |
| | | return { value: DateFormatter.LongToDateTime(row.dealTime) }; |
| | | }, |
| | |
| | | <my-button name="新增" @click="handleAdd" site="tools" size="medium" /> |
| | | <my-button name="导入" @click="importSetting.dialogShow = true" site="tools" size="medium" /> |
| | | </div> |
| | | <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 class="states" :class="item.states == 1 ? '' : 'states-success'"> |
| | | {{ item.states == 1 ? '待入库' : '已入库' }} |
| | | <div v-loading="loading" style="margin-bottom: 15px"> |
| | | <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 360}px` }"> |
| | | <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 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="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 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.procureTime | formatTime }} |
| | | </div> |
| | | <div class="box"> |
| | | <span class="span-two">入库时间:</span>{{ item.incomeTime | formatTime }} |
| | | </div> |
| | | </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.procureTime | formatTime }} |
| | | </div> |
| | | <div class="box"> |
| | | <span class="span-two">入库时间:</span>{{ item.incomeTime | formatTime }} |
| | | </div> |
| | | </div> |
| | | <div class="card-end"> |
| | | <div v-for="(just, index) in item.fromProcureTemplateInfoList" :key="index" class="item"> |
| | | <div class="name">{{ just.goodsTemplateName }}</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 class="card-end"> |
| | | <div v-for="(just, index) in item.fromProcureTemplateInfoList" :key="index" class="item"> |
| | | <div class="name">{{ just.goodsTemplateName }}</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> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="no-data" v-else>暂无数据</div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="no-data" v-else>暂无数据</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-pagination |
| | | :small="false" |
| | | :current-page="pageNum" |
| | |
| | | this.list = res.datas; |
| | | this.total = res.totalRows; |
| | | this.loading = false; |
| | | console.log(this.list); |
| | | }); |
| | | }, |
| | | |
| | |
| | | columns: [ |
| | | { title: '单号', field: 'businessFormCode', align: 'center', width: 130 }, |
| | | { title: '物品名称', field: 'goodsTemplateName', align: 'left', minWidth: 130 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', width: 130 }, |
| | | { title: '规格型号', field: 'baseGoodsModelsName', align: 'left', minWidth: 130 }, |
| | | { title: '报废数量', field: 'counts', align: 'center' }, |
| | | { title: '所属机构', field: 'agencyName', align: 'left', width: 130 }, |
| | | { title: '所属机构', field: 'agencyName', align: 'left', minWidth: 130 }, |
| | | { title: '创建人', field: 'operatorName', align: 'left' }, |
| | | { |
| | | title: '操作时间', |