| | |
| | | </div> |
| | | </div> |
| | | <div class="product-view"> |
| | | <CommonFormTableView :product-table-list="productTableList" /> |
| | | <CommonFormTableView |
| | | :product-table-list="productTableList" |
| | | @inputContent="inputContent" |
| | | @addProductClick="addProductClick" |
| | | /> |
| | | </div> |
| | | <!-- 合计 --> |
| | | <div class="basic-info-view"> |
| | |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | masterId: this.editCommonConfig.infomation.masterOrderId |
| | | masterId: this.editCommonConfig.infomation.masterOrderId, |
| | | tableData: [], |
| | | productId: 1, |
| | | addProductArr: [] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | masterOrderId: this.masterId || 0, |
| | | memberId: data.memberId || 0, |
| | | number: data.number || "", |
| | | product: [ |
| | | { |
| | | amount: 0, |
| | | desc: "", |
| | | id: 0, |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | total: 0 |
| | | } |
| | | ] |
| | | product: this.tableData |
| | | } |
| | | return params |
| | | }, |
| | |
| | | // 设置允许上传文件格式 |
| | | setFormatClick() {}, |
| | | setTableForm() { |
| | | this.productTableList = { |
| | | tableData: [ |
| | | if (this.editConfig.title === "新建") { |
| | | this.tableData = [ |
| | | { |
| | | id: "1", |
| | | productName: "上海有限公司", |
| | | other0: "ZDYBD03-1", |
| | | other1: "12", |
| | | other2: "", |
| | | other6: "3.00", |
| | | other7: "2.00" |
| | | id: 1, |
| | | Amount: 0, |
| | | IsSale: true, |
| | | MaterialMode: "", |
| | | MinInventory: 0, |
| | | Name: "", |
| | | Number: "", |
| | | PurchaseType: "", |
| | | SalePrice: 0, |
| | | Unit: "" |
| | | } |
| | | ], |
| | | ] |
| | | } else { |
| | | this.tableData = this.editConfig.infomation.products |
| | | } |
| | | this.productTableList = { |
| | | tableData: this.tableData, |
| | | tableColumn: [ |
| | | { label: "#", prop: "id", width: 40 }, |
| | | { label: "产品名称", prop: "productName", input: true, isRequird: true }, |
| | | { label: "产品编号", prop: "other0" }, |
| | | { label: "计量单位", prop: "other2" }, |
| | | { label: "规格编号", prop: "other3" }, |
| | | { label: "源单类型", prop: "other4" }, |
| | | { label: "合同信息", prop: "other5" }, |
| | | { label: "数量", prop: "other1", input: true, isRequird: true }, |
| | | { label: "含税单价", prop: "other6", input: true }, |
| | | { label: "价税合计", prop: "other7", input: true }, |
| | | { label: "产品名称", prop: "Name", input: true, isRequird: true }, |
| | | { label: "产品编号", prop: "Number" }, |
| | | { label: "数量", prop: "Amount", input: true, isRequird: true }, |
| | | { label: "销售单价", prop: "Unit", input: true }, |
| | | { label: "价税合计", prop: "other3", input: true }, |
| | | { label: "描述", prop: "other8" } |
| | | ] |
| | | } |
| | | }, |
| | | // 产品列表输入 |
| | | inputContent(val, prop, row) { |
| | | console.log("aaaaaaaa") |
| | | console.log(val, prop) |
| | | this.productId = row.id |
| | | this.tableData.map((item) => { |
| | | if (item.id === row.id) { |
| | | item[prop] = val |
| | | } |
| | | }) |
| | | console.log(this.tableData) |
| | | }, |
| | | // 产品新增 |
| | | addProductClick() { |
| | | this.productId++ |
| | | this.tableData.push({ |
| | | id: this.productId, |
| | | Amount: 0, |
| | | IsSale: true, |
| | | MaterialMode: "", |
| | | MinInventory: 0, |
| | | Name: "", |
| | | Number: "", |
| | | PurchaseType: "", |
| | | SalePrice: 0, |
| | | Unit: "" |
| | | }) |
| | | } |
| | | } |
| | | } |