仓库管理 仓库+业务类型 接口列表 添加编辑 删除 联调 业务类型缺少字段
| | |
| | | id: 4 |
| | | } |
| | | ] |
| | | |
| | | // 仓库 |
| | | // 入向运输 |
| | | const inboundTransportation=[ |
| | | { |
| | | name:'直接接收产品(1步收货)', |
| | | id:1, |
| | | disabled:false, |
| | | }, |
| | | { |
| | | name:'接到产品到收料区,再入库(2步收货)', |
| | | id:2, |
| | | disabled:true, |
| | | }, |
| | | { |
| | | name:'接收产品到收料区,检验,然后入库(3步收货)', |
| | | id:3, |
| | | disabled:true, |
| | | } |
| | | ] |
| | | // 出库运输 |
| | | const outboundTransportation=[ |
| | | { |
| | | name:'直接出库(1步)', |
| | | id:1, |
| | | disabled:false, |
| | | }, |
| | | { |
| | | name:'送到待出库区,再送货(2步发货)', |
| | | id:2, |
| | | disabled:true, |
| | | }, |
| | | { |
| | | name:'包装产品,发送到待出库区,再送货(3步发货)', |
| | | id:3, |
| | | disabled:true, |
| | | } |
| | | ] |
| | | // 业务类型 |
| | | // 作业类型 |
| | | const baseOperationType=[ |
| | | { |
| | | name: "收货", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "发货", |
| | | id: 2 |
| | | }, |
| | | { |
| | | name: "内部调拨", |
| | | id: 3 |
| | | }, |
| | | ] |
| | | //创建欠单 |
| | | const createBackorder=[ |
| | | { |
| | | name: "提问", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "总是", |
| | | id: 2 |
| | | }, |
| | | { |
| | | name: "从不", |
| | | id: 3 |
| | | }, |
| | | ] |
| | | //保留方式 在预定日期之前=3 |
| | | const reservationMethod=[ |
| | | { |
| | | name: "确认时", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "手工", |
| | | id: 2 |
| | | } |
| | | ] |
| | | // 产品类别 |
| | | // 强制下架策略 |
| | | const forceRemovalStrategy=[ |
| | | { |
| | | name: "First In First Out (FIFO)", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "Last In First Out (LIFO)", |
| | | id: 2 |
| | | }, |
| | | { |
| | | name: "Closest Location", |
| | | id: 3 |
| | | }, |
| | | ] |
| | | //成本方法 |
| | | const costingMethod=[ |
| | | { |
| | | name: "标准价格", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "先进先出 (FIFO)", |
| | | id: 2 |
| | | }, |
| | | { |
| | | name: "平均成本(AVCO)", |
| | | id: 3 |
| | | }, |
| | | ] |
| | | // 库存计价 |
| | | const inventoryValuation=[ |
| | | { |
| | | name: "手动", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "自动", |
| | | id: 2 |
| | | } |
| | | ] |
| | | export const getDataByType = (type) => { |
| | | if (type == "purchaseStatus") { |
| | | return purchaseStatus |
| | | }else if(type=='inboundTransportation'){ |
| | | return inboundTransportation |
| | | }else if(type=='outboundTransportation'){ |
| | | return outboundTransportation |
| | | }else if(type=='baseOperationType'){ |
| | | return baseOperationType; |
| | | }else if(type=='createBackorder'){ |
| | | return createBackorder; |
| | | }else if(type=='reservationMethod'){ |
| | | return reservationMethod; |
| | | }else if(type=='forceRemovalStrategy'){ |
| | | return forceRemovalStrategy |
| | | }else if(type=='costingMethod'){ |
| | | return costingMethod |
| | | }else if(type=='inventoryValuation'){ |
| | | return inventoryValuation |
| | | } |
| | | } |
New file |
| | |
| | | import request from "@/common/untils/request.js" |
| | | import axios from "axios" |
| | | // 产品类型列表 |
| | | export function getProductCategoryList(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/product/getProductCategoryList", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 产品类型详情 |
| | | export const getProductCategoryDetails = async (data) => { |
| | | return await axios.get(`/api-wms/v1/product/getProductCategoryDetails/`+data.id, { |
| | | |
| | | }) |
| | | } |
| | | // 创建产品类型 |
| | | export function addProductCategory(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/product/addProductCategory", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 删除产品类型 |
| | | export function deleteProductCategory(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/product/deleteProductCategory/"+data.id, |
| | | method: "delete", |
| | | data |
| | | }) |
| | | } |
| | | // 更新产品类型 |
| | | export function updateProductCategory(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/product/updateProductCategory", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
New file |
| | |
| | | import request from "@/common/untils/request.js" |
| | | import axios from "axios" |
| | | |
| | | // 仓库列表 |
| | | export const getWarehouseList = async (data) => { |
| | | return await axios.get(`/api-wms/v1/warehouse/warehouse`, { |
| | | params: data |
| | | }) |
| | | } |
| | | // 创建仓库 |
| | | export function addWarehouse(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/warehouse/warehouse", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 删除仓库 |
| | | export function deleteWarehouse(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/warehouse/warehouse/"+data.id, |
| | | method: "delete", |
| | | data |
| | | }) |
| | | } |
| | | // 更新仓库 |
| | | export function updateWarehouse(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/warehouse/warehouse/"+data.id, |
| | | method: "put", |
| | | data |
| | | }) |
| | | } |
| | | // 业务类型 列表 |
| | | export const getOperationTypeList = async (data) => { |
| | | return await axios.get(`/api-wms/v1/operationType/operationType`, { |
| | | params: data |
| | | }) |
| | | } |
| | | // 创建业务类型 |
| | | export function addOperationType(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/operationType/operationType", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 删除业务类型 |
| | | export function deleteOperationType(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/operationType/operationType/"+data.id, |
| | | method: "delete", |
| | | data |
| | | }) |
| | | } |
| | | // 更新业务类型 |
| | | export function updateOperationType(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/operationType/operationType/"+data.id, |
| | | method: "put", |
| | | data |
| | | }) |
| | | } |
| | |
| | | @click="selCommonClick(scope.row)" |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <span v-else-if="item.propType=='mulitple'"> |
| | | {{ scope.row[item.prop][item.propTwo]?scope.row[item.prop][item.propTwo]:'--' }} |
| | | </span> |
| | | <span :class="item.className ? item.className : ''" v-else>{{ |
| | | scope.row[item.prop] ? scope.row[item.prop] : scope.row[item.prop] === 0 ? scope.row[item.prop] : "--" |
| | | }}</span> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | <slot name="tableButton" /> |
| | |
| | | <span>打印</span> |
| | | </span> --> |
| | | <span class="btn" style="margin-left: 15px"> |
| | | <i class="el-icon-s-tools"></i> |
| | | <span>动作</span> |
| | | <el-button |
| | | plain |
| | | size="mini" |
| | | style="margin-left: 15px" |
| | | @click="deleteClick" |
| | | >删除</el-button |
| | | > |
| | | </span> |
| | | <el-button v-if="showEdit" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button> |
| | | <el-button |
| | | v-if="showEdit" |
| | | plain |
| | | size="mini" |
| | | style="margin-left: 15px" |
| | | @click="editClick" |
| | | >编辑</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <!-- 内容 --> |
| | |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div style="margin-left: 20px">类别</div> |
| | | <el-form-item label="" prop="client_name" label-width="20px"> |
| | | <el-form-item label="" prop="name" label-width="20px"> |
| | | <el-input |
| | | v-model="editConfig.infomation.client_name" |
| | | v-model="editConfig.infomation.name" |
| | | placeholder="" |
| | | :disabled="!showFooter" |
| | | style="width: 85%" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="上级品类" prop="client_name" style="margin-left: 20px"> |
| | | <el-form-item |
| | | label="上级品类" |
| | | prop="parentId" |
| | | style="margin-left: 20px" |
| | | > |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | v-model="editConfig.infomation.parentId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 45%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option |
| | | v-for="item in productCategoryList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <div class="purchase-view"> |
| | | <div class="left"> |
| | | <div class="second-label">物流</div> |
| | | <el-form-item label="路线" prop="client_name" style="margin-left: 20px"> |
| | | <!-- <el-form-item label="路线" prop="client_name" style="margin-left: 20px"> |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="强制下架策略" prop="client_name" style="margin-left: 20px"> |
| | | </el-form-item> --> |
| | | <el-form-item |
| | | label="强制下架策略" |
| | | prop="forceRemovalStrategy" |
| | | style="margin-left: 20px" |
| | | > |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | | v-model="editConfig.infomation.forceRemovalStrategy" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option |
| | | v-for="item in forceRemovalStrategyList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="second-label">库存计价</div> |
| | | <el-form-item label="成本方法" prop="client_name" style="margin-left: 20px"> |
| | | <el-form-item |
| | | label="成本方法" |
| | | prop="costingMethod" |
| | | style="margin-left: 20px" |
| | | > |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | | v-model="editConfig.infomation.costingMethod" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option |
| | | v-for="item in costingMethodList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="库存计价" prop="client_name" style="margin-left: 20px"> |
| | | <el-form-item |
| | | label="库存计价" |
| | | prop="inventoryValuation" |
| | | style="margin-left: 20px" |
| | | > |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | | v-model="editConfig.infomation.inventoryValuation" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 63%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option |
| | | v-for="item in inventoryValuationList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <!-- 尾 --> |
| | | <div v-if="showFooter" slot="footer" class="dialog-footer"> |
| | | <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">保并提交审批</el-button> --> |
| | | <el-button type="primary" size="small" @click="saveClick('form')">保存</el-button> |
| | | <el-button size="small" @click="editConfig.visible = false">取消</el-button> |
| | | <el-button type="primary" size="small" @click="saveClick('form')" |
| | | >保存</el-button |
| | | > |
| | | <el-button size="small" @click="editConfig.visible = false" |
| | | >取消</el-button |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addProductCategory, |
| | | updateProductCategory, |
| | | deleteProductCategory, |
| | | } from "@/api/product/productCategory"; |
| | | import { getDataByType } from "@/api/data"; |
| | | export default { |
| | | name: "AddProductCategoryDialog", |
| | | props: { |
| | |
| | | return { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: { type: [] } |
| | | } |
| | | } |
| | | } |
| | | infomation: { type: [] }, |
| | | }; |
| | | }, |
| | | }, |
| | | productCategoryList: { |
| | | type: Array, |
| | | default: () => { |
| | | return []; |
| | | }, |
| | | }, |
| | | }, |
| | | components: {}, |
| | | computed: {}, |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | number: [{ required: true, message: "请输入退款单编号", trigger: "blur" }], |
| | | refundDate: [{ required: true, message: "请选择退款日期", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }], |
| | | sale_return_nunber: [{ required: true, message: "请选择销售退货单", trigger: "change" }] |
| | | name: [{ required: true, message: "请输入", trigger: "change" }], |
| | | }, |
| | | forceRemovalStrategyList: getDataByType("forceRemovalStrategy"), |
| | | // 成本方法 |
| | | costingMethodList: getDataByType("costingMethod"), |
| | | // 库存计价 |
| | | inventoryValuationList: getDataByType("inventoryValuation"), |
| | | memberOptions: [], |
| | | paymentTypeListOptions: [], |
| | | showButton: true, |
| | | showEdit: false, // 是否显示编辑按钮 |
| | | isDelClick: false, // 删除按钮是否可点击 |
| | | showFooter: false // 是否显示取消保存 |
| | | } |
| | | showFooter: false, // 是否显示取消保存 |
| | | }; |
| | | }, |
| | | created() { |
| | | this.setBottonView() |
| | | this.setBottonView(); |
| | | }, |
| | | methods: { |
| | | // 设置删除/打印/编辑是否显示 |
| | | setBottonView() { |
| | | if (this.editConfig.title === "新建") { |
| | | this.showButton = false |
| | | this.showEdit = false |
| | | this.showFooter = true |
| | | this.showButton = false; |
| | | this.showEdit = false; |
| | | this.showFooter = true; |
| | | } else { |
| | | this.showEdit = true |
| | | this.showFooter = false |
| | | this.showEdit = true; |
| | | this.showFooter = false; |
| | | } |
| | | }, |
| | | // 关闭 |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | this.editConfig.visible = false; |
| | | }, |
| | | // 刪除 |
| | | deleteClick() { |
| | | let data = JSON.parse(JSON.stringify(this.editConfig.infomation)); |
| | | deleteProductCategory({ id: data.id }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("刪除成功"); |
| | | this.$emit("refresh"); |
| | | } |
| | | }); |
| | | }, |
| | | // 编辑 |
| | | editClick() { |
| | | this.showEdit = false |
| | | this.showButton = false |
| | | this.showFooter = true |
| | | this.showEdit = false; |
| | | this.showButton = false; |
| | | this.showFooter = true; |
| | | }, |
| | | saveParams() { |
| | | let data = JSON.parse(JSON.stringify(this.editConfig.infomation)); |
| | | |
| | | let params = { |
| | | costingMethod: data.costingMethod, |
| | | forceRemovalStrategy: data.forceRemovalStrategy, |
| | | inventoryValuation: data.inventoryValuation, |
| | | name: data.name, |
| | | parentId: data.parentId, |
| | | }; |
| | | if (data.id) { |
| | | params.id = data.id; |
| | | } |
| | | return params; |
| | | }, |
| | | // 保存 |
| | | saveClick() {}, |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | const params = this.saveParams(); |
| | | if (this.editConfig.title === "新建") { |
| | | addProductCategory(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("添加成功"); |
| | | this.$emit("refresh"); |
| | | } |
| | | }); |
| | | } else { |
| | | updateProductCategory(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("编辑成功"); |
| | | this.$emit("refresh"); |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | console.log("error submit"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // 删除 |
| | | delClick() {}, |
| | | // 产品 |
| | | productClick() { |
| | | this.$router.push({ path: "/productManage/productList", query: { name: "产品" } }) |
| | | } |
| | | } |
| | | } |
| | | this.$router.push({ |
| | | path: "/productManage/productList", |
| | | query: { name: "产品" }, |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 新建/编辑 --> |
| | | <AddProductCategoryDialog v-if="editConfig.visible" :edit-common-config="editConfig" /> |
| | | <AddProductCategoryDialog v-if="editConfig.visible" :productCategoryList="tableList.tableInfomation" @refresh="refresh" :edit-common-config="editConfig" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getProductList } from "@/api/product/product" |
| | | // import DetailProduct from "@/views/productManage/product/DetailProduct" |
| | | import { getProductCategoryList } from "@/api/product/productCategory" |
| | | import AddProductCategoryDialog from "@/views/productManage/productCategory/AddProductCategoryDialog" |
| | | |
| | | export default { |
| | |
| | | tableColumn: [ |
| | | { |
| | | label: "产品类型", |
| | | prop: "id", |
| | | prop: "name", |
| | | isShowColumn: true, |
| | | default: true |
| | | } |
| | |
| | | } |
| | | }, |
| | | // 请求数据 |
| | | async getData(val, content) { |
| | | await getProductList({ |
| | | [val]: content, |
| | | async getData() { |
| | | await getProductCategoryList({ |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.data.code === 200) { |
| | | const list = res.data.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | supplierNumber: item.supplier.number, |
| | | status: "就绪", |
| | | preTime: "2023-09-04 11:20:00" |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.total |
| | | if (res.code === 200) { |
| | | const list = res.data?res.data:[] |
| | | this.tableList.tableInfomation = list |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | | }, |
| | | refresh(){ |
| | | this.pagerOptions.currPage=1 |
| | | this.getData() |
| | | }, |
| | | // 搜索 |
| | | getList(val) { |
| | | console.log(val) |
| | | this.keyword=val; |
| | | this.pagerOptions.currPage=1 |
| | | this.getData() |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row } |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation={ |
| | | costingMethod:null, |
| | | forceRemovalStrategy:null, |
| | | inventoryValuation:null, |
| | | name:'', |
| | | parentId:null, |
| | | } |
| | | this.editConfig.visible = true |
| | | } |
| | | } |
| | | } |
| | |
| | | </el-row> |
| | | <div class="purchase-view"> |
| | | <div class="left" style="margin-left: 20px"> |
| | | <el-form-item label="作业类型" prop="operate_type" :label-width="labelWidth"> |
| | | <el-form-item label="作业类型" prop="baseOperationType" :label-width="labelWidth"> |
| | | <el-select |
| | | v-model="editConfig.infomation.operate_type" |
| | | v-model="editConfig.infomation.baseOperationType" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in operateTypeOptions" :key="item" :label="item" :value="item"> </el-option> |
| | | <el-option v-for="item in baseOperationTypeList" :key="item.id" :label="item.name" :value="item.id"> </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="序号前缀" prop="client_name" :label-width="labelWidth"> |
| | | <el-input |
| | | v-model="editConfig.infomation.client_name" |
| | |
| | | style="width: 85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="仓库" prop="client_name" :label-width="labelWidth"> |
| | | <el-form-item label="仓库" prop="warehouseId" :label-width="labelWidth"> |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | | v-model="editConfig.infomation.warehouseId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option v-for="item in warehouseList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="editConfig.infomation.operate_type !== '收货'" |
| | | v-if="editConfig.infomation.baseOperationType !== 1" |
| | | label="保留方式" |
| | | prop="resource" |
| | | prop="reservationMethod" |
| | | :label-width="labelWidth" |
| | | > |
| | | <el-radio-group |
| | | v-model="editConfig.infomation.resource" |
| | | v-model="editConfig.infomation.reservationMethod" |
| | | @input="reserveMethodClick" |
| | | :disabled="!showFooter" |
| | | > |
| | | <div style="margin-top: 8px"><el-radio label="确认时"></el-radio></div> |
| | | <div style="margin-top: 10px"><el-radio label="手工"></el-radio></div> |
| | | <div style="margin-top: 10px"><el-radio label="在预定日期之前"></el-radio></div> |
| | | <div style="margin-top: 8px"> |
| | | <el-radio v-for="item in reservationMethodList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | > |
| | | </el-radio> |
| | | </div> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="editConfig.infomation.operate_type !== '收货'" |
| | | <!-- <el-form-item |
| | | v-if="editConfig.infomation.resource == '在预定日期之前'" |
| | | label="在预定日期前预定" |
| | | prop="client_name" |
| | | :label-width="labelWidth" |
| | |
| | | :disabled="!showFooter" |
| | | style="width: 85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | </div> |
| | | <div class="right"> |
| | | <el-form-item label="退货类型" prop="client_name"> |
| | | |
| | | <el-form-item label="退货类型" prop="returnOperationTypeID"> |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | | v-model="editConfig.infomation.returnOperationTypeID" |
| | | v-if="editConfig.infomation.baseOperationType" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option v-for="item in returnOperationTypeList" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="创建欠单" prop="client_name"> |
| | | <el-form-item label="创建欠单" prop="createBackorder"> |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | | v-model="editConfig.infomation.createBackorder" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option v-for="item in createBackorderList" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="显示作业详情" prop="showDetail"> |
| | | <el-checkbox v-model="editConfig.infomation.showDetail"></el-checkbox> |
| | | <el-form-item label="显示作业详情" prop="showOperations"> |
| | | <el-checkbox v-model="editConfig.infomation.showOperations"></el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="editConfig.infomation.operate_type === '收货'" |
| | | v-if="editConfig.infomation.baseOperationType === 1" |
| | | label="预填写作业详情" |
| | | prop="showDetail" |
| | | prop="showOperations" |
| | | > |
| | | <el-checkbox v-model="editConfig.infomation.showDetail"></el-checkbox> |
| | | <el-checkbox v-model="editConfig.infomation.showOperations"></el-checkbox> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="purchase-view"> |
| | | <div class="left"> |
| | | <div class="second-label">位置</div> |
| | | <el-form-item label="默认源位置" prop="client_name" style="margin-left: 20px"> |
| | | <el-form-item label="默认源位置" prop="defaultLocationSrcId" style="margin-left: 20px"> |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | | v-model="editConfig.infomation.defaultLocationSrcId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option v-for="item in locationList" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="默认目的位置" prop="client_name" style="margin-left: 20px"> |
| | | <el-form-item label="默认目的位置" prop="defaultLocationDestId" style="margin-left: 20px"> |
| | | <el-select |
| | | v-model="editConfig.infomation.memberId" |
| | | multiple |
| | | v-model="editConfig.infomation.defaultLocationDestId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | <el-option v-for="item in locationList" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addOperationType,updateOperationType,getWarehouseList,deleteOperationType} from "@/api/warehouseManage/warehouse" |
| | | import { getDataByType } from "@/api/data"; |
| | | export default { |
| | | name: "AddBussinessType", |
| | | props: { |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: "change" }], |
| | | number: [{ required: true, message: "请输入退款单编号", trigger: "blur" }], |
| | | refundDate: [{ required: true, message: "请选择退款日期", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }], |
| | | sale_return_nunber: [{ required: true, message: "请选择销售退货单", trigger: "change" }] |
| | | // 入库类型 |
| | | client_name: [{ required: true, message: "请输入", trigger: "change" }], |
| | | // 前缀 |
| | | number: [{ required: true, message: "请输入", trigger: "change" }], |
| | | baseOperationType: [{ required: true, message: "请选择", trigger: "change" }], |
| | | }, |
| | | memberOptions: [], |
| | | operateTypeOptions: ["收货", "发货", "内部调拨"], // 操作类型 |
| | | // 位置 |
| | | locationList: [], |
| | | warehouseList:[], |
| | | // 退货类型 |
| | | returnOperationTypeList:[], |
| | | // 作业类型 |
| | | baseOperationTypeList:getDataByType('baseOperationType'), |
| | | // 创建欠单 |
| | | createBackorderList:getDataByType('createBackorder'), |
| | | // 保留方式 |
| | | reservationMethodList:getDataByType('reservationMethod'), |
| | | showButton: true, |
| | | showEdit: false, // 是否显示编辑按钮 |
| | | isDelClick: false, // 删除按钮是否可点击 |
| | | showFooter: false, // 是否显示取消保存 |
| | | labelWidth: "80px" |
| | | labelWidth: "90px" |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList() |
| | | this.setBottonView() |
| | | }, |
| | | methods: { |
| | | // 仓库 |
| | | async getWarehouse() { |
| | | await getWarehouseList({ |
| | | keyword: '', |
| | | page: 0, |
| | | pageSize: 0 |
| | | }).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.warehouseList = res.data.data?res.data.data:[] |
| | | } |
| | | }) |
| | | }, |
| | | getList(){ |
| | | this.getWarehouse() |
| | | }, |
| | | // 设置删除/打印/编辑是否显示 |
| | | setBottonView() { |
| | | if (this.editConfig.title === "新建") { |
| | |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 刪除 |
| | | deleteClick() { |
| | | let data = JSON.parse(JSON.stringify(this.editConfig.infomation)); |
| | | deleteOperationType({ id: data.id }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("刪除成功"); |
| | | this.$emit("refresh"); |
| | | } |
| | | }); |
| | | }, |
| | | // 编辑 |
| | | editClick() { |
| | | this.showEdit = false |
| | | this.showButton = false |
| | | this.showFooter = true |
| | | }, |
| | | saveParams() { |
| | | let data =JSON.parse(JSON.stringify(this.editConfig.infomation)); |
| | | |
| | | let params = { |
| | | // 作业类型 |
| | | baseOperationType:data.baseOperationType, |
| | | // 退货类型 |
| | | returnOperationTypeID:data.returnOperationTypeID, |
| | | // 创建欠单 |
| | | createBackorder:data.createBackorder, |
| | | // 仓库 |
| | | warehouseId:data.warehouseId, |
| | | // 显示作业详情 |
| | | showOperations:data.showOperations, |
| | | // 保留方式 |
| | | reservationMethod:data.reservationMethod, |
| | | // 默认原位置 |
| | | defaultLocationSrcId:data.defaultLocationSrcId, |
| | | // 默认目标位置 |
| | | defaultLocationDestId:data.defaultLocationDestId, |
| | | } |
| | | if(data.id){ |
| | | params.id=data.id |
| | | } |
| | | return params; |
| | | }, |
| | | // 保存 |
| | | saveClick() {}, |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | const params = this.saveParams(); |
| | | if (this.editConfig.title === "新建") { |
| | | addOperationType(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("添加成功"); |
| | | this.$emit('refresh') |
| | | } |
| | | }); |
| | | } else { |
| | | updateOperationType(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("编辑成功"); |
| | | this.$emit('refresh') |
| | | } |
| | | }); |
| | | } |
| | | }else { |
| | | console.log("error submit"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // 删除 |
| | | delClick() {}, |
| | | // 产品 |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 新建/编辑 --> |
| | | <AddBussinessType v-if="editConfig.visible" :edit-common-config="editConfig" /> |
| | | <AddBussinessType v-if="editConfig.visible" @refresh="refresh" :edit-common-config="editConfig" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getProductList } from "@/api/product/product" |
| | | import { getOperationTypeList } from "@/api/warehouseManage/warehouse" |
| | | // import DetailProduct from "@/views/productManage/product/DetailProduct" |
| | | import AddBussinessType from "@/views/warehouseManage/bussinessType/AddBussinessType" |
| | | |
| | |
| | | data() { |
| | | return { |
| | | tableList: {}, |
| | | searchOptions: [], |
| | | keyword:'', |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | |
| | | }, |
| | | { |
| | | label: "仓库", |
| | | prop: "deviceName", |
| | | propType:'mulitple', |
| | | propTwo:'name', |
| | | prop: "warehouse", |
| | | isShowColumn: true, |
| | | default: true |
| | | } |
| | |
| | | this.tableList.tableColumn = this.setTableColumn(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData(val, content) { |
| | | await getProductList({ |
| | | [val]: content, |
| | | async getData() { |
| | | await getOperationTypeList({ |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.data.code === 200) { |
| | | const list = res.data.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | supplierNumber: item.supplier.number, |
| | | status: "草稿", |
| | | preTime: "2023-09-04 11:20:00" |
| | | } |
| | | }) |
| | | const list = res.data.data |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.total |
| | | } |
| | | }) |
| | | }, |
| | | refresh(){ |
| | | this.pagerOptions.currPage=1 |
| | | this.getData() |
| | | }, |
| | | // 搜索 |
| | | getList(val) { |
| | | console.log(val) |
| | | this.keyword=val; |
| | | this.pagerOptions.currPage=1 |
| | | this.getData() |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row } |
| | | this.editConfig.visible = true |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation={ |
| | | // 作业类型 |
| | | baseOperationType:null, |
| | | // 退货类型 |
| | | returnOperationTypeID:null, |
| | | // 创建欠单 |
| | | createBackorder:null, |
| | | // 仓库 |
| | | warehouseId:null, |
| | | // 显示作业详情 |
| | | showOperations:null, |
| | | // 保留方式 |
| | | reservationMethod:null, |
| | | // 默认原位置 |
| | | defaultLocationSrcId:null, |
| | | // 默认目标位置 |
| | | defaultLocationDestId:null, |
| | | } |
| | | this.editConfig.visible = true |
| | | } |
| | | } |
| | | } |
| | |
| | | <span>打印</span> |
| | | </span> |
| | | <span class="btn" style="margin-left: 15px"> |
| | | <i class="el-icon-s-tools"></i> |
| | | <span>动作</span> |
| | | <el-button plain size="mini" style="margin-left: 15px" @click="deleteClick">删除</el-button> |
| | | </span> |
| | | <el-button v-if="showEdit" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button> |
| | | </div> |
| | |
| | | |
| | | <el-row> |
| | | <el-col :span="24" class="line_height_30px"> |
| | | <el-form-item label="仓库" prop="client_name"> |
| | | <el-form-item label="仓库" prop="name"> |
| | | <el-input |
| | | :disabled="showEdit" |
| | | v-model="editConfig.infomation.inspectionScale" |
| | | v-model="editConfig.infomation.name" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="缩写" prop="client_name"> |
| | | <el-form-item label="缩写" prop="code"> |
| | | <el-input |
| | | :disabled="showEdit" |
| | | v-model="editConfig.infomation.inspectionScale" |
| | | v-model="editConfig.infomation.code" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="2"> </el-col> |
| | | <el-col :span="11"> |
| | | <el-form-item label="地址" prop="client_name"> |
| | | <el-form-item label="地址" prop="address"> |
| | | <el-input |
| | | :disabled="showEdit" |
| | | v-model="editConfig.infomation.inspectionScale" |
| | | v-model="editConfig.infomation.address" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | <el-tabs v-model="activeName" type="card"> |
| | | <el-tab-pane label="仓库配置" name="first"> |
| | | <div class="second-label">运输</div> |
| | | <el-form-item label="入向运输" prop="desc"> |
| | | <el-form-item label="入向运输" prop="inboundTransportation"> |
| | | <el-radio-group |
| | | :disabled="showEdit" |
| | | v-model="editConfig.value1" |
| | | v-model="editConfig.infomation.inboundTransportation" |
| | | > |
| | | <el-radio style="width:100%;" class="line_height_30px" |
| | | v-for="(item,index) in wareList" |
| | | :key='index' |
| | | v-for="(item) in inboundTransportationList" |
| | | :key='item.id' |
| | | :disabled="item.disabled" |
| | | :label="item.id" |
| | | >{{item.name}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="出库运输" prop="desc"> |
| | | <el-form-item label="出库运输" prop="outboundTransportation"> |
| | | <el-radio-group |
| | | :disabled="showEdit" |
| | | v-model="editConfig.value2" |
| | | v-model="editConfig.infomation.outboundTransportation" |
| | | > |
| | | <el-radio style="width:100%;" class="line_height_30px" |
| | | v-for="(item,index) in wareoutList" |
| | | :key='index' |
| | | v-for="(item) in outboundTransportationList" |
| | | :key='item.id' |
| | | :disabled="item.disabled" |
| | | :label="item.id" |
| | | >{{item.name}}</el-radio> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addWarehouse,updateWarehouse,deleteWarehouse } from "@/api/warehouseManage/warehouse" |
| | | import { getDataByType } from "@/api/data"; |
| | | export default { |
| | | name: "AddScrapDialog", |
| | | props: { |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | |
| | | number: [{ required: true, message: "请输入退款单编号", trigger: "blur" }], |
| | | refundDate: [{ required: true, message: "请选择退款日期", trigger: "change" }], |
| | | memberId: [{ required: true, message: "请选择销售负责人", trigger: "change" }], |
| | | sale_return_nunber: [{ required: true, message: "请选择销售退货单", trigger: "change" }] |
| | | name: [{ required: true, message: "请输入", trigger: "change" }], |
| | | code: [{ required: true, message: "请输入", trigger: "change" }], |
| | | }, |
| | | memberOptions: [], |
| | | paymentTypeListOptions: [], |
| | | showEdit: false, // 是否显示编辑按钮 |
| | | showFooter: false, // 是否显示取消保存 |
| | | currentState: "todo", // 当前状态 |
| | | wareList:[ |
| | | { |
| | | name:'直接接收产品(1步收货)', |
| | | id:1, |
| | | disabled:false, |
| | | }, |
| | | { |
| | | name:'接到产品到收料区,再入库(2步收货)', |
| | | id:2, |
| | | disabled:true, |
| | | }, |
| | | { |
| | | name:'接收产品到收料区,检验,然后入库(3步收货)', |
| | | id:3, |
| | | disabled:true, |
| | | } |
| | | ], |
| | | wareoutList:[ |
| | | { |
| | | name:'直接出库(1步)', |
| | | id:1, |
| | | disabled:false, |
| | | }, |
| | | { |
| | | name:'送到待出库区,再送货(2步发货)', |
| | | id:2, |
| | | disabled:true, |
| | | }, |
| | | { |
| | | name:'包装产品,发送到待出库区,再送货(3步发货)', |
| | | id:3, |
| | | disabled:true, |
| | | } |
| | | ], |
| | | inboundTransportationList:getDataByType('inboundTransportation'), |
| | | outboundTransportationList:getDataByType('outboundTransportation'), |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | }, |
| | | // 刪除 |
| | | deleteClick() { |
| | | let data = JSON.parse(JSON.stringify(this.editConfig.infomation)); |
| | | deleteWarehouse({ id: data.id }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("刪除成功"); |
| | | this.$emit("refresh"); |
| | | } |
| | | }); |
| | | }, |
| | | // 编辑 |
| | | editClick() { |
| | | this.showEdit = false |
| | | this.showFooter = true |
| | | }, |
| | | saveParams() { |
| | | let data =JSON.parse(JSON.stringify(this.editConfig.infomation)); |
| | | |
| | | let params = { |
| | | address:data.address, |
| | | buyToResupply:data.buyToResupply, |
| | | code:data.code, |
| | | name:data.name, |
| | | inboundTransportation:data.inboundTransportation, |
| | | outboundTransportation:data.outboundTransportation, |
| | | } |
| | | if(data.id){ |
| | | params.id=data.id |
| | | } |
| | | return params; |
| | | }, |
| | | // 保存 |
| | | saveClick() {} |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | const params = this.saveParams(); |
| | | if (this.editConfig.title === "新建") { |
| | | addWarehouse(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("添加成功"); |
| | | this.$emit('refresh') |
| | | } |
| | | }); |
| | | } else { |
| | | updateWarehouse(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("编辑成功"); |
| | | this.$emit('refresh') |
| | | } |
| | | }); |
| | | } |
| | | }else { |
| | | console.log("error submit"); |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div class="top"> |
| | | <SearchCommonView |
| | | :add-title="'新建'" |
| | | :placeholder="'请输入单号'" |
| | | :placeholder="'请输入仓库'" |
| | | :amount-view="false" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 新建/编辑 --> |
| | | <AddDialog v-if="editConfig.visible" :edit-common-config="editConfig" /> |
| | | <AddDialog v-if="editConfig.visible" @refresh="refresh" :edit-common-config="editConfig" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import { getProductList } from "@/api/product/product" |
| | | // import DetailProduct from "@/views/productManage/product/DetailProduct" |
| | | import { getWarehouseList } from "@/api/warehouseManage/warehouse" |
| | | import AddDialog from "@/views/warehouseManage/warehouse/AddDialog" |
| | | |
| | | export default { |
| | |
| | | data() { |
| | | return { |
| | | tableList: {}, |
| | | searchOptions: [], |
| | | keyword:'', |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | |
| | | let tableColumn = [ |
| | | { |
| | | label: "仓库", |
| | | prop: "id", |
| | | prop: "name", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | |
| | | }, |
| | | { |
| | | label: "地址", |
| | | prop: "id", |
| | | prop: "address", |
| | | isShowColumn: true, |
| | | default: true |
| | | } |
| | |
| | | this.tableList.tableColumn = this.setTableColumn(val) |
| | | }, |
| | | // 请求数据 |
| | | async getData(val, content) { |
| | | await getProductList({ |
| | | [val]: content, |
| | | async getData() { |
| | | await getWarehouseList({ |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.data.code === 200) { |
| | | const list = res.data.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | supplierNumber: item.supplier.number, |
| | | status: "草稿", |
| | | preTime: "2023-09-04 11:20:00" |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.total |
| | | if (res.data.code == 200) { |
| | | const list = res.data.data?res.data.data:[] |
| | | this.tableList.tableInfomation = list |
| | | this.pagerOptions.totalCount = res.data.total |
| | | } |
| | | }) |
| | | }, |
| | | refresh(){ |
| | | this.pagerOptions.currPage=1 |
| | | this.getData() |
| | | }, |
| | | // 搜索 |
| | | getList(val) { |
| | | console.log(val) |
| | | this.keyword=val; |
| | | this.pagerOptions.currPage=1 |
| | | this.getData() |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | | console.log(row) |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "编辑" |
| | | this.editConfig.infomation = { ...row } |
| | |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.infomation={ |
| | | address:'', |
| | | buyToResupply:'', |
| | | code:'', |
| | | name:'', |
| | | inboundTransportation:1, |
| | | outboundTransportation:1, |
| | | } |
| | | this.editConfig.title = "新建" |
| | | } |
| | | } |