|
|
@@ -46,242 +46,262 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { contactTypeTree } from '@/api/saleManage/contact';
|
|
|
- import searchTable from '@/views/saleManage/saleOrder/components/searchTable.vue';
|
|
|
- import { getTableList } from '@/api/saleManage/saleorder';
|
|
|
- import AssetTree from '@/components/AssetTree';
|
|
|
+import { contactTypeTree } from '@/api/saleManage/contact';
|
|
|
+import searchTable from '@/views/saleManage/saleOrder/components/searchTable.vue';
|
|
|
+import { getTableList } from '@/api/saleManage/saleorder';
|
|
|
+import AssetTree from '@/components/AssetTree';
|
|
|
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- AssetTree,
|
|
|
- searchTable
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ AssetTree,
|
|
|
+ searchTable
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ searchParams: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {}
|
|
|
},
|
|
|
- props: {
|
|
|
- searchParams: {
|
|
|
- type: Object,
|
|
|
- default: () => {}
|
|
|
- },
|
|
|
- contactData: {
|
|
|
- type: Object,
|
|
|
- default: () => {
|
|
|
- return {};
|
|
|
- }
|
|
|
+ contactData: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {
|
|
|
+ return {};
|
|
|
}
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- visible: false,
|
|
|
- currentIndex: null,
|
|
|
- columns: [
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- action: 'action',
|
|
|
- slot: 'action',
|
|
|
- align: 'center',
|
|
|
- label: '选择',
|
|
|
- minWidth: 100
|
|
|
- },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ currentIndex: null,
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ action: 'action',
|
|
|
+ slot: 'action',
|
|
|
+ align: 'center',
|
|
|
+ label: '选择',
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: 'orderNo',
|
|
|
+ label: '订单编码',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'orderNo',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
|
|
|
- {
|
|
|
- prop: 'orderNo',
|
|
|
- label: '订单编码',
|
|
|
- align: 'center',
|
|
|
- slot: 'orderNo',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 200
|
|
|
- },
|
|
|
+ {
|
|
|
+ prop: 'productNames',
|
|
|
+ label: '名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'productCodes',
|
|
|
+ label: '编码',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'needProduce',
|
|
|
+ label: '订单类型',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 150,
|
|
|
|
|
|
- {
|
|
|
- prop: 'saleTypeName',
|
|
|
- label: '销售类型',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 140
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'contractName',
|
|
|
- label: '合同名称',
|
|
|
- align: 'center',
|
|
|
- slot: 'contractName',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 200
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'deliveryDate',
|
|
|
- label: '交货日期',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 200
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'saleTypeName',
|
|
|
- label: '销售类型',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 140
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'partaName',
|
|
|
- label: '客户名称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 180
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'partaLinkName',
|
|
|
- label: '客户联系人',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 130
|
|
|
- },
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ let businessType =
|
|
|
+ cellValue == 1
|
|
|
+ ? '有客户生产性订单'
|
|
|
+ : cellValue == 2
|
|
|
+ ? '无客户生产性订单'
|
|
|
+ : cellValue == 4
|
|
|
+ ? '不定向订单'
|
|
|
+ : '库存式订单';
|
|
|
|
|
|
- {
|
|
|
- prop: 'partaTel',
|
|
|
- label: '客户联系电话',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 130
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'partbName',
|
|
|
- label: '售出方名称',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 130
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'partbLinkName',
|
|
|
- label: '售出方联系人',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 130
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'partbTel',
|
|
|
- label: '售出方联系电话',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 130
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'payAmount',
|
|
|
- label: '应付金额(元)',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 170
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'createTime',
|
|
|
- label: '创建时间',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- minWidth: 170
|
|
|
+ return businessType;
|
|
|
}
|
|
|
- ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'contractName',
|
|
|
+ label: '合同名称',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'contractName',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // prop: 'deliveryDate',
|
|
|
+ // label: '交货日期',
|
|
|
+ // align: 'center',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // minWidth: 200
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ prop: 'partaName',
|
|
|
+ label: '客户名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 180
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'partaLinkName',
|
|
|
+ label: '客户联系人',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
|
|
|
- radio: null,
|
|
|
- isAcc: false
|
|
|
- };
|
|
|
- },
|
|
|
+ {
|
|
|
+ prop: 'partaTel',
|
|
|
+ label: '客户联系电话',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'partbName',
|
|
|
+ label: '售出方名称',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'partbLinkName',
|
|
|
+ label: '售出方联系人',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'partbTel',
|
|
|
+ label: '售出方联系电话',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 130
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'payAmount',
|
|
|
+ label: '应付金额(元)',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 170
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createTime',
|
|
|
+ label: '创建时间',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 170
|
|
|
+ }
|
|
|
+ ],
|
|
|
|
|
|
- methods: {
|
|
|
- open(item, currentIndex, isAcc = false) {
|
|
|
- this.currentIndex = currentIndex;
|
|
|
+ radio: null,
|
|
|
+ isAcc: false
|
|
|
+ };
|
|
|
+ },
|
|
|
|
|
|
- this.isAcc = isAcc;
|
|
|
- this.visible = true;
|
|
|
- },
|
|
|
+ methods: {
|
|
|
+ open(item, currentIndex, isAcc = false) {
|
|
|
+ this.currentIndex = currentIndex;
|
|
|
|
|
|
- /* 表格数据源 */
|
|
|
- datasource({ page, limit, where, order }) {
|
|
|
- if (this.contactData.id) {
|
|
|
- where['contactId'] = this.contactData.id;
|
|
|
- }
|
|
|
- return getTableList({
|
|
|
- pageNum: page,
|
|
|
- size: limit,
|
|
|
- ...where,
|
|
|
- orderStatus: 2,
|
|
|
- ...this.searchParams
|
|
|
- });
|
|
|
- },
|
|
|
+ this.isAcc = isAcc;
|
|
|
+ this.visible = true;
|
|
|
+ },
|
|
|
|
|
|
- /* 刷新表格 */
|
|
|
- reload(where) {
|
|
|
- where = {
|
|
|
- ...where,
|
|
|
- ...this.searchParams
|
|
|
- };
|
|
|
- this.$refs.table.reload({ pageNum: 1, where: where });
|
|
|
- },
|
|
|
+ /* 表格数据源 */
|
|
|
+ datasource({ page, limit, where, order }) {
|
|
|
+ if (this.contactData.id) {
|
|
|
+ where['contactId'] = this.contactData.id;
|
|
|
+ }
|
|
|
+ return getTableList({
|
|
|
+ pageNum: page,
|
|
|
+ size: limit,
|
|
|
+ ...where,
|
|
|
+ orderStatus: 2,
|
|
|
+ ...this.searchParams
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- handleNodeClick(data, node) {
|
|
|
- this.reload({ categoryId: data.id });
|
|
|
- },
|
|
|
+ /* 刷新表格 */
|
|
|
+ reload(where) {
|
|
|
+ where = {
|
|
|
+ ...where,
|
|
|
+ ...this.searchParams
|
|
|
+ };
|
|
|
+ this.$refs.table.reload({ pageNum: 1, where: where });
|
|
|
+ },
|
|
|
|
|
|
- // 单击获取id
|
|
|
- cellClick(row) {
|
|
|
- this.current = row;
|
|
|
- console.log(row);
|
|
|
- this.radio = row.id;
|
|
|
- },
|
|
|
- handleClose() {
|
|
|
- this.visible = false;
|
|
|
- this.current = null;
|
|
|
- this.radio = '';
|
|
|
- },
|
|
|
+ handleNodeClick(data, node) {
|
|
|
+ this.reload({ categoryId: data.id });
|
|
|
+ },
|
|
|
|
|
|
- selected() {
|
|
|
- if (!this.current) {
|
|
|
- return this.$message.warning('请至少选择一条数据');
|
|
|
- }
|
|
|
- this.$emit('changeParent', this.current, this.currentIndex);
|
|
|
- this.handleClose();
|
|
|
- },
|
|
|
- selected1(row) {
|
|
|
- this.$emit('changeParent', row);
|
|
|
- this.handleClose();
|
|
|
+ // 单击获取id
|
|
|
+ cellClick(row) {
|
|
|
+ this.current = row;
|
|
|
+ console.log(row);
|
|
|
+ this.radio = row.id;
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.visible = false;
|
|
|
+ this.current = null;
|
|
|
+ this.radio = '';
|
|
|
+ },
|
|
|
+
|
|
|
+ selected() {
|
|
|
+ if (!this.current) {
|
|
|
+ return this.$message.warning('请至少选择一条数据');
|
|
|
}
|
|
|
+ this.$emit('changeParent', this.current, this.currentIndex);
|
|
|
+ this.handleClose();
|
|
|
+ },
|
|
|
+ selected1(row) {
|
|
|
+ this.$emit('changeParent', row);
|
|
|
+ this.handleClose();
|
|
|
}
|
|
|
- };
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- .tree_col {
|
|
|
- border: 1px solid #eee;
|
|
|
- padding: 10px 0;
|
|
|
- box-sizing: border-box;
|
|
|
- height: 500px;
|
|
|
- overflow: auto;
|
|
|
- }
|
|
|
+.tree_col {
|
|
|
+ border: 1px solid #eee;
|
|
|
+ padding: 10px 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ height: 500px;
|
|
|
+ overflow: auto;
|
|
|
+}
|
|
|
|
|
|
- .table_col {
|
|
|
- padding-left: 10px;
|
|
|
+.table_col {
|
|
|
+ padding-left: 10px;
|
|
|
|
|
|
- ::v-deep .el-table th.el-table__cell {
|
|
|
- background: #f2f2f2;
|
|
|
- }
|
|
|
+ ::v-deep .el-table th.el-table__cell {
|
|
|
+ background: #f2f2f2;
|
|
|
}
|
|
|
+}
|
|
|
|
|
|
- .pagination {
|
|
|
- text-align: right;
|
|
|
- padding: 10px 0;
|
|
|
- }
|
|
|
+.pagination {
|
|
|
+ text-align: right;
|
|
|
+ padding: 10px 0;
|
|
|
+}
|
|
|
|
|
|
- .btns {
|
|
|
- text-align: center;
|
|
|
- padding: 10px 0;
|
|
|
- }
|
|
|
+.btns {
|
|
|
+ text-align: center;
|
|
|
+ padding: 10px 0;
|
|
|
+}
|
|
|
|
|
|
- .topsearch {
|
|
|
- margin-bottom: 15px;
|
|
|
- }
|
|
|
+.topsearch {
|
|
|
+ margin-bottom: 15px;
|
|
|
+}
|
|
|
</style>
|