| | |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="220" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="btnConfirm(scope.row)" style="margin-right: 5px" |
| | | <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnConfirm(scope.row)" style="margin-right: 5px" |
| | | >确认</el-button |
| | | > |
| | | <el-button type="text" size="small" @click="btnEdit(scope.row)" style="margin-right: 5px" |
| | | <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnEdit(scope.row)" style="margin-right: 5px" |
| | | >编辑</el-button |
| | | > |
| | | <el-button type="text" size="small" @click="btnLook(scope.row)" style="margin-right: 5px" |
| | | >查看</el-button |
| | | > |
| | | <el-button type="text" size="small" @click="btnCancel(scope.row)" style="margin-right: 5px" |
| | | <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnCancel(scope.row)" style="margin-right: 5px" |
| | | >取消</el-button |
| | | > |
| | | <el-button type="text" size="small" @click="btnDelete(scope.row)" style="margin-right: 5px" |
| | | <el-button v-if="scope.row.status===1" type="text" size="small" @click="btnDelete(scope.row)" style="margin-right: 5px" |
| | | >删除</el-button |
| | | > |
| | | <!-- <el-button v-if="scope.row.status< 4" @click="submitClick(scope.row)" type="text" size="small">提交</el-button> --> |
| | |
| | | visible: false, |
| | | title: "创建", |
| | | isDisabled:false, |
| | | detailEnter:false, |
| | | infomation: { |
| | | supplierList:[] |
| | | } |
| | | }, |
| | | tableColumn: [ |
| | | { label: "单据类型", prop: "orderType", min: 130 }, |
| | | { label: "采购单号", prop: "number", min: 150, isCommonClick: true ,default:true}, |
| | | { label: "采购单名称", prop: "name", min: 130, isCommonClick: true }, |
| | | { label: "单据类型", prop: "orderType", min: 130 }, |
| | | { label: "供应商名称", prop: "contact", min: 130 }, |
| | | { label: "供应商名称", prop: "supplierName", min: 130 }, |
| | | { label: "采购数量", prop: "quantity", min: 130 }, |
| | | { label: "收货仓库", prop: "warehouse", min: 130 }, |
| | | { label: "经办人", prop: "handledBy", min: 130 }, |
| | | { label: "制单人", prop: "creator", min: 130 } |
| | | ], |
| | | showCol: ['采购单号', '采购单名称', '单据类型', '供应商名称', '采购数量', '收货仓库'] |
| | | showCol: ['采购单号', '采购单名称', '单据类型', '供应商名称', '采购数量', '收货仓库','经办人','制单人'], |
| | | pagerOptions:{ |
| | | pageSize:15, |
| | | currPage:1, |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | await getPurchaseList({ |
| | | keyword: this.search, |
| | | keyword: this.search||'', |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | if (res.data.code === 200) { |
| | | const list = res.data.data.list |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.data.total |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 200) { |
| | | let list = res.data.list |
| | | list.map((item)=>{ |
| | | item.supplierName=item.supplier.name |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.total |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // 获取供应商数据 |
| | | async getSupplierData() { |
| | | await getSupplierList({ |
| | | // [val]: content, |
| | | status:1, |
| | | page:1, |
| | | pageSize: 10 |
| | | }) |
| | |
| | | }, |
| | | // 新建 |
| | | addBtnClick() { |
| | | this.editConfig.detailEnter=false |
| | | this.editConfig.isDisabled=false |
| | | // this.editRow = {}; |
| | | // this.$refs.add.islook = true; |
| | |
| | | |
| | | // 编辑 |
| | | btnEdit(row) { |
| | | this.editConfig.detailEnter=false |
| | | this.editConfig.isDisabled=false |
| | | this.tableLoading = true |
| | | getPurchaseInfo({ id: row.ID }).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | }, |
| | | // 查看 |
| | | btnLook(row){ |
| | | this.editConfig.detailEnter=true |
| | | this.editConfig.isDisabled=true |
| | | this.tableLoading = true |
| | | getPurchaseInfo({ id: row.ID }).then((res) => { |
| | |
| | | }, |
| | | // 详情 |
| | | selCommonClick(row) { |
| | | console.log(row) |
| | | this.tableLoading = true |
| | | getPurchaseInfo({ id: row.ID }).then((res) => { |
| | | if (res.code == 200) { |
| | | console.log(res,"产品详情") |
| | | this.tableLoading = false |
| | | this.commonDetail.visible = true |
| | | this.commonDetail.infomation = { |