New file |
| | |
| | | import request from "@/common/untils/request" |
| | | export function getCodeStandardList(data) { |
| | | // return axios.get(`/api/code/getCodeList`, { |
| | | // params: data |
| | | // }) |
| | | |
| | | return request({ |
| | | url: "/api-wms/v1/code/getCodeList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | | // 获取自动编码 |
| | | export function getAutoCode(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/code/getAutoCode", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | id: 9 |
| | | } |
| | | ] |
| | | // 出入库明细 业务类型 |
| | | const baseOperationTypeTwo=[ |
| | | { |
| | | name: "收货", |
| | | id: 1 |
| | | }, |
| | | { |
| | | name: "交货", |
| | | id: 2 |
| | | }, |
| | | { |
| | | name: "内部调拨", |
| | | id: 3 |
| | | }, |
| | | { |
| | | name: "报废", |
| | | id: 4 |
| | | }, |
| | | { |
| | | name: "库存盘点", |
| | | id: 5 |
| | | }, |
| | | ] |
| | | //采购类型 |
| | | const purchaseType = [ |
| | | { |
| | | name: "采购", |
| | | id: 1, |
| | | }, |
| | | { |
| | | name: "自制", |
| | | id: 2, |
| | | }, |
| | | { |
| | | name: "委外", |
| | | id: 3, |
| | | }, |
| | | ]; |
| | | export const getDataByType = (type) => { |
| | | if (type == "purchaseStatus") { |
| | | return purchaseStatus |
| | |
| | | return inventoryValuation |
| | | } else if (type == "positionType") { |
| | | return positionType |
| | | }else if(type=='baseOperationTypeTwo'){ |
| | | return baseOperationTypeTwo |
| | | }else if(type=='purchaseType'){ |
| | | return purchaseType; |
| | | } |
| | | } |
| | |
| | | v-model="scope.row[item.prop]" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | filterable |
| | | style="width: 80%" |
| | | @change=" |
| | | (val) => { |
| | |
| | | v-model="locacionName" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | filterable |
| | | style="width: 80%" |
| | | @change=" |
| | | (val) => { |
| | |
| | | v-model="scope.row[item.prop]" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | filterable |
| | | style="width: 80%" |
| | | clearable |
| | | @clear="setValueNull(scope.row[item.prop])" |
| | |
| | | > |
| | | <div class="left"><i class="el-icon-present"></i></div> |
| | | <div class="right"> |
| | | <div class="right-label">{{ (countObject?.inLibrary ?? 0) + "件" }}</div> |
| | | <div class="right-label">{{ (countObject?.amount ?? 0) + "件" }}</div> |
| | | <div class="right-label">在库</div> |
| | | </div> |
| | | </div> |
| | | <div v-if="!showProduct && !showWarehouse && !showPosition && !addProduct" class="sub-number no-cursor"> |
| | | <div class="left"><i class="el-icon-present"></i></div> |
| | | <div class="right"> |
| | | <div class="right-label">{{ (countObject?.forecast ?? 0) + "件" }}</div> |
| | | <div class="right-label">{{ (countObject?.predictionAmount ?? 0) + "件" }}</div> |
| | | <div class="right-label">预测</div> |
| | | </div> |
| | | </div> |
| | |
| | | > |
| | | <div class="left icon-view"><i class="el-icon-sort"></i></div> |
| | | <div class="right"> |
| | | <div class="right-label">{{ "进: " + (countObject?.enter ?? 0) }}</div> |
| | | <div class="right-label">{{ "出: " + (countObject?.exit ?? 0) }}</div> |
| | | <div class="right-label">{{ "进: " + (countObject?.inputAmount ?? 0) }}</div> |
| | | <div class="right-label">{{ "出: " + (countObject?.outputAmount ?? 0) }}</div> |
| | | </div> |
| | | </div> |
| | | <!-- <div |
| | |
| | | > |
| | | <div class="left"><i class="el-icon-refresh"></i></div> |
| | | <div class="right"> |
| | | <div class="right-label">{{ countObject?.reorderRule ?? 0 }}</div> |
| | | <div class="right-label">重订货规则</div> |
| | | <template v-if="countObject?.reorderRuleNum== 1"> |
| | | <div class="right-label">最小:{{ countObject?.minInventoryRule ?? 0 }}</div> |
| | | <div class="right-label">最大:{{ countObject?.maxInventoryRule ?? 0 }}</div> |
| | | </template> |
| | | <template v-else> |
| | | <div class="right-label">{{ countObject?.reorderRuleNum ?? 0 }}</div> |
| | | <div class="right-label">重订货规则</div> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | <div v-if="showProduct" class="sub-number left_border yes-cursor" @click="productClick"> |
| | | <div class="left"><i class="el-icon-s-fold"></i></div> |
| | | <div class="right"> |
| | | <div class="right-label">{{ countObject?.product ?? 0 }}</div> |
| | | <div class="right-label">{{ countObject?.reorderRuleNum ?? 0 }}</div> |
| | | <div class="right-label">产品</div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="right-label">已售</div> |
| | | </div> |
| | | </div> --> |
| | | <div v-if="showPosition" class="sub-number no-cursor"> |
| | | <div v-if="showPosition" :class="showPositionCursor?'sub-number yes-cursor':'no-cursor sub-number'" @click="positionReport"> |
| | | <div class="left"><i class="el-icon-help"></i></div> |
| | | <div class="right"> |
| | | <div class="right-one">当前库存</div> |
| | |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | showPositionCursor:{ |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | countObject: { |
| | | type: Object, |
| | | default: () => { |
| | |
| | | return {} |
| | | }, |
| | | methods: { |
| | | positionReport(){ |
| | | this.$emit("positionReport") |
| | | }, |
| | | // 进出 |
| | | inOutBoundClick() { |
| | | this.$emit("inOutBoundClick") |
| | |
| | | padding: 0px 10px; |
| | | font-size: 13px; |
| | | .sub-number { |
| | | width: 12.5%; |
| | | width: 13%; |
| | | border-right: 1px solid #e9e9e9; |
| | | border-top: 1px solid #e9e9e9; |
| | | border-bottom: 1px solid #e9e9e9; |
| | | display: flex; |
| | | padding: 3px 9px; |
| | | padding: 3px 5px; |
| | | .left { |
| | | margin-top: 3px; |
| | | font-size: 22px; |
New file |
| | |
| | | |
| | | import { getCodeStandardList,getAutoCode } from "@/api/common/standard" |
| | | export default { |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | // 编码 |
| | | // 是否自动生成 |
| | | isIdDisabled: false, |
| | | inputValue: [], |
| | | explain: "", |
| | | codenumer: 0, //每次输入的编码 |
| | | codenumberList: [], //整条编码 |
| | | sum: 0, |
| | | method: 0, |
| | | objCode: { name: "", page: 0, pageSize: 0, type: "物料编码", codeStandID: "" }, |
| | | codeRule: {}, |
| | | codeLength: 0, |
| | | autoCodeObj: {} |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | async getRCodeStandardList() { |
| | | try { |
| | | if (this.editConfig.title == "新建") { |
| | | const res = await getCodeStandardList(this.objCode) |
| | | this.codenumer = [] |
| | | this.sum = 0 |
| | | this.explain = "" |
| | | this.codeLength = 0; |
| | | if (res.code == 200) { |
| | | const { List = [], ID, AutoRule = {}, Method } = res.data ? res.data[0] : [] |
| | | this.codeRule = res.data ? res.data[0] : {} |
| | | let autoRule = AutoRule |
| | | let method = Method ? Method : 0 |
| | | this.method = method |
| | | let rules = List |
| | | this.editConfig.infomation.ID = ID |
| | | if (method == 0 && res.data.data.length > 0) { |
| | | console.log("sss") |
| | | rules.forEach((item, index) => { |
| | | // setTimeout(() => { |
| | | // this.codenumer = item.length; |
| | | // this.sum++; |
| | | // }, 200); |
| | | this.codenumer.push(item.Length) |
| | | this.codeLength += item.Length; |
| | | this.sum++ |
| | | this.explain += item.Name + (index === rules.Length - 1 ? "" : "/") |
| | | }) |
| | | } |
| | | console.log(method) |
| | | if (method == 1) { |
| | | if (Object.keys(autoRule).length > 0) { |
| | | this.isIdDisabled = true |
| | | if (autoRule.PrefixMethod == 1) { |
| | | let prefix = autoRule.PrefixValue.split("").length |
| | | |
| | | this.codenumer.push(prefix) |
| | | this.codeLength += prefix; |
| | | if (autoRule.SuffixMethod == 2) { |
| | | this.codenumer.push(8) |
| | | this.codeLength += 8; |
| | | } |
| | | if (autoRule.AutoLength) { |
| | | this.codenumer.push(autoRule.AutoLength) |
| | | this.codeLength += autoRule.AutoLength; |
| | | } |
| | | this.sum = prefix + Number(autoRule.AutoLength) |
| | | // this.codeList( |
| | | // this.editConfig.infomation.id ? this.editConfig.infomation.id : autoRule.PrefixValue |
| | | // ) |
| | | } |
| | | } |
| | | } |
| | | |
| | | this.$forceUpdate() |
| | | } else { |
| | | this.$message.error(res.data.msg ? res.data.msg : "获取编码规范失败,请重试!") |
| | | } |
| | | this.getAutoCodeValue() |
| | | } else { |
| | | this.codeList(this.editConfig.infomation.id) |
| | | } |
| | | } catch (err) { |
| | | console.log(err) |
| | | } |
| | | }, |
| | | async getAutoCodeValue() { |
| | | if(Object.keys(this.codeRule).length>0){ |
| | | const res = await getAutoCode(this.codeRule); |
| | | if (res.code == 200) { |
| | | let p={ |
| | | id:'', |
| | | codeStandardID:'', |
| | | maxAutoIncr:'' |
| | | } |
| | | this.autoCodeObj = res.data?res.data:p; |
| | | this.$set(this.editConfig.infomation, 'id', this.autoCodeObj.id) |
| | | }else{ |
| | | this.$set(this.editConfig.infomation, 'id', this.codeRule.AutoRule.PrefixValue?this.codeRule.AutoRule.PrefixValue:'') |
| | | } |
| | | } |
| | | |
| | | }, |
| | | codeList(val) { |
| | | this.inputValue = val |
| | | this.codenumberList = val.toString() |
| | | this.editConfig.infomation.number = this.codenumberList.length > 0 ? this.codenumberList.replace(/,/g, "") : "" |
| | | console.log(this.codenumberList.replace(/,/g, "")) |
| | | }, |
| | | // 订单编码单独校验 |
| | | validateCheckCode(rule, value, callback) { |
| | | if (value && value.length > 0) { |
| | | if (this.editConfig.title == "新建") { |
| | | if (value.length != this.codeLength) { |
| | | callback(new Error("请填写" + this.codeLength + "位的编码!")); |
| | | } |
| | | } |
| | | callback(); |
| | | } else { |
| | | callback(new Error("请输入编码")); |
| | | } |
| | | }, |
| | | // 配置编码规范的跳转 |
| | | numberClick() { |
| | | window.open("http://www.fai365.com:9080/facilty", "_blank") |
| | | } |
| | | } |
| | | } |
| | |
| | | style="width: 85%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" prop="id"> |
| | | <el-input |
| | | style="width: 85%" |
| | | v-if=" |
| | | editConfig.title == '编辑' || |
| | | (editConfig.title == '新建' && codenumer && (explain != '' || isIdDisabled)) |
| | | " |
| | | :disabled="editConfig.title != '新建'" |
| | | v-model="editConfig.infomation.id" |
| | | placeholder="请输入编码" |
| | | > |
| | | </el-input> |
| | | <span v-else-if="editConfig.title == '新建'" style="color: #f56c6c; width: 85%" |
| | | >请优先配置编码规范 <el-button type="text" @click="numberClick"> 配置规范 </el-button></span |
| | | > |
| | | </el-form-item> |
| | | <el-form-item label="产品规格" prop="specs"> |
| | | <el-input |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | v-model="editConfig.infomation.specs" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="产品类型" prop="productType"> |
| | | <el-select |
| | | v-model="editConfig.infomation.productType" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="产品型号" prop="type"> |
| | | <el-input |
| | | style="width: 85%" |
| | | :disabled="!showFooter" |
| | | v-model="editConfig.infomation.type" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="采购类型" prop="purchaseType"> |
| | | <el-radio-group :disabled="!showFooter" v-model="editConfig.infomation.purchaseType"> |
| | | <el-radio v-for="item in purchaseTypeList" :key="item.id" :label="item.id">{{ |
| | | item.name |
| | | }}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="内部编码" prop="internalReference"> |
| | | <el-input |
| | | v-model.trim="editConfig.infomation.internalReference" |
| | |
| | | </div> |
| | | <div class="all"> |
| | | <!-- <div class="second-label">备注</div> --> |
| | | <el-form-item label="备注" prop="internalNotes"> |
| | | <el-form-item label="备注" prop="note"> |
| | | <el-input |
| | | v-model.trim="editConfig.infomation.internalNotes" |
| | | v-model.trim="editConfig.infomation.note" |
| | | placeholder="请输入" |
| | | size="mini" |
| | | type="textarea" |
| | |
| | | import { getProductCategoryList } from "@/api/product/productCategory" |
| | | import { getProductList, addProduct, updateProduct } from "@/api/product/product" |
| | | import { uploadFiles } from "@/api/common/other" |
| | | |
| | | import codeMixin from "@/components/mixin/codeMixin" |
| | | import { getDataByType } from "@/api/data" |
| | | export default { |
| | | mixins: [codeMixin], |
| | | name: "AddProductDialog", |
| | | props: { |
| | | editCommonConfig: { |
| | |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | name: [{ required: true, message: "请输入产品名称", trigger: "blur" }], |
| | | id: [{ required: true, validator: this.validateCheckCode, trigger: ["change", "blur"] }], |
| | | model: [{ required: true, message: "请选择物料类型", trigger: "change" }], |
| | | // salePrice: [{ required: true, message: "请输入销售价格", trigger: "blur" }], |
| | | unit: [{ required: true, message: "请输入单位", trigger: "blur" }] |
| | | unit: [{ required: true, message: "请输入单位", trigger: ["change", "blur"] }], |
| | | // 采购类型 |
| | | purchaseType: [{ required: true, message: "请选择", trigger: "blur" }] |
| | | }, |
| | | memberOptions: [{ name: "管理员", id: 1 }], |
| | | productCategoryOptions: [], // 产品类别 |
| | |
| | | { name: "其他", id: "其他" } |
| | | ], |
| | | statisticsMap: { |
| | | inLibrary: 0 // 在库 |
| | | amount: this.editCommonConfig.infomation.amount ? this.editCommonConfig.infomation.amount : 0, // 在库 |
| | | predictionAmount: this.editCommonConfig.infomation.predictionAmount |
| | | ? this.editCommonConfig.infomation.predictionAmount |
| | | : 0, //预测 |
| | | inputAmount: this.editCommonConfig.infomation.inputAmount ? this.editCommonConfig.infomation.inputAmount : 0, //进 |
| | | outputAmount: this.editCommonConfig.infomation.outputAmount ? this.editCommonConfig.infomation.outputAmount : 0, //出 |
| | | reorderRuleNum: this.editCommonConfig.infomation.reorderRuleNum |
| | | ? this.editCommonConfig.infomation.reorderRuleNum |
| | | : 0, //重订货规则数量 |
| | | minInventoryRule: this.editCommonConfig.infomation.minInventoryRule |
| | | ? this.editCommonConfig.infomation.minInventoryRule |
| | | : 0, //最小重订货 |
| | | maxInventoryRule: this.editCommonConfig.infomation.maxInventoryRule |
| | | ? this.editCommonConfig.infomation.maxInventoryRule |
| | | : 0 //最大重订货 |
| | | }, |
| | | isView: false, |
| | | fileFormdata: null // 上传图片入参 |
| | | fileFormdata: null, // 上传图片入参 |
| | | purchaseTypeList: getDataByType("purchaseType") |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.setTableForm() |
| | | this.setBottonView() |
| | | this.statisticsMap.inLibrary = this.editConfig?.infomation?.amount ?? 0 |
| | | // 进出口的产品 数量 还没有 |
| | | this.statisticsMap.enter = this.editConfig?.infomation?.amount ?? 0 |
| | | this.statisticsMap.exit = this.editConfig?.infomation?.amount ?? 0 |
| | | if (this.editConfig.autoEdit) { |
| | | this.editClick() |
| | | } |
| | | this.setOptionalFieldsToEmpty() |
| | | this.formInfo() |
| | | }, |
| | | methods: { |
| | | formInfo() { |
| | | this.objCode.type = "物料编码" |
| | | this.objCode.codeStandID = "" |
| | | if (this.editConfig.infomation.codeStandardID) { |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandardID |
| | | } |
| | | this.getRCodeStandardList() |
| | | }, |
| | | /** |
| | | * 非必填项后端返回的是数字 0,表单需要空串才能视为未选择回显 |
| | | */ |
| | |
| | | this.showEdit = false |
| | | this.showButton = false |
| | | this.showFooter = true |
| | | this.isView = false |
| | | this.setTableForm() |
| | | }, |
| | | // 保存 |
| | |
| | | saveEditRequest(attachmentIDs) { |
| | | let requestUrl = this.editConfig.title === "新建" ? addProduct : updateProduct |
| | | this.unsetFieldsToNumber() |
| | | requestUrl({ |
| | | let params = { |
| | | ...this.editConfig.infomation, |
| | | attachmentIDs |
| | | }).then((res) => { |
| | | } |
| | | if (this.editConfig.title == "新建") { |
| | | params.codeStandardID = this.autoCodeObj.codeStandardID |
| | | params.autoIncr = this.autoCodeObj.maxAutoIncr |
| | | } |
| | | requestUrl(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$message.success(this.editConfig.title === "新建" ? "添加" : "编辑" + "成功!") |
| | | this.$parent.getData() |
| | | } |
| | | }, console.error) |
| | |
| | | fileName: "" |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log(this.imageUrl) |
| | | if (!this.isView && this.imageUrl?.length > 0) { |
| | | this.isPreview = true |
| | | this.previewImg = this.imageUrl |
| | | } else { |
| | | this.isPreview = false |
| | | computed: { |
| | | myIsView() { |
| | | return this.isView |
| | | } |
| | | }, |
| | | watch: { |
| | | myIsView() { |
| | | this.setImgMethods() |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log(this.imageUrl) |
| | | this.setImgMethods() |
| | | }, |
| | | methods: { |
| | | // 设置上传/更换图片显示方法 |
| | | setImgMethods() { |
| | | if (!this.isView && this.imageUrl?.length > 0) { |
| | | this.isPreview = true |
| | | this.previewImg = this.imageUrl |
| | | } else { |
| | | this.isPreview = false |
| | | } |
| | | }, |
| | | // 上传按钮 限制图片大小和类型 |
| | | handleChangeUpload(file, fileList) { |
| | | const isJPG = file.raw.type === "image/jpeg" || file.raw.type === "image/png" |
| | |
| | | } |
| | | return { |
| | | ...item, |
| | | productName: item.product.name, |
| | | productName: { label: item.product.name, value: item.product.id }, |
| | | locationName: item.location.name, |
| | | isSet: false, |
| | | isEdit: true, |
| | |
| | | // import { getProductOperatonList } from "@/api/product/product" |
| | | |
| | | import AddOverviewDialog from "@/views/overview/AddOverviewDialog" |
| | | |
| | | import { getDataByType } from "@/api/data" |
| | | export default { |
| | | name: "InboundOutboundDetail", |
| | | props: {}, |
| | |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | params: {} |
| | | params: {}, |
| | | baseOperationTypeList:getDataByType("baseOperationTypeTwo"), |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | sessionStorage.setItem("paramsList", JSON.stringify(params)) |
| | | } |
| | | this.params = params |
| | | console.log(this.params) |
| | | console.log(this.params,'====111') |
| | | this.getData() |
| | | }, |
| | | // 页面销毁之前 |
| | |
| | | label: "业务类型", |
| | | prop: "baseOperationType", |
| | | isShowColumn: true, |
| | | default: true |
| | | default: true, |
| | | conversion: true, |
| | | getStatus: this.getBaseOperationTypeList |
| | | }, |
| | | { |
| | | label: "从", |
| | |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setTableColumn(val) |
| | | }, |
| | | getBaseOperationTypeList(val){ |
| | | let string = "--" |
| | | if (val) { |
| | | for (let i in this.baseOperationTypeList) { |
| | | if (this.baseOperationTypeList[i].id == val) { |
| | | return this.baseOperationTypeList[i].name |
| | | } |
| | | } |
| | | } |
| | | return string |
| | | }, |
| | | // 库存报表跳转请求数据 |
| | | async getData() { |
| | | if (this.params.name === "报表") { |
| | |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | // let arr=[] |
| | | res.data.map((item)=>{ |
| | | if(item.baseOperationType===1){ |
| | | item.baseOperationType="收货" |
| | | }else if(item.baseOperationType===2){ |
| | | item.baseOperationType="交货" |
| | | }else if(item.baseOperationType===3){ |
| | | item.baseOperationType="内部调拨" |
| | | }else if(item.baseOperationType===4){ |
| | | item.baseOperationType="报废" |
| | | }else if(item.baseOperationType===5){ |
| | | item.baseOperationType="库存盘点" |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = res.data |
| | | this.tableList.tableInfomation = res.data?res.data:[] |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | |
| | | }, |
| | | // 搜索 |
| | | getList(val) { |
| | | console.log(val) |
| | | this.params.keyWord=val; |
| | | this.getData() |
| | | // getHistory({ |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize |
| | |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | | console.log(row, "行row") |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "查看" |
| | | this.editConfig.infomation = { ...row } |
| | |
| | | }, |
| | | productId: this.$route.params.id, |
| | | productName: this.$route.params.name, |
| | | metaTitle: this.$route.meta.title |
| | | metaTitle: this.$route.meta.title, |
| | | keyWord:'' |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | }else{ |
| | | this.getLocationData({ |
| | | let params={ |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | pageSize: this.pagerOptions.pageSize, |
| | | keyWord:this.keyWord, |
| | | } |
| | | if(this.$route.params.locationId){ |
| | | params.locationId=this.$route.params.locationId |
| | | } |
| | | this.getLocationData(params) |
| | | } |
| | | }, |
| | | |
| | | // 搜索 |
| | | getList(val) { |
| | | this.getLocationData({ |
| | | page: 1, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | keyWord: val |
| | | }) |
| | | this.keyWord=val |
| | | this.getData() |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | |
| | | <span>动作</span> |
| | | <!-- <el-button plain size="mini" style="margin-left: 15px" @click="deleteClick">删除</el-button> --> |
| | | </span> |
| | | <el-button v-if="showEdit&&editConfig.infomation.type==3" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button> |
| | | <el-button |
| | | v-if="showEdit && editConfig.infomation.type == 3" |
| | | plain |
| | | size="mini" |
| | | style="margin-left: 15px" |
| | | @click="editClick" |
| | | >编辑</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | <!-- 内容 --> |
| | |
| | | size="mini" |
| | | > |
| | | <div class="content-number-bg"> |
| | | <FormBtnsView :showPosition="true" :showWarehouse="false" @productClick="productClick" /> |
| | | <FormBtnsView :showPosition="true" :showPositionCursor="this.editConfig.title != '新建'?true:false" @positionReport="positionReport" :showWarehouse="false" @productClick="productClick" /> |
| | | </div> |
| | | <div class="basic-info"> |
| | | <div class="basic-info-view"> |
| | |
| | | v-model="editConfig.infomation.parentId" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | :disabled="editCommonConfig.title!='新建'" |
| | | :disabled="editCommonConfig.title != '新建'" |
| | | style="width: 90%" |
| | | > |
| | | <el-option v-for="item in positionList" :key="item.id" :label="item.jointName" :value="item.id"> |
| | |
| | | <el-select |
| | | v-model="editConfig.infomation.type" |
| | | filterable |
| | | :disabled="editCommonConfig.title!='新建'" |
| | | :disabled="editCommonConfig.title != '新建'" |
| | | placeholder="请选择" |
| | | style="width: 90%" |
| | | no-data-text="暂无数据" |
| | |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | name: [{ required: true, message: "请输入", trigger: "change" }], |
| | | parentId: [{ required: true, message: "请选择位置类型", trigger: "change" }], |
| | | // parentId: [{ required: true, message: "请选择位置类型", trigger: "change" }], |
| | | type: [{ required: true, message: "请选择上级位置", trigger: "change" }], |
| | | countFrequency: [ |
| | | { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.editConfig.infomation) |
| | | this.setBottonView() |
| | | }, |
| | | methods: { |
| | |
| | | callback() |
| | | } |
| | | }, |
| | | // 当前库存 |
| | | positionReport(){ |
| | | if(this.editConfig.title != '新建'){ |
| | | this.$router.push({ |
| | | name: "locationReport", |
| | | params: { |
| | | locationId: this.editConfig.infomation.id |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 路线 |
| | | productClick() {}, |
| | | // 设置删除/打印/编辑是否显示 |
| | | setBottonView() { |
| | | if (this.editConfig.title === "新建"||this.editConfig.title === "编辑") { |
| | | if (this.editConfig.title === "新建" || this.editConfig.title === "编辑") { |
| | | this.showEdit = false |
| | | this.showFooter = true |
| | | } else if (this.editConfig.infomation.status === "完成") { |
| | |
| | | notes: data.notes |
| | | } |
| | | if (data.id) { |
| | | params.id = data.id; |
| | | params.jointName=data.jointName; |
| | | params.id = data.id |
| | | params.jointName = data.jointName |
| | | } |
| | | return params |
| | | }, |
| | |
| | | }, |
| | | // 请求数据 |
| | | async getData() { |
| | | await getLocationList({ |
| | | let params={ |
| | | type: this.type, |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | pageSize: this.pagerOptions.pageSize, |
| | | } |
| | | await getLocationList(params).then((res) => { |
| | | if (res.code === 200) { |
| | | const list = res.data ? res.data : [] |
| | | this.tableList.tableInfomation = list |