发货列表、 发货准备列表、保存发货信息、全部发货完成等接口联调
| | |
| | | // 委外订单列表 |
| | | export const outsourceOrderList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/list", |
| | | url: "/api-outsourcing/v1/order/list", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 委外订单统计 |
| | | export const outsourceOrderOverview = () => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/overview", |
| | | url: "/api-outsourcing/v1/order/overview", |
| | | method: "get" |
| | | }) |
| | | } |
| | |
| | | // 委外订单产品列表 |
| | | export const outsourceOrderProductList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/productList", |
| | | url: "/api-outsourcing/v1/order/productList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | |
| | | // 委外企业供货历史 |
| | | export const outsourcenterpriseProductList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/enterprise/productList", |
| | | url: "/api-outsourcing/v1/enterprise/productList", |
| | | method: "get", |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | // // 委外供应商 |
| | | // export const orderAssign = (data) => { |
| | | // return request({ |
| | | // url: "/api-s/v1/outsourcing/order/assign", |
| | | // method: "post", |
| | | // data |
| | | // }) |
| | | // } |
| | | // 获取发货列表 |
| | | export const getDeliveryList = (data) => { |
| | | return request({ |
| | | url: "/api-outsourcing/v1/order/deliveryList", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 发货弹窗发货准备列表 |
| | | export const getDeliveryPrepare = (data) => { |
| | | return request({ |
| | | url: "/api-outsourcing/v1/order/deliveryPrepare?outsourcingOrderID=" + data.outsourcingOrderID, |
| | | method: "get", |
| | | data |
| | | }) |
| | | } |
| | | // 保存发货信息 |
| | | export const saveDelivery = (data) => { |
| | | return request({ |
| | | url: "/api-outsourcing/v1/order/saveDelivery", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 保存物料申请单 |
| | | export const saveMaterialApply = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/saveMaterialApply", |
| | | url: "/api-outsourcing/v1/order/saveMaterialApply", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 获取物料申请单 |
| | | export const getMaterialApplyList = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/getMaterialApplyList", |
| | | url: "/api-outsourcing/v1/order/getMaterialApplyList", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | // 修改状态 |
| | | export const changeOutsourceOrderStatus = (data) => { |
| | | return request({ |
| | | url: "/api-s/v1/outsourcing/order/changeStatus", |
| | | url: "/api-outsourcing/v1/order/changeStatus", |
| | | method: "post", |
| | | data |
| | | }) |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(localStorage, "dddd") |
| | | // console.log(localStorage, "dddd") |
| | | }, |
| | | mounted() { |
| | | // this.username = document.cookie.replace(/(?:(?:^|.*;\s*)username\s*=\s*([^;]*).*$)|^.*$/, "$1") |
| | | console.log(localStorage, "mounted") |
| | | console.log(localStorage) |
| | | // console.log(localStorage, "mounted") |
| | | // console.log(localStorage) |
| | | this.editConfig.userId = localStorage.getItem("uuid") |
| | | this.username = localStorage.getItem("username") |
| | | }, |
| | |
| | | style="width: 100%" |
| | | height="500" |
| | | border |
| | | @selection-change="getSelectArray" |
| | | :header-cell-style="{ |
| | | background: '#f1f3f8', |
| | | color: '#000009', |
| | |
| | | > |
| | | <!-- <el-table-column type="selection" width="55"> </el-table-column> --> |
| | | <el-table-column type="index" label="序号" width="50" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="产品名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="number" label="产品编号" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column prop="orderAmount" label="订单数量"> </el-table-column> |
| | | <el-table-column prop="amount" label="已发货数量"> </el-table-column> |
| | | <el-table-column prop="specifications" label="产品规格"> </el-table-column> |
| | | <el-table-column prop="modelNumber" label="产品型号"> </el-table-column> |
| | | <el-table-column prop="productName" label="产品名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="productId" label="产品编号" show-overflow-tooltip> </el-table-column> |
| | | <el-table-column prop="amount" label="订单数量"> </el-table-column> |
| | | <el-table-column prop="sendAmount" label="已发货数量"> </el-table-column> |
| | | <el-table-column prop="specs" label="产品规格"> </el-table-column> |
| | | <el-table-column prop="type" label="产品型号"> </el-table-column> |
| | | <el-table-column prop="unit" label="单位"> </el-table-column> |
| | | <el-table-column prop="deliveryAmount" label="发货数量"> |
| | | <template slot-scope="scope"> |
| | |
| | | <el-button @click="editRow.visible = false">关闭</el-button> |
| | | </template> |
| | | <template v-else> |
| | | <el-button type="primary" :loading="isAddloading" @click="saveClick('form')">全部发货完成</el-button> |
| | | <!-- <el-button type="primary" :loading="isAddloading" @click="deliveryCompleteClick()">全部发货完成</el-button> --> |
| | | <el-button @click="editRow.visible = false">取消</el-button> |
| | | <el-button type="primary" :loading="isAddloading" @click="saveClick('form')">确认发货</el-button> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDeliveryPrepare, saveDelivery, changeOutsourceOrderStatus } from "@/api/orderManageModule/orderManage" |
| | | export default { |
| | | name: "DeliveryDialog", |
| | | props: { |
| | |
| | | infomation: {} |
| | | }, |
| | | isAddloading: false, |
| | | tableData: [ |
| | | { |
| | | name: "顶顶顶顶", |
| | | deliveryAmount: 2 |
| | | } |
| | | ], |
| | | tableData: [], |
| | | ruleForm: { |
| | | number: "", |
| | | carrier: "", |
| | |
| | | }, |
| | | created() { |
| | | // this.setTableForm() |
| | | this.getDeliveryPrepare() |
| | | }, |
| | | watch: { |
| | | "editCommonConfig.visible"(val) { |
| | |
| | | handleClose() { |
| | | this.editRow.visible = false |
| | | }, |
| | | // 获取发货产品列表 |
| | | getDeliveryPrepare() { |
| | | getDeliveryPrepare({ |
| | | outsourcingOrderID: this.editRow.infomation.id |
| | | }).then((res) => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | let list = res.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | deliveryAmount: 0 |
| | | } |
| | | }) |
| | | this.tableData = list |
| | | } |
| | | }) |
| | | }, |
| | | // 多选回调 |
| | | getSelectArray(arr) { |
| | | console.log(arr) |
| | | // let isPush = true |
| | | // if (arr.length > 0) { |
| | | // for (let i in arr) { |
| | | // let item = { |
| | | // outsourcingOrderNumber: this.editRow.infomation.outsourcingOrderNumber, |
| | | // materialNumber: arr[i].id, |
| | | // materialName: arr[i].name, |
| | | // amount: 1, |
| | | // unit: arr[i].unit ? arr[i].unit : 1, |
| | | // type: arr[i].type ? arr[i].type : "", |
| | | // specs: arr[i].specs ? arr[i].specs : "" |
| | | // } |
| | | // console.log(arr, "8989") |
| | | // isPush = this.getIsPush(this.productTableList.tableInfomation, arr[i].id) |
| | | // if (isPush) { |
| | | // this.productTableList.tableInfomation.splice(this.productTableList.tableInfomation.length, 0, item) |
| | | // } |
| | | // } |
| | | }, |
| | | // 数量输入回调 |
| | | inputContent(val, scope) { |
| | |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log("保存内容处理") |
| | | console.log(this.ruleForm, "保存内容处理", this.tableData) |
| | | let deliveryList = this.tableData.map((item) => { |
| | | return { |
| | | outsourcingOrderProductID: item.id, |
| | | sendAmount: item.deliveryAmount |
| | | } |
| | | }) |
| | | let params = { |
| | | carrier: this.ruleForm.carrier, |
| | | deliveryList: deliveryList, |
| | | number: this.ruleForm.number, |
| | | outsourcingOrderID: this.editRow.infomation.id, |
| | | waybillNumber: this.ruleForm.waybillNumber |
| | | } |
| | | saveDelivery(params).then((res) => { |
| | | if (res.code == 200) { |
| | | this.handleClose() |
| | | this.$message.success("发货成功") |
| | | this.$emit("reRreshData") |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 全部发货完成 |
| | | deliveryCompleteClick() { |
| | | this.$confirm("是否确认全部发货完成?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | changeOutsourceOrderStatus({ |
| | | outsourcingOrderNumber: this.editRow.infomation.number, |
| | | status: 7 |
| | | }) |
| | | .then((reply) => { |
| | | if (reply.code == 200) { |
| | | this.handleClose() |
| | | this.$message.success("全部发货完成成功") |
| | | this.$emit("reRreshData") |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | :otherOptions="otherOptions" |
| | | :show-action-btn="false" |
| | | :placeholder="'请输入订单编号'" |
| | | @searchClick="onFilterSearch" |
| | | @searchClick="searchClick" |
| | | /> |
| | | </div> |
| | | </div> |
| | |
| | | <el-table-column label="操作" width="160" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <template v-if="scope.row.status == 1"> |
| | | <el-button type="text" size="small">确认</el-button> |
| | | <el-button type="text" size="small">取消</el-button> |
| | | <el-button type="text" size="small" @click.stop="changeStatusClick(scope.row, '确认')" |
| | | >确认</el-button |
| | | > |
| | | <el-button type="text" size="small" @click.stop="changeStatusClick(scope.row, '取消')" |
| | | >取消</el-button |
| | | > |
| | | </template> |
| | | <el-button |
| | | v-else-if="scope.row.status == 2 || scope.row.status == 4" |
| | |
| | | >申请物料</el-button |
| | | > |
| | | <template v-else-if="scope.row.status == 5"> |
| | | <el-button type="text" size="small">生产完成</el-button> |
| | | <el-button type="text" size="small" @click.stop="changeStatusClick(scope.row, '生产完成')" |
| | | >生产完成</el-button |
| | | > |
| | | <el-button type="text" size="small" @click.stop="deliveryClick(scope.row)">发货</el-button> |
| | | </template> |
| | | <template v-else-if="scope.row.status == 6"> |
| | | <el-button type="text" size="small" @click.stop="deliveryClick(scope.row)">发货</el-button> |
| | | <el-button type="text" size="small">关闭</el-button> |
| | | <el-button type="text" size="small" @click.stop="changeStatusClick(scope.row, '发货完成')" |
| | | >发货完成</el-button |
| | | > |
| | | </template> |
| | | <span v-else>--</span> |
| | | </template> |
| | |
| | | outsourceOrderList, |
| | | outsourceOrderOverview, |
| | | outsourceOrderProductList, |
| | | getMaterialApplyList |
| | | // changeOutsourceOrderStatus |
| | | getMaterialApplyList, |
| | | getDeliveryList, |
| | | changeOutsourceOrderStatus |
| | | } from "@/api/orderManageModule/orderManage" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import ApplyMaterialsDialog from "@/views/orderManageModule/orderManage/components/ApplyMaterialsDialog" |
| | |
| | | { label: "产品名称", prop: "productName", default: true }, |
| | | { label: "产品编号", prop: "productId" }, |
| | | { label: "订单数量", prop: "amount" }, |
| | | { label: "发货数量", prop: "validity_date" }, |
| | | { label: "发货数量", prop: "sendAmount" }, |
| | | { label: "产品规格", prop: "specs" }, |
| | | { label: "产品型号", prop: "model" }, |
| | | { label: "产品型号", prop: "type" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "运单号", prop: "validity_date" }, |
| | | { label: "承运商", prop: "validity_date" }, |
| | | { label: "创建时间", prop: "client_name", min: 100 } |
| | | { label: "运单号", prop: "waybillNumber" }, |
| | | { label: "承运商", prop: "carrier" }, |
| | | { label: "创建时间", prop: "createdAt", min: 100 } |
| | | ], |
| | | showDeliveryRquestCol: [ |
| | | "发货单号", |
| | |
| | | }, |
| | | // 获取物料申请单 |
| | | getMaterialApplyList(number) { |
| | | getMaterialApplyList({ number: number, page: 1, pageSize: 15 }).then((res) => { |
| | | getMaterialApplyList({ number: number }).then((res) => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | this.bottomTwoTableList2.tableInfomation = res.data |
| | | } |
| | | }) |
| | | }, |
| | | // 获取发货列表 |
| | | getDeliveryList(id) { |
| | | getDeliveryList({ outsourcingOrderID: id }).then((res) => { |
| | | console.log(res) |
| | | if (res.code == 200) { |
| | | let list = res.data.map((item) => { |
| | | return { |
| | | number: item.outsourcingOrderDelivery.number, |
| | | productName: item.outsourcingOrderProduct.productName, |
| | | productId: item.outsourcingOrderProduct.productId, |
| | | amount: item.outsourcingOrderProduct.amount, |
| | | sendAmount: item.sendAmount, |
| | | type: item.outsourcingOrderProduct.type, |
| | | unit: item.outsourcingOrderProduct.unit, |
| | | waybillNumber: item.outsourcingOrderDelivery.waybillNumber, |
| | | carrier: item.outsourcingOrderDelivery.carrier, |
| | | createdAt: item.createdAt |
| | | } |
| | | }) |
| | | this.bottomTwoTableList3.tableInfomation = list |
| | | } |
| | | }) |
| | | }, |
| | |
| | | addCommonClick() { |
| | | alert("露西666") |
| | | }, |
| | | searchClick() {}, |
| | | onFilterSearch() {}, |
| | | searchClick(val) { |
| | | this.searchParam.keyword = val |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | | tableRowClick(row, column, event) { |
| | | console.log(row, column, event) |
| | | this.selectRow = row |
| | | if (this.activeNameBottom == 1) { |
| | | this.getProductListMethod(this.selectRow.id) |
| | | } else { |
| | | } else if (this.activeNameBottom == 2) { |
| | | this.getMaterialApplyList(this.selectRow.number) |
| | | } else { |
| | | this.getDeliveryList(this.selectRow.id) |
| | | } |
| | | }, |
| | | tableRowClassName({ row }) { |
| | |
| | | } |
| | | }, |
| | | getSelectArray() {}, |
| | | // 状态修改 |
| | | changeStatusClick(row, val) { |
| | | if (val == "确认") { |
| | | this.changeOutsourceOrderStatus(row.number, 2, "确认成功") |
| | | } else if (val == "取消") { |
| | | this.changeOutsourceOrderStatus(row.number, 0, "取消成功") |
| | | } else if (val == "生产完成") { |
| | | this.$confirm("是否确认生产完成?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.changeOutsourceOrderStatus(row.number, 6, "生产完成成功") |
| | | }) |
| | | } else if (val == "发货完成") { |
| | | this.$confirm("是否确认全部发货完成?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.changeOutsourceOrderStatus(row.number, 7, "全部发货完成成功") |
| | | }) |
| | | } |
| | | }, |
| | | changeOutsourceOrderStatus(number, status, str) { |
| | | changeOutsourceOrderStatus({ |
| | | outsourcingOrderNumber: number, |
| | | status: status |
| | | }) |
| | | .then((reply) => { |
| | | if (reply.code == 200) { |
| | | this.getData() |
| | | this.$message.success(str) |
| | | } |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | // 申请物料 |
| | | applyClick(row) { |
| | | this.editApplyConfig.visible = true |
| | |
| | | this.deliveryConfig.visible = true |
| | | this.deliveryConfig.title = "发货" |
| | | this.deliveryConfig.infomation = { |
| | | outsourcingOrderNumber: row.number |
| | | id: row.id, |
| | | number: row.number |
| | | } |
| | | }, |
| | | tabClickBottom(activeNameBottom) { |
| | | this.activeNameBottom = activeNameBottom |
| | | if (activeNameBottom == 1) { |
| | | this.getProductListMethod(this.selectRow.id) |
| | | } else { |
| | | } else if (activeNameBottom == 2) { |
| | | this.getMaterialApplyList(this.selectRow.number) |
| | | } else { |
| | | this.getDeliveryList(this.selectRow.id) |
| | | } |
| | | }, |
| | | setTable() { |
| | |
| | | ? "生产中" |
| | | : val === 6 |
| | | ? "生产完成" |
| | | : val === 7 |
| | | ? "发货完成" |
| | | : "--" |
| | | } |
| | | } |
| | |
| | | // ws: true, |
| | | // changeOrigin: true |
| | | // }, |
| | | "/api-s": { |
| | | target: "http://192.168.20.119:9081", |
| | | "/api-outsourcing": { |
| | | target: "http://192.168.20.120:8008", |
| | | ws: true, |
| | | changeOrigin: true |
| | | }, |