| | |
| | | @searchClick="onFilterSearch" |
| | | > |
| | | <template slot="leftButton"> |
| | | <el-button size="small" type="primary" @click="addBtnClick">新建</el-button> |
| | | <!-- <el-button size="small" type="primary" @click="addBtnClick">新建</el-button> --> |
| | | <el-button size="small" type="primary" @click="printClick">打印</el-button> |
| | | </template> |
| | | </CommonSearch> |
| | |
| | | <el-table-column label="操作" width="90" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | <el-button @click="delClick(scope.row.ID)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFollowRecordList, getDeleteFollowRecord } from "@/api/productManage/silkInspectForm.js" |
| | | import { getInspectCheckList, getInspectCheckDelete } from "@/api/productManage/silkInspectForm.js" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | |
| | | export default { |
| | |
| | | tableList: {}, |
| | | loading: false, |
| | | searchOptions: [], |
| | | editConfig: { |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: {} |
| | | }, |
| | | search_map: {}, |
| | | keyword: '', |
| | | tableColumn: [ |
| | | { label: "编号", prop: "topic", min: 120, default: true }, // 主题 |
| | | { label: "车间", prop: "client_name", min: 190, }, // 客户名称 |
| | | { label: "车组", prop: "contact_name", min: 100, }, // 联系人姓名 |
| | | { label: "日期", prop: "client_status", min: 100 }, // 客户状态 |
| | | { label: "平均纤度", prop: "contact_information_name", min: 100 }, // 联系方式 |
| | | { label: "公量纤度", prop: "follow_time", min: 130 }, // 联系人日期 |
| | | { label: "偏差", prop: "next_follow_time", min: 130 }, // 下次回访日期 |
| | | { label: "总差", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "车组等级", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "清洁", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "洁净", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "规格", prop: "member_name", min: 110 }, // 负责人 |
| | | { label: "编号", prop: "number", min: 120, default: true }, |
| | | { label: "车间", prop: "name", min: 190, }, |
| | | { label: "车组", prop: "workshopGroup", min: 100, }, |
| | | { label: "日期", prop: "finishDate", min: 100 }, |
| | | { label: "平均纤度", prop: "averageFineness", min: 100 }, |
| | | { label: "公量纤度", prop: "measureFineness", min: 130 }, |
| | | { label: "偏差", prop: "deviation", min: 130 }, |
| | | { label: "总差", prop: "totalDeviation", min: 110 }, |
| | | { label: "车组等级", prop: "finenessGrade", min: 110 }, |
| | | { label: "清洁", prop: "cleanliness", min: 110 }, |
| | | { label: "洁净", prop: "purity", min: 110 }, |
| | | { label: "规格", prop: "spec", min: 110 }, |
| | | ], |
| | | showCol: [ |
| | | "编号", |
| | |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData(this.search_map) |
| | | this.getData(this.keyword) |
| | | }, |
| | | computed: { |
| | | }, |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getFollowRecordList({ |
| | | search_map: this.search_map, |
| | | await getInspectCheckList({ |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | if (res.data&& res.data.length > 0) { |
| | | const list = res.data.map((item) => { |
| | | return { |
| | | ...item, |
| | | client_name: item.client.name, |
| | | contact_name: item.contact.name, |
| | | client_status: item.client_status.name, |
| | | phone: item.contact.phone, |
| | | member_name: item.member.username, |
| | | contact_information_name: item.contact_information.name |
| | | number: item.finenessRegister.number, |
| | | name: item.finenessRegister.name, |
| | | workshopGroup: item.finenessRegister.workshopGroup, |
| | | finishDate: item.finenessRegister.finishDate, |
| | | spec:item.finenessRegister.spec, |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.search_map.client_name = searchText ?? "" |
| | | this.keyword= searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |
| | | console.log(row) |
| | | this.editConfig.title = "编辑" |
| | | let config=JSON.parse(JSON.stringify(row)); |
| | | config.client_status_id=config.client_status_id?config.client_status_id:null |
| | | config.contact_information_id=config.contact_information_id?config.contact_information_id:null |
| | | this.editConfig.infomation = { ...config, sale_chance_name:row.sale_chance.name, sales_leads_name: "" } |
| | | this.editConfig.visible = true |
| | | this.$router.push({ |
| | | path:"/productManage/silkRegisterForm/addPage", |
| | | query:{ |
| | | id:row.ID, |
| | | activeName:'second' |
| | | } |
| | | }); |
| | | }, |
| | | // 删除 |
| | | delClick(id) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | debugger |
| | | this.$confirm("请确认是否删除,删除操作不可撤销??", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteFollowRecord({ ids: [id] }).then((response) => { |
| | | getInspectCheckDelete({ id: id }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |
| | |
| | | tableList: {}, |
| | | loading: false, |
| | | searchOptions: [], |
| | | search_map: {}, |
| | | keyword: '', |
| | | tableColumn: [ |
| | | { label: "编号", prop: "number", min: 120, default: true }, // 主题 |
| | | { label: "落丝时间", prop: "finishDate", min: 190, }, // 客户名称 |
| | |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData(this.search_map) |
| | | this.getData(this.keyword) |
| | | }, |
| | | computed: { |
| | | }, |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | await getRegisterList({ |
| | | search_map: this.search_map, |
| | | keyword: this.keyword, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.search_map.client_name = searchText ?? "" |
| | | this.keyword = searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |