| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939 |
- <template>
- <div class="ele-body">
- <el-card shadow="never" v-loading="loading">
- <div class="switch" v-if="!contactData?.id">
- <div class="switch_left">
- <ul>
- <li
- v-for="item in tabOptions"
- :key="item.key"
- :class="{ active: activeComp == item.key }"
- @click="activeComp = item.key"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
- <div class="main" style="padding: 0 10px">
- <div v-if="activeComp == 'saleorder'">
- <div class="ele-border-lighter form-content" v-loading="loading">
- <search-table @search="reload"></search-table>
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
- <el-tab-pane label="全部" name="all"></el-tab-pane>
- <el-tab-pane label="未发货" name="700"></el-tab-pane>
- <el-tab-pane label="部分发货" name="701"></el-tab-pane>
- <el-tab-pane label="已发货" name="800"></el-tab-pane>
- </el-tabs>
- <!-- 数据表格 -->
- <ele-pro-table
- ref="table"
- :columns="columns"
- :datasource="datasource"
- height="calc(100vh - 400px)"
- style="margin-bottom: 10px"
- full-height="calc(100vh - 116px)"
- tool-class="ele-toolbar-form"
- :selection.sync="selection"
- :page-size="20"
- @columns-change="handleColumnChange"
- :cache-key="cacheKeyUrl"
- >
- <!-- 表头工具栏 -->
- <template v-slot:toolbar>
- <el-button
- size="small"
- type="primary"
- icon="el-icon-plus"
- class="ele-btn-icon"
- @click="openEdit('add', {})"
- v-if="$hasPermission('eom:saleorder:save')"
- >
- 新建
- </el-button>
- <el-button
- size="small"
- type="danger"
- el-icon-delete
- class="ele-btn-icon"
- @click="allDelBtn"
- v-if="$hasPermission('eom:saleorder:delete')"
- :disabled="selection?.length === 0"
- >
- 批量删除
- </el-button>
- <el-button
- size="small"
- type="primary"
- icon="el-icon-plus"
- class="ele-btn-icon"
- @click="invoiceAll"
- v-if="$hasPermission('eom:saleManage:invoiceAll')"
- :disabled="selection?.length === 0"
- >
- 批量发货
- </el-button>
- <el-button
- type="primary"
- size="small"
- icon="el-icon-upload2"
- @click="uploadFile"
- v-if="$hasPermission('eom:saleorder:save')"
- >导入</el-button
- >
- <exportButton
- fileName="销售订单"
- apiUrl="/eom/saleorder/export"
- :params="params"
- ></exportButton>
- </template>
- <!-- 查看详情列 -->
- <template v-slot:contractNo="{ row }">
- <el-link
- type="primary"
- :underline="false"
- @click="opencontractDetail(row)"
- >
- {{ row.contractNo }}
- </el-link>
- </template>
- <template v-slot:orderNo="{ row }">
- <el-link
- type="primary"
- :underline="false"
- @click="openorderDetail(row)"
- >
- {{ row.orderNo }}
- </el-link>
- </template>
- <!-- 操作列 -->
- <template v-slot:action="{ row }">
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-edit"
- @click="openEdit('edit', row)"
- v-if="
- $hasPermission('eom:saleorder:update') &&
- [0, 3].includes(row.orderStatus)
- "
- >
- 修改
- </el-link>
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-plus"
- @click="saleOrderSubmitOrGenerate(row)"
- v-if="
- [0, 3].includes(row.orderStatus) &&
- $hasPermission('eom:saleorder:update')
- "
- >
- 提交
- </el-link>
- <!-- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-plus"
- @click="handleAutoGenerate(row.id)"
- v-if="
- [2].includes(row.orderStatus) &&
- row.needProduce &&
- !!!row.purchasePlanNum
- "
- >
- 生成采购计划
- </el-link> -->
- <el-popconfirm
- class="ele-action"
- title="确定要删除此信息吗?"
- @confirm="remove([row.id])"
- v-if="
- [0, 3].includes(row.orderStatus) &&
- $hasPermission('eom:saleorder:delete')
- "
- >
- <template v-slot:reference>
- <el-link
- type="danger"
- :underline="false"
- icon="el-icon-delete"
- >
- 删除
- </el-link>
- </template>
- </el-popconfirm>
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-plus"
- @click="handleCommand('invoice', row)"
- v-if="
- [2].includes(row.orderStatus) &&
- row.needProduce != 2 &&
- $hasPermission('eom:saleordersendrecord:save') &&
- ((isTotalCount == '1' &&
- ![800, 1000].includes(row.progress)) ||
- isTotalCount == 0)
- "
- >
- 创建发货单
- </el-link>
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-plus"
- @click="handleCommand('saleOrderReminder', row)"
- v-if="
- [2].includes(row.orderStatus) &&
- clientEnvironmentId != 5 &&
- row.progress < 800
- "
- >
- 催单
- </el-link>
- <el-link
- type="primary"
- :underline="false"
- icon="el-icon-plus"
- @click="handleCommand('invoiceManage', row)"
- v-if="
- [2].includes(row.orderStatus) &&
- !row.hasInvoiceApply &&
- $hasPermission('eom:fininvoiceapply:save')
- "
- >
- 新增发票
- </el-link>
- </template>
- </ele-pro-table>
- </div>
- </div>
- <div v-if="activeComp == 'invoice'">
- <invoice></invoice>
- </div>
- <div v-if="activeComp == 'invoiceConfirm'">
- <invoice-confirm></invoice-confirm>
- </div>
- <div v-if="activeComp == 'entrustedReceive'">
- <entrustedReceive></entrustedReceive>
- </div>
- <div v-if="activeComp == 'returnorder'" class="returnorder">
- <return-goods></return-goods>
- </div>
- <div v-if="activeComp == 'accountstatement'">
- <accountstatement></accountstatement>
- </div>
- <div v-if="activeComp == 'customerReturnOrder'">
- <customerReturnOrder></customerReturnOrder>
- </div>
- <div v-if="activeComp == 'exceptionList'">
- <exceptionList></exceptionList>
- </div>
- <div v-if="activeComp == 'trayList'">
- <palletManagement></palletManagement>
- </div>
- </div>
- </el-card>
- <add-dialog
- :isRequired="isRequired"
- ref="addDialogRef"
- @done="reload"
- :contactData="contactData"
- ></add-dialog>
- <add-invoice-dialog
- ref="invoiceDialogRef"
- @done="reload"
- :contactData="contactData"
- ></add-invoice-dialog>
- <add-return-goods-dialog
- ref="addReturnGoodsRef"
- :contactData="contactData"
- @done="reload"
- ></add-return-goods-dialog>
- <contractr-detail ref="contractDetailRef"></contractr-detail>
- <detail-dialog ref="contactDetailDialogRef"></detail-dialog>
- <autogenerate-dialog
- ref="autogenerateDialogRef"
- @handleSubmit="saleOrderSubmit"
- @reload="reload"
- ></autogenerate-dialog>
- <!-- 多选删除弹窗 -->
- <pop-modal
- :visible.sync="delVisible"
- content="是否确定删除?"
- @done="commitBtn"
- />
- <drawer ref="drawerRef"></drawer>
- <process-submit-dialog
- :isNotNeedProcess="false"
- :processSubmitDialogFlag.sync="processSubmitDialogFlag"
- v-if="processSubmitDialogFlag"
- ref="processSubmitDialogRef"
- @reload="reload"
- :callBack="callBack"
- ></process-submit-dialog>
- <addInvoiceManage
- :add-or-edit-dialog-flag.sync="addOrEditDialogFlag1"
- ref="addOrEditDialogRef"
- v-if="addOrEditDialogFlag1"
- @reload="reload"
- ></addInvoiceManage>
- <importDialog
- ref="importDialogRef"
- @success="reload"
- :fileUrl="'/eos/importTemplate/销售订单导入模板.xlsx'"
- fileName="销售订单导入模板"
- apiUrl="/eom/saleorder/importFile"
- />
- <bomDialog ref="bomDialogRef" @handleSubmit="bomDialogSuccess"></bomDialog>
- </div>
- </template>
- <script>
- import searchTable from './components/searchTable.vue';
- import addDialog from './components/addDialog.vue';
- import invoice from './invoice/index.vue';
- import invoiceConfirm from './invoiceConfirm/index.vue';
- import detailDialog from './components/detailDialog.vue';
- import exceptionList from './exceptionManagement/exceptionList';
- import bomDialog from './components/bomDialog';
- import drawer from './components/drawer.vue';
- import contractrDetail from '@/views/contractManage/contractBook/components/detailDialog.vue';
- import addInvoiceDialog from '@/views/saleManage/saleOrder/invoice/components/addInvoiceDialog';
- import addReturnGoodsDialog from '@/views/saleManage/saleOrder/returnGoods/components/addReturnGoodsDialog';
- import popModal from '@/components/pop-modal';
- import accountstatement from './accountstatement/index.vue';
- import customerReturnOrder from './customerReturnOrder/index.vue';
- import returnGoods from './returnGoods/index.vue';
- import palletManagement from './palletManagement/index.vue';
- import addInvoiceManage from '@/views/financialManage/invoiceManage/components/addOrEditDialog.vue';
- import {
- deleteInformation,
- getSaleOrderDetail,
- getTableList,
- saleOrderReminder,
- getByRepeatBomAttribute,
- saveOrderBomList
- } from '@/api/saleManage/saleorder';
- import { exportSaleorder } from '@/api/system/file/index.js';
- import dictMixins from '@/mixins/dictMixins';
- import { reviewStatus, saleOrderProgressStatusEnum } from '@/enum/dict';
- import entrustedReceive from '@/views/saleManage/saleOrder/entrustedReceive/index.vue';
- import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
- import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
- import tabMixins from '@/mixins/tableColumnsMixin';
- import importDialog from '@/components/upload/import-dialog.vue';
- import exportButton from '@/components/upload/exportButton.vue';
- import { parameterGetByCode } from '@/api/main/index.js';
- export default {
- mixins: [dictMixins, tabMixins],
- components: {
- processSubmitDialog,
- autogenerateDialog,
- searchTable,
- returnGoods,
- accountstatement,
- popModal,
- contractrDetail,
- addReturnGoodsDialog,
- addInvoiceDialog,
- invoice,
- addDialog,
- detailDialog,
- customerReturnOrder,
- entrustedReceive,
- invoiceConfirm,
- drawer,
- exceptionList,
- addInvoiceManage,
- palletManagement,
- exportButton,
- importDialog,
- bomDialog
- },
- //客户管理数据
- props: {
- contactData: {
- type: Object,
- default: () => {
- return {};
- }
- }
- },
- data() {
- return {
- activeName: 'all',
- activeComp: 'saleorder',
- tabOptions: [
- { key: 'saleorder', name: '销售订单' },
- { key: 'entrustedReceive', name: '受托收货单' },
- { key: 'invoice', name: '发货单' },
- { key: 'invoiceConfirm', name: '发货确认单' },
- { key: 'trayList', name: '托盘清单' },
- { key: 'exceptionList', name: '异常列表' },
- { key: 'returnorder', name: '退货单' },
- { key: 'customerReturnOrder', name: '退货处理单' },
- { key: 'accountstatement', name: '对账单' }
- ],
- selection: [], //单选中集合
- delVisible: false, //批量删除弹框状态
- loading: false, // 加载状态
- processSubmitDialogFlag: false, // 加载状态
- addOrEditDialogFlag1: false,
- params: {},
- tableList: [],
- current: null,
- cacheKeyUrl: 'eos-c2e9664a-saleManage-saleOrder',
- isRequired: true,
- isTotalCount: '0',
- columnsVersion: 1
- };
- },
- created() {
- this.requestDict('客户状态');
- parameterGetByCode({
- code: 'order_person_info'
- }).then((res) => {
- if (res.value) {
- this.isRequired = res.value === '1';
- }
- });
- //销售发货数量是否限制不能大于采购总数//0否 1是
- parameterGetByCode({
- code: 'saleOrder_invoice_productList_totalCount'
- }).then((res) => {
- this.isTotalCount == res.value;
- });
- // if (!('Notification' in window)) {
- // console.log('此浏览器不支持桌面通知');
- // } else if (Notification.permission === 'granted') {
- // // 如果用户已经授权,直接创建通知
- // var notification = new Notification('标题', {
- // body: '这是通知的内容。'
- // });
- // } else if (Notification.permission !== 'denied') {
- // // 请求权限
- // Notification.requestPermission().then(function (permission) {
- // if (permission === 'granted') {
- // var notification = new Notification('标题', {
- // body: '消息提醒1'
- // });
- // }
- // });
- // }
- },
- computed: {
- clientEnvironmentId() {
- return this.$store.state.user.info.clientEnvironmentId;
- },
- columns() {
- let columnsVersion = this.columnsVersion;
- return [
- {
- width: 45,
- type: 'selection',
- columnKey: 'selection',
- align: 'center'
- },
- {
- columnKey: 'index',
- label: '序号',
- type: 'index',
- width: 55,
- align: 'center',
- showOverflowTooltip: true,
- fixed: 'left'
- },
- {
- prop: 'orderNo',
- label: '订单编码',
- align: 'center',
- slot: 'orderNo',
- showOverflowTooltip: true,
- sortable: true,
- minWidth: 200,
- fixed: 'left'
- },
- {
- prop: 'needProduce',
- label: '订单类型',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 150,
- formatter: (_row, _column, cellValue) => {
- let businessType =
- cellValue == 1
- ? '有客户生产性订单'
- : cellValue == 2
- ? '无客户生产性订单'
- : cellValue == 4
- ? '不定向订单'
- : '库存式订单';
- return businessType;
- }
- },
- {
- prop: 'preOrderNo',
- label: '预销售订单编码',
- align: 'center',
- showOverflowTooltip: true,
- sortable: true,
- minWidth: 200,
- fixed: 'left'
- },
- {
- prop: 'progress',
- label: '订单进度',
- align: 'center',
- showOverflowTooltip: true,
- formatter: (_row, _column, cellValue) => {
- return saleOrderProgressStatusEnum.find(
- (val) => val.value == _row.progress
- )?.label;
- },
- minWidth: 120
- },
- // {
- // prop: 'deliveryDate',
- // label: '交货日期',
- // align: 'center',
- // showOverflowTooltip: true,
- // minWidth: 200
- // },
- {
- prop: 'productNames',
- label: '产品名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'productCodes',
- label: '编码',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- minWidth: 160,
- prop: 'productionCodes',
- label: '生产编号',
- align: 'center'
- },
- {
- prop: 'batchNos',
- label: '批次号',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'productCount',
- label: '数量',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'inventoryQuantity',
- label: '库存数',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'inventoryQuantity',
- label: '库存状态',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140,
- formatter: (_row, _column, cellValue) => {
- return _row.inventoryQuantity > 0 ? '有库存' : '无库存';
- }
- },
- {
- prop: 'saleTypeName',
- label: '销售类型',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 140
- },
- {
- prop: 'projectName',
- label: '项目名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 180
- },
- {
- prop: 'partaName',
- label: '客户名称',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 180
- },
- {
- prop: 'partaLinkName',
- label: '客户联系人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 130
- },
- {
- 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: 'arrivalWays',
- label: '到货方式',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 170,
- formatter: (_row, _column, cellValue) => {
- return _row.arrivalWays
- ? _row.arrivalWays
- .split(',')
- .map((val) => {
- return val == 1
- ? '一次性到货'
- : val == 2
- ? '分批到货'
- : '';
- })
- .toString()
- : '';
- }
- },
- {
- prop: 'orderStatus',
- label: '审核状态',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 100,
- formatter: (_row, _column, cellValue) => {
- return reviewStatus[_row.orderStatus];
- }
- },
- {
- prop: 'contractNo',
- label: '来源单据',
- align: 'center',
- slot: 'contractNo',
- showOverflowTooltip: true,
- minWidth: 200,
- formatter: (_row, _column, cellValue) => {
- return (
- _row.contractNo +
- (_row.contractNumber && ',' + _row.contractNumber)
- );
- }
- },
- {
- prop: 'createUserName',
- label: '创建人',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 80
- },
- {
- prop: 'createTime',
- label: '创建时间',
- align: 'center',
- showOverflowTooltip: true,
- minWidth: 170
- },
- {
- columnKey: 'action',
- label: '操作',
- width: 250,
- align: 'center',
- resizable: false,
- slot: 'action',
- showOverflowTooltip: true,
- fixed: 'right'
- }
- ];
- }
- },
- methods: {
- //更多菜单
- handleCommand(command, row) {
- if (command === 'invoice') {
- this.$refs.invoiceDialogRef.open('add', {}, [row.id]);
- }
- if (command === 'returnOrder') {
- this.$refs.addReturnGoodsRef.open('add', {});
- }
- if (command === 'saleOrderReminder') {
- saleOrderReminder(row.id).then((res) => {
- this.$message.success('催单成功');
- });
- }
- if (command === 'invoiceManage') {
- this.addOrEditDialogFlag1 = true;
- this.$nextTick(() => {
- this.$refs.addOrEditDialogRef.createInvoice1(row, 1, 3);
- });
- }
- },
- invoiceAll() {
- let partaIds = this.selection.map((item) => item.partaId);
- if (new Set(partaIds).size != 1) {
- return this.$message.warning('请选择相同客户的订单!');
- }
- let saleTypeS = this.selection.map((item) => item.saleType);
- if (new Set(saleTypeS).size != 1) {
- return this.$message.warning('请选择相同销售类型的订单!');
- }
- let processObj = this.selection.filter((item) => item.progress == 800);
- if (processObj?.length && this.isTotalCount == '1') {
- return this.$message.warning(
- '订单' +
- processObj.map((item) => item.orderNo).toString() +
- '已全部发货,不能创建发货单'
- );
- }
- if (
- this.selection.filter((item) => item.needProduce == 4)?.length &&
- this.selection.filter((item) => item.needProduce == 4)?.length !=
- this.selection.length
- ) {
- return this.$message.warning(
- '不定向订单不能与其它类型的订单一起创建发货单!'
- );
- }
- this.$refs.invoiceDialogRef.open(
- 'add',
- {},
- this.selection.map((item) => item.id)
- );
- },
- //点击左边分类
- handleNodeClick(data, node) {
- // this.curNodeData = data;
- this.reload({ categoryId: data.id });
- },
- /* 表格数据源 */
- datasource({ page, limit, where, order }) {
- if (this.contactData.id) {
- where['contactId'] = this.contactData.id;
- }
- this.params = {
- pageNum: page,
- size: limit,
- ...where
- };
- return getTableList(this.params);
- },
- /* 刷新表格 */
- reload(where) {
- this.$refs.table.reload({ page: 1, where });
- },
- handleClick() {
- this.activeName;
- this.$refs.table.reload({
- page: 1,
- where: { progress: this.activeName == 'all' ? '' : this.activeName }
- });
- },
- //新增编辑
- openEdit(type, row) {
- this.$refs.addDialogRef.open(type, row, row.id);
- this.$refs.addDialogRef.$refs.form &&
- this.$refs.addDialogRef.$refs.form.clearValidate();
- },
- //批量删除
- allDelBtn() {
- if (this.selection.length === 0) return;
- let flag = this.selection.some((item) =>
- [1, 2].includes(item.orderStatus)
- );
- if (flag)
- return this.$message.warning(
- '抱歉已审核、审核中的数据不能删除,请检查'
- );
- this.delVisible = true;
- },
- //删除接口
- remove(delData) {
- deleteInformation(delData).then((res) => {
- this.$message.success('删除成功!');
- this.reload();
- });
- },
- //删除弹框确定
- commitBtn() {
- const dataId = this.selection.map((v) => v.id);
- this.remove(dataId);
- },
- //查看详情
- openorderDetail(row) {
- this.$refs.drawerRef.open(row);
- },
- async saleOrderSubmit(id) {
- this.$refs.addDialogRef && this.$refs.addDialogRef.cancel();
- // const data = await getSaleOrderDetail(id);
- this.processSubmitDialogFlag = true;
- let businessType =
- this.current.needProduce == 1
- ? '有客户生产性订单'
- : this.current.needProduce == 2
- ? '无客户生产性订单'
- : this.current.needProduce == 4
- ? '不定向订单'
- : '库存式订单';
- this.$nextTick(() => {
- let params = {
- businessId: this.current.id,
- businessKey: 'sales_order_approve',
- formCreateUserId: this.current.createUserId,
- variables: {
- businessCode: this.current.orderNo,
- businessName: this.current.partaName,
- businessType: businessType
- }
- };
- this.$refs.processSubmitDialogRef.init(params);
- });
- },
- async callBack() {
- if (!this.current.generatePurchase && !this.current.generateProduce) {
- return 0;
- }
- const code = saveOrderBomList({
- categoryDTOList: this.tableList || [],
- orderId: this.current.id
- });
- return code;
- },
- async saleOrderSubmitOrGenerate(res) {
- this.tableList = [];
- this.current = await getSaleOrderDetail(res.id);
- if (!this.current.generatePurchase && !this.current.generateProduce) {
- this.saleOrderSubmit(res.id);
- } else {
- const data = await getByRepeatBomAttribute(res.id);
- if (data && data.length) {
- this.$refs.bomDialogRef.open(data);
- return;
- }
- this.saleOrderSubmit(res.id);
- }
- },
- bomDialogSuccess(tableList) {
- this.tableList = tableList;
- // this.callBack()
- this.saleOrderSubmit(this.current.id);
- },
- //生成
- handleAutoGenerate(id, isAuto = false) {
- this.$refs.autogenerateDialogRef.init(id, isAuto);
- },
- //查看合同详情
- opencontractDetail(row) {
- let data = {
- id: row.contractId
- };
- this.$refs.contractDetailRef.open(data);
- },
- uploadFile() {
- this.$refs.importDialogRef.open();
- },
- exportFn() {
- console.log(this.params);
- exportSaleorder(this.params);
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- :deep .el-card__body {
- padding: 0;
- }
- :deep(.el-link--inner) {
- margin-left: 0px !important;
- }
- .sys-organization-list {
- height: calc(100vh - 264px);
- box-sizing: border-box;
- border-width: 1px;
- border-style: solid;
- overflow: auto;
- }
- .sys-organization-list :deep(.el-tree-node__content) {
- height: 40px;
- & > .el-tree-node__expand-icon {
- margin-left: 10px;
- }
- }
- .el-dropdown-link {
- cursor: pointer;
- color: var(--color-primary-5);
- }
- .el-icon-arrow-down {
- font-size: 12px;
- }
- </style>
|