| | |
| | | }, |
| | | commoInput() {}, |
| | | selClient(item) { |
| | | let list = this.tableList.tableData.map((item) => item.number) |
| | | if (list.findIndex((v) => v == item.number) == -1) { |
| | | let list = this.tableList.tableData.map((item) => item.id) |
| | | if (list.findIndex((v) => v == item.id) == -1) { |
| | | this.isRecalculate = true |
| | | // this.editConfig.infomation.client_name = row.name |
| | | this.tableList.tableData.map((ite, index) => { |
| | | if (index === this.productIndex) { |
| | | ite.productName = item.name |
| | | ite.productId = item.id |
| | | ite.name = item.name |
| | | ite.amount = item.amount || 1 |
| | | ite.number = item.number |
| | | ite.price = item.price |
| | | ite.total = item.amount ? item.amount * item.price : 1 * item.price |
| | | ite.amount = 1 |
| | | ite.number = item.id |
| | | ite.specs = item.specs |
| | | ite.model = item.model |
| | | // ite.price = item.price |
| | | // ite.total = item.amount ? item.amount * item.price : 1 * item.price |
| | | ite.unit = item.unit |
| | | } |
| | | }) |
| | |
| | | :style="{ |
| | | color: new Date().getTime() > new Date(scope.row[item.prop]).getTime() ? '#D23F3A' : '#606266' |
| | | }" |
| | | >{{ timeAgo(scope.row[item.prop]) }}</span |
| | | >{{ scope.row[item.prop] }}</span |
| | | > |
| | | <div v-else-if="item.conversion"> |
| | | <p class="exceed_width">{{ item.getStatus(scope.row[item.prop]) }}</p> |
| | |
| | | let list = this.tableData.map((res) => { |
| | | return { |
| | | ...res, |
| | | amount: 1, |
| | | productName: res.name, |
| | | productId: res.id |
| | | } |
| | |
| | | }, |
| | | // 删除 |
| | | handleDelClick(scope, value) { |
| | | console.log(scope) |
| | | if (value === "操作") { |
| | | this.tableData.splice(scope.$index, 1) |
| | | this.productTableList.tableData.splice(scope.$index, 1) |
| | | this.productTableList.tableData = this.tableData |
| | | this.$message.success("删除成功!") |
| | | } else { |
| | | this.detailTableData.splice(scope.$index, 1) |
| | |
| | | data() { |
| | | return { |
| | | tableList: {}, |
| | | showcol: ["仓库位置", "调出位置", "调入位置", "联系人", "日期", "来源单据", "状态"], |
| | | showcol: ["仓库位置", "来源","来源单据","调出位置", "调入位置", "联系人", "日期", "销售明细单", "状态"], |
| | | searchOptions: [], |
| | | commonDetail: { |
| | | visible: false, |
| | |
| | | this.toLabel = "客户位置" |
| | | this.numberLabel = "出库单号" |
| | | } else { |
| | | this.showcol=["仓库位置", "调出位置", "调入位置", "联系人", "日期", "销售明细单", "状态"], |
| | | this.formLabel = "调出位置" |
| | | this.toLabel = "调入位置" |
| | | this.numberLabel = "调拨单号" |
| | |
| | | default: true |
| | | }, |
| | | { |
| | | label: "来源", |
| | | prop: "operationSource", |
| | | isShowColumn: showcol.includes("来源"), |
| | | default: false, |
| | | // status: true, |
| | | isCallMethod: true, |
| | | getCallMethod: this.getSourceStatus |
| | | }, |
| | | { |
| | | label: "来源单据", |
| | | prop: "sourceNumber", |
| | | isShowColumn: showcol.includes("来源单据"), |
| | | default: false |
| | | }, |
| | | { |
| | | label: this.formLabel, |
| | | prop: "from", |
| | | isShowColumn: showcol.includes(this.formLabel), |
| | |
| | | date: true |
| | | }, |
| | | // { |
| | | // label: "产品可用性", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("产品可用性"), |
| | | // default: false |
| | | // }, |
| | | // { |
| | | // label: "截止日期", |
| | | // prop: "faultTime", |
| | | // isShowColumn: showcol.includes("截止日期"), |
| | |
| | | // default: false |
| | | // }, |
| | | { |
| | | label: "来源单据", |
| | | prop: "sourceNumber", |
| | | isShowColumn: showcol.includes("来源单据"), |
| | | label: "销售明细单", |
| | | prop: "salesDetailsNumber", |
| | | isShowColumn: showcol.includes("销售明细单"), |
| | | default: false |
| | | }, |
| | | // { |
| | | // label: "欠单", |
| | | // prop: "status", |
| | | // isShowColumn: showcol.includes("欠单"), |
| | | // default: false |
| | | // }, |
| | | { |
| | | label: "入库类型", |
| | | prop: "operationTypeName", |
| | |
| | | getStatus(val) { |
| | | return val === 1 ? "草稿" : val === 3 ? "就绪" : val === 4 ? "完成" : val === 5 ? "取消" : "" |
| | | }, |
| | | // 来源 |
| | | getSourceStatus(val){ |
| | | return val===0 ? '--':val === 1 ? "采购入库" : val === 2 ? "生产入库" : val === 3 ? "委外入库" : val === 4 ? "生产领料" : val=== 5 ? "委外领料": val === 6?"销售发货": "--" |
| | | }, |
| | | // 删除搜索状态 |
| | | delSelectClick() { |
| | | this.params.status = 0 |