| | |
| | | label-position="left" |
| | | label-width="110px" |
| | | size="mini" |
| | | style="height: 60vh; overflow-x: hidden" |
| | | > |
| | | <div class="basic-info"> |
| | | <!-- <FormBtnsView :showProduct="true" @productClick="productClick" /> --> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div style="margin-left: 20px">入库类型</div> |
| | | <el-form-item label="" prop="name" label-width="20px"> |
| | | <div class="purchase-view"> |
| | | <div class="left" style="margin-left: 20px"> |
| | | <el-form-item label="入库类型" prop="name"> |
| | | <el-input |
| | | v-model="editConfig.infomation.name" |
| | | placeholder="请填写" |
| | |
| | | style="width: 85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="purchase-view"> |
| | | <div class="left" style="margin-left: 20px"> |
| | | <el-form-item label="作业类型" prop="baseOperationType" :label-width="labelWidth"> |
| | | <el-select |
| | | v-model="editConfig.infomation.baseOperationType" |
| | |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in baseOperationTypeList" :key="item.id" :label="item.name" :value="item.id"> </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="prefix" :label-width="labelWidth"> |
| | | <el-input |
| | | v-model="editConfig.infomation.prefix" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="editConfig.infomation.baseOperationType !== 1" |
| | | label="保留方式" |
| | | prop="reservationMethod" |
| | | :label-width="labelWidth" |
| | | > |
| | | <el-radio-group |
| | | v-model="editConfig.infomation.reservationMethod" |
| | | @input="reserveMethodClick" |
| | | :disabled="!showFooter" |
| | | > |
| | | <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.resource == '在预定日期之前'" |
| | | label="在预定日期前预定" |
| | |
| | | </el-form-item> --> |
| | | </div> |
| | | <div class="right"> |
| | | |
| | | <el-form-item label="退货类型" prop="returnOperationTypeID"> |
| | | <el-select |
| | | v-model="editConfig.infomation.returnOperationTypeID" |
| | |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | > |
| | | <el-option v-for="item in returnOperationTypeList" :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-checkbox v-model="editConfig.infomation.earlyOperations"></el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item |
| | | v-if="editConfig.infomation.baseOperationType !== 1" |
| | | label="保留方式" |
| | | prop="reservationMethod" |
| | | :label-width="labelWidth" |
| | | > |
| | | <el-radio-group |
| | | v-model="editConfig.infomation.reservationMethod" |
| | | @input="reserveMethodClick" |
| | | :disabled="!showFooter" |
| | | > |
| | | <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> |
| | | </div> |
| | | </div> |
| | | <!-- <el-col :span="24"> |
| | | |
| | | </el-col> --> |
| | | </div> |
| | | <div class="bottom"> |
| | | <div class="purchase-view"> |
| | | <div class="left"> |
| | | <div class="second-label">位置</div> |
| | | <!-- <div class="second-label">位置</div> --> |
| | | <el-form-item label="默认源位置" prop="defaultLocationSrcId" style="margin-left: 20px"> |
| | | <el-select |
| | | v-model="editConfig.infomation.defaultLocationSrcId" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="right"> |
| | | <el-form-item label="默认目的位置" prop="defaultLocationDestId" style="margin-left: 20px"> |
| | | <el-select |
| | | v-model="editConfig.infomation.defaultLocationDestId" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="right"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | <!-- 尾 --> |
| | | <div v-if="showFooter" slot="footer" class="dialog-footer"> |
| | | <div 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 type="primary" size="small" @click="saveClick('form')" :disabled="!showFooter">保存</el-button> |
| | | <el-button size="small" @click="editConfig.visible = false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { addOperationType,updateOperationType,getWarehouseList,deleteOperationType,getLocationList} from "@/api/warehouseManage/warehouse" |
| | | import { getDataByType } from "@/api/data"; |
| | | import { |
| | | addOperationType, |
| | | updateOperationType, |
| | | getWarehouseList, |
| | | deleteOperationType, |
| | | getLocationList |
| | | } from "@/api/warehouseManage/warehouse" |
| | | import { getDataByType } from "@/api/data" |
| | | export default { |
| | | name: "AddBussinessType", |
| | | props: { |
| | |
| | | name: [{ required: true, message: "请输入", trigger: "change" }], |
| | | // 前缀 |
| | | prefix: [{ required: true, message: "请输入", trigger: "change" }], |
| | | baseOperationType: [{ required: true, message: "请选择", trigger: "change" }], |
| | | baseOperationType: [{ required: true, message: "请选择", trigger: "change" }] |
| | | }, |
| | | // 位置 |
| | | locationList: [], |
| | | warehouseList:[], |
| | | warehouseList: [], |
| | | // 退货类型 |
| | | returnOperationTypeList:[], |
| | | returnOperationTypeList: [], |
| | | // 作业类型 |
| | | baseOperationTypeList:getDataByType('baseOperationType'), |
| | | baseOperationTypeList: getDataByType("baseOperationType"), |
| | | // 创建欠单 |
| | | createBackorderList:getDataByType('createBackorder'), |
| | | createBackorderList: getDataByType("createBackorder"), |
| | | // 保留方式 |
| | | reservationMethodList:getDataByType('reservationMethod'), |
| | | reservationMethodList: getDataByType("reservationMethod"), |
| | | showButton: true, |
| | | showEdit: false, // 是否显示编辑按钮 |
| | | isDelClick: false, // 删除按钮是否可点击 |
| | | showFooter: false, // 是否显示取消保存 |
| | | labelWidth: "90px", |
| | | positionlist:[], |
| | | positionlist: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // 仓库 |
| | | async getWarehouse() { |
| | | await getLocationList({ |
| | | keyword:'', |
| | | keyword: "", |
| | | page: 0, |
| | | pageSize: 0 |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.positionlist = res.data?res.data:[] |
| | | this.positionlist = res.data ? res.data : [] |
| | | this.$forceUpdate() |
| | | } |
| | | }) |
| | | await getWarehouseList({ |
| | | keyword: '', |
| | | keyword: "", |
| | | page: 0, |
| | | pageSize: 0 |
| | | }).then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.warehouseList = res.data.data?res.data.data:[] |
| | | this.warehouseList = res.data.data ? res.data.data : [] |
| | | } |
| | | }) |
| | | }, |
| | | getList(){ |
| | | getList() { |
| | | this.getWarehouse() |
| | | }, |
| | | // 设置删除/打印/编辑是否显示 |
| | |
| | | }, |
| | | // 刪除 |
| | | deleteClick() { |
| | | let data = JSON.parse(JSON.stringify(this.editConfig.infomation)); |
| | | 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"); |
| | | this.editConfig.visible = false |
| | | this.$message.success("刪除成功!") |
| | | this.$emit("refresh") |
| | | } else { |
| | | this.$message.warning(res.msg?res.msg:"删除失败!") |
| | | } |
| | | }); |
| | | this.$message.warning(res.msg ? res.msg : "删除失败!") |
| | | } |
| | | }) |
| | | }, |
| | | // 编辑 |
| | | editClick() { |
| | |
| | | this.showFooter = true |
| | | }, |
| | | saveParams() { |
| | | let data =JSON.parse(JSON.stringify(this.editConfig.infomation)); |
| | | |
| | | let data = JSON.parse(JSON.stringify(this.editConfig.infomation)) |
| | | |
| | | let params = { |
| | | // 入库类型 |
| | | name:data.name, |
| | | name: data.name, |
| | | // 前缀 |
| | | prefix:data.prefix, |
| | | prefix: data.prefix, |
| | | // 作业类型 |
| | | baseOperationType:data.baseOperationType, |
| | | baseOperationType: data.baseOperationType, |
| | | // 退货类型 |
| | | returnOperationTypeID:data.returnOperationTypeID, |
| | | returnOperationTypeID: data.returnOperationTypeID, |
| | | // 创建欠单 |
| | | createBackorder:data.createBackorder, |
| | | createBackorder: data.createBackorder, |
| | | // 仓库 |
| | | warehouseId:data.warehouseId, |
| | | warehouseId: data.warehouseId, |
| | | // 显示作业详情 |
| | | showOperations:data.showOperations, |
| | | earlyOperations:data.earlyOperations, |
| | | showOperations: data.showOperations, |
| | | earlyOperations: data.earlyOperations, |
| | | // 保留方式 |
| | | reservationMethod:data.reservationMethod, |
| | | reservationMethod: data.reservationMethod, |
| | | // 默认原位置 |
| | | defaultLocationSrcId:data.defaultLocationSrcId, |
| | | defaultLocationSrcId: data.defaultLocationSrcId, |
| | | // 默认目标位置 |
| | | defaultLocationDestId:data.defaultLocationDestId, |
| | | defaultLocationDestId: data.defaultLocationDestId |
| | | } |
| | | if(data.id){ |
| | | params.id=data.id |
| | | if (data.id) { |
| | | params.id = data.id |
| | | } |
| | | return params; |
| | | return params |
| | | }, |
| | | // 保存 |
| | | 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 { |
| | | this.$message.warning(res.msg?res.msg:"添加失败!") |
| | | } |
| | | }); |
| | | } else { |
| | | updateOperationType(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false; |
| | | this.$message.success("编辑成功!"); |
| | | this.$emit('refresh') |
| | | } else { |
| | | this.$message.warning(res.msg?res.msg:"编辑失败!") |
| | | } |
| | | }); |
| | | } |
| | | }else { |
| | | console.log("error submit"); |
| | | return false; |
| | | 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 { |
| | | this.$message.warning(res.msg ? res.msg : "添加失败!") |
| | | } |
| | | }) |
| | | } else { |
| | | updateOperationType(params).then((res) => { |
| | | if (res.code === 200) { |
| | | this.editConfig.visible = false |
| | | this.$message.success("编辑成功!") |
| | | this.$emit("refresh") |
| | | } else { |
| | | this.$message.warning(res.msg ? res.msg : "编辑失败!") |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | | return false |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | // 删除 |
| | | delClick() {}, |
| | |
| | | height: calc(100% - 80px); |
| | | overflow: auto; |
| | | margin: 20px; |
| | | border: 1px solid #dcdfe6; |
| | | box-shadow: inset 0 0 2px #dee2e6; |
| | | -moz-box-shadow: inset 0 0 2px #dee2e6; |
| | | -webkit-box-shadow: inset 0 0 2px #dee2e6; |
| | | // border: 1px solid #dcdfe6; |
| | | // box-shadow: inset 0 0 2px #dee2e6; |
| | | // -moz-box-shadow: inset 0 0 2px #dee2e6; |
| | | // -webkit-box-shadow: inset 0 0 2px #dee2e6; |
| | | .content-number { |
| | | display: flex; |
| | | justify-content: right; |