| | |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | | </div> |
| | | </div> |
| | | <!-- 编辑 --> |
| | | <AddOverviewDialog v-if="editConfig.visible" :edit-common-config="editConfig" :add-name="this.$route.params.name" /> |
| | | <!-- 查看/编辑 --> |
| | | <AddOverviewDialog |
| | | v-if="editConfig.visible" |
| | | :edit-common-config="editConfig" |
| | | :add-name="this.$route.params.name" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | res.data.map((item)=>{ |
| | | if(item.status===""){ |
| | | item.status=4 |
| | | } |
| | | let dateObject = new Date(item.date); |
| | | let formattedDateString = dateObject.toISOString().split('T')[0]; |
| | | item.date=formattedDateString |
| | |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成" |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : val===4?"完成":val===5?"已取消":" " |
| | | } |
| | | } |
| | | } |
| | |
| | | <div slot="title" class="dialog-header"> |
| | | <span>{{ editCommonConfig.title === "查看" ? editCommonConfig.title : editCommonConfig.title + addName }}</span> |
| | | <div class="header_btns"> |
| | | <span class="btn"> |
| | | <span class="btn" @click="btnPrint"> |
| | | <i class="el-icon-printer"></i> |
| | | <span>打印</span> |
| | | </span> |
| | |
| | | <i class="el-icon-s-tools"></i> |
| | | <span>动作</span> |
| | | </span> |
| | | <el-button v-if="showEdit" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button> |
| | | <el-button v-if="showEdit" :disabled="this.editConfig.infomation.status===5" plain size="mini" style="margin-left: 15px" @click="editClick">编辑</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- 内容 --> |
| | |
| | | :showButton="showButton" |
| | | :isValidateClick="isValidateClick" |
| | | :isDelClick="isDelClick" |
| | | :isCancel="isCancel" |
| | | :list="list" |
| | | :showCancel="showCancel" |
| | | @delClick="delClick" |
| | |
| | | stateCancel, |
| | | deleteOperation, |
| | | getListTransfer, |
| | | getLogisticCompanyList |
| | | getLogisticCompanyList, |
| | | printReceipts |
| | | } from "@/api/overview/overview" |
| | | import { getCompanyList } from "@/api/common/other" |
| | | export default { |
| | |
| | | companyOptions: [], // 公司 |
| | | memberOptions: [{ id: 1, name: "管理员" }], |
| | | toLocationOptions: [], // 源位置 仓库位置 |
| | | list: [ |
| | | { label: "草稿", status: "todo", value: 1 }, |
| | | { label: "正在等待", status: "todo", value: 2 }, |
| | | { label: "就绪", status: "todo", value: 3 }, |
| | | { label: "完成", status: "todo", value: 4 }, |
| | | { label: "已取消", status: "todo", value: 5 } |
| | | ], |
| | | showButton: true, |
| | | activeName: "first", |
| | | productTableList: {}, |
| | |
| | | isNoProduct: true, // 添加明细行时是否有产品未选择 |
| | | showEdit: false, // 是否显示编辑按钮 |
| | | isDelClick: false, // 删除按钮是否可点击 |
| | | isCancel:false, //验证按钮是否可点击 |
| | | showFooter: false, // 是否显示取消保存 |
| | | currentState: "todo", // 当前状态 |
| | | detailTableList: {}, |
| | |
| | | logisticWeight:0, |
| | | }, |
| | | showCancel:false, // 取消是否可以显示 |
| | | list:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.setStatusList() |
| | | this.setTableForm() |
| | | this.setBottonView() |
| | | this.setDetailTableForm() |
| | |
| | | this.getLogisticCompanyList() |
| | | }, |
| | | methods: { |
| | | setStatusList(){ |
| | | if(this.editConfig.infomation.status===5){ |
| | | this.list=[ |
| | | { label: "草稿", status: "todo", value: 1 }, |
| | | { label: "正在等待", status: "todo", value: 2 }, |
| | | { label: "就绪", status: "todo", value: 3 }, |
| | | { label: "完成", status: "todo", value: 4 }, |
| | | { label: "已取消", status: "todo", value: 5 } |
| | | ] |
| | | }else{ |
| | | console.log(this.editConfig.infomation.status,"藕片") |
| | | this.list=[ |
| | | { label: "草稿", status: "todo", value: 1 }, |
| | | { label: "正在等待", status: "todo", value: 2 }, |
| | | { label: "就绪", status: "todo", value: 3 }, |
| | | { label: "完成", status: "todo", value: 4 } |
| | | ] |
| | | } |
| | | }, |
| | | // 获取公司列表 |
| | | async getCompanyList() { |
| | | await getCompanyList().then((res) => { |
| | |
| | | }else if(this.editConfig.infomation.status === 3){ |
| | | this.isValidateClick = true |
| | | this.showCancel=true |
| | | }else if(this.editConfig.infomation.status===5){ |
| | | this.isCancel=true |
| | | this.isValidateClick=true |
| | | }else{ |
| | | this.isValidateClick = true |
| | | |
| | | } |
| | | } else if (this.editConfig.infomation.status === 4 || this.editConfig.infomation.status === "完成") { |
| | | this.showButton = true |
| | |
| | | this.showFooter = false |
| | | this.isValidateClick = false |
| | | } else if (this.editConfig.infomation.status === 5) { |
| | | this.isCancel=true |
| | | this.showButton = true |
| | | this.showEdit = false |
| | | this.showFooter = false |
| | |
| | | }) |
| | | }).catch(() => { |
| | | }); |
| | | }, |
| | | //打印 |
| | | async btnPrint(){ |
| | | await printReceipts(this.editCommonConfig.infomation.id).then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | this.$message.success("打印成功") |
| | | const link = document.createElement('a'); |
| | | link.href = res.data; |
| | | link.download = '出库单.xlsx'; |
| | | link.click(); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | |
| | | margin-left: auto; |
| | | margin-right: 60px; |
| | | .btn { |
| | | cursor: pointer; |
| | | } |
| | | .btn:nth-of-type(2){ |
| | | cursor: no-drop; |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="rightContent"> |
| | | <div class="top"> |
| | | <SearchCommonView |
| | | :add-title="'新建'" |
| | | :showAdd="false" |
| | | :placeholder="'请根据单号、产品、业务类型进行搜索'" |
| | | :amount-view="false" |
| | | @addCommonClick="addBtnClick" |
| | | @searchClick="getList" |
| | | /> |
| | | <SearchCommonView :add-title="'新建'" :showAdd="false" :placeholder="'请根据单号、产品、业务类型进行搜索'" :amount-view="false" |
| | | @addCommonClick="addBtnClick" @searchClick="getList" /> |
| | | </div> |
| | | <div class="list-view"> |
| | | <div class="table"> |
| | | <TableCommonView |
| | | ref="tableListRef" |
| | | :table-list="tableList" |
| | | @selTableCol="selTableCol" |
| | | @tableRowClick="tableRowClick" |
| | | ></TableCommonView> |
| | | <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol" |
| | | @tableRowClick="tableRowClick"></TableCommonView> |
| | | </div> |
| | | <div class="btn-pager"> |
| | | <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> |
| | |
| | | infomation: {} |
| | | }, |
| | | params: {}, |
| | | baseOperationTypeList:getDataByType("baseOperationTypeTwo"), |
| | | baseOperationTypeList: getDataByType("baseOperationTypeTwo"), |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | sessionStorage.setItem("paramsList", JSON.stringify(params)) |
| | | } |
| | | this.params = params |
| | | console.log(this.params,'====111') |
| | | this.getData() |
| | | }, |
| | | // 页面销毁之前 |
| | |
| | | this.showcol = val |
| | | this.tableList.tableColumn = this.setTableColumn(val) |
| | | }, |
| | | getBaseOperationTypeList(val){ |
| | | getBaseOperationTypeList(val) { |
| | | let string = "--" |
| | | if (val) { |
| | | for (let i in this.baseOperationTypeList) { |
| | |
| | | async getData() { |
| | | if (this.params.name === "报表") { |
| | | await getHistory({ |
| | | keyWord:this.params.keyWord, |
| | | produceId:this.params.produceId, |
| | | unit:this.params.unit, |
| | | productName:this.params.productName, |
| | | keyWord: this.params.keyWord, |
| | | produceId: this.params.produceId, |
| | | unit: this.params.unit, |
| | | productName: this.params.productName, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | res.data.map((item)=>{ |
| | | let dateObject = new Date(item.date); |
| | | let formattedDateString = dateObject.toISOString().split('T')[0]; |
| | | item.date=formattedDateString |
| | | res.data.map((item) => { |
| | | let dateObject = new Date(item.date); |
| | | let formattedDateString = dateObject.toISOString().split('T')[0]; |
| | | item.date = formattedDateString |
| | | }) |
| | | this.tableList.tableInfomation = res.data |
| | | this.pagerOptions.totalCount = res.total |
| | |
| | | }) |
| | | } else { |
| | | await getHistory({ |
| | | keyWord:this.params.keyWord, |
| | | baseOperationType:2, |
| | | keyWord: this.params.keyWord, |
| | | baseOperationType: 2, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | res.data.map((item)=>{ |
| | | let dateObject = new Date(item.date); |
| | | let formattedDateString = dateObject.toISOString().split('T')[0]; |
| | | item.date=formattedDateString |
| | | res.data.map((item) => { |
| | | if(item.status===""){ |
| | | item.status=4 |
| | | } |
| | | let dateObject = new Date(item.date); |
| | | let formattedDateString = dateObject.toISOString().split('T')[0]; |
| | | item.date = formattedDateString |
| | | }) |
| | | this.tableList.tableInfomation = res.data?res.data:[] |
| | | this.tableList.tableInfomation = res.data ? res.data : [] |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | |
| | | }, |
| | | // 搜索 |
| | | getList(val) { |
| | | this.params.keyWord=val; |
| | | this.params.keyWord = val; |
| | | this.getData() |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |
| | | console.log(row,"看看row") |
| | | console.log(row, "看看row") |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "查看" |
| | | this.editConfig.infomation = { ...row } |
| | |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : "完成" |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : val === 4 ? "完成" : val === 5 ? "已取消":"" |
| | | } |
| | | } |
| | | } |