|
|
@@ -0,0 +1,590 @@
|
|
|
+<template>
|
|
|
+ <div >
|
|
|
+ <basicDetails
|
|
|
+ ref="details"
|
|
|
+ :titleText="`${mainData.sonum}`"
|
|
|
+ :editData="mainData"
|
|
|
+ :mainAreaData="mainAreaData"
|
|
|
+ turnPageId="20230105143002"
|
|
|
+ idname="sa_orderid"
|
|
|
+ ownertable="sa_order"
|
|
|
+ delApiId="20221108152102"
|
|
|
+ tags=""
|
|
|
+ :statusCheck="[{key:'status',value:'审核'},{key:'status',value:'提交'},{key:'status',value:'关闭'}]"
|
|
|
+ :tabs="['订单明细','基本信息','订单进度','居间费明细','发货单','物流单','发票记录','收支明细','核销记录','erp对接记录','变更记录']"
|
|
|
+ @pageChange="pageChange"
|
|
|
+ @onEditSuccess="queryMainData($route.query.id)">
|
|
|
+ <div slot="customOperation" v-if="Object.keys(mainData).length > 0">
|
|
|
+ <!-- <Edit class="inline-16" v-if="tool.checkAuth($route.name,'update') && (mainData.status == '新建')" :data="mainData" @onSuccess="queryMainData();$refs.prod && $refs.prod.listData()" /> -->
|
|
|
+ <Edit style="display: inline-block !important;" v-if="mainData.status === '新建'" :data="mainData" @onSuccess="queryMainData();$refs.prod && $refs.prod.listData()" />
|
|
|
+ <!-- <Edit class="inline-16" v-if="mainData.status !== '新建' && mainData.status !== '关闭'" :data="mainData" @onSuccess="queryMainData();$refs.prod && $refs.prod.listData()" />-->
|
|
|
+ <EditRemark style="margin-right: 20px !important;" :data="mainData" @onSuccess="queryMainData"></EditRemark>
|
|
|
+ <changeSaler class="inline-16" style="margin-left: -10px" ref="saler" @selectRow="salerChange">
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'changeSaler')" type="primary" slot="input" size="mini" @click="$refs.saler.visible=true;$refs.saler.listData()">{{$t(`变更业务员`)}}</el-button>
|
|
|
+ </changeSaler>
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'confirmDate') && mainData.status === '交期待确认'" class="inline-16" type="primary" size="mini" @click="confirmdate">{{$t(`确认交期`)}}</el-button>
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'backconfirmDate') && mainData.status === '交期待确认' || mainData.status === '交期确认'" class="inline-16" type="primary" size="mini" @click="backconfirmdate">{{$t(`交期退回`)}}</el-button>
|
|
|
+ <confirmDate v-if="tool.checkAuth($route.name,'replyDate')" class="inline-16" :data="mainData" @onSuccess="queryMainData();$refs.prod.listData()"></confirmDate>
|
|
|
+ <el-popover
|
|
|
+ placement="top"
|
|
|
+ trigger="click">
|
|
|
+ <p class="mt-10 normal-title">{{$t(`选择评审类型`)}}</p>
|
|
|
+ <el-select class="mt-10" v-model="value" :placeholder="$t('请选择')" size="mini">
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value "
|
|
|
+ :label="$t(item.value) + '-' + $t(item.remarks)"
|
|
|
+ :value="item.value">
|
|
|
+ <span style="float: left">{{ $t(item.value) }}</span>
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?$t(item.remarks):$t('暂无描述') }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <div style="text-align: right; margin: 0">
|
|
|
+ <el-button type="primary" size="mini" @click="onSubmit('审核')">{{$t(`确定`)}}</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button :disabled="mainData.status !== '提交' && mainData.status !== '交期确认'" class="inline-16" @click="visible=true" v-if="tool.checkAuth($route.name,'examine')" type="primary" size="mini" slot="reference">{{$t(`审 核`)}}</el-button>
|
|
|
+ </el-popover>
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'examine') && mainData.status === '审核'" type="primary" size="mini" @click="onReturnCheck">{{$t(`反审核`)}}</el-button>
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'reback') && mainData.status === '提交'" type="primary" size="mini" @click="dialogVisible = true">{{$t('退 回')}}</el-button>
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'submit') && mainData.status === '新建' " :disabled="mainData.qty === 0" type="primary" size="mini" @click="onSubmit('提交')">{{$t(`提 交`)}}</el-button>
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'finishOrder') && mainData.status === '审核'" type="primary" size="mini" @click="closeOrder">{{$t(`结 案`)}}</el-button>
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'insert')" class="inline-16" type="primary" size="mini" @click="onCopy">{{$t(`复 制`)}}</el-button>
|
|
|
+ </div>
|
|
|
+ <template #headerBottom>
|
|
|
+ <div style="display:flex" v-if="Object.keys(mainData).length > 0">
|
|
|
+ <div class="account_info">
|
|
|
+ <div>
|
|
|
+ <p class="normal-title" style="margin-bottom:10px">{{$t(`支付信息`)}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="reveive__panel inline-16">
|
|
|
+ <p class="flex-align-center"><small>{{$t(`结算企业`)}}:</small> <b>{{mainData.finance.enterprisename}}</b></p>
|
|
|
+ <div class="flex-align-center">
|
|
|
+ <p class="inline-16"><small>{{$t(`账户名称`)}}: </small>{{mainData.accountclass.accountname?$t(mainData.accountclass.accountname):$t('未选择账户')}}</p>
|
|
|
+ <p class="inline-16"><small>{{$t(`账户余额`)}}: </small><b>¥{{tool.formatAmount(mainData.accountclass.balance?mainData.accountclass.balance:0,2)}}</b></p>
|
|
|
+
|
|
|
+ <p><small>{{$t(`信用额度`)}}: </small>{{mainData.accountclass.creditquota ? tool.formatAmount(mainData.accountclass.creditquota,2) : tool.formatAmount(mainData.accountclass.creditquota)}}</p>
|
|
|
+ <p><small>{{$t(`本单金额`)}}: </small>{{mainData.rebate_used ? tool.formatAmount(mainData.defaultamount - rebateamount,2) : tool.formatAmount(mainData.defaultamount)}}</p>
|
|
|
+ </div>
|
|
|
+ <div v-if="(mainData.type === '标准订单' || mainData.type === '特殊订单') && isusedrebate === 1">
|
|
|
+ <div v-if="checked" class="flex-align-center">
|
|
|
+ <p class="inline-16"><small>{{$t(`返利金余额`)}}: </small><b>{{tool.formatAmount(mainData.rebatebalance,2)}}</b></p>
|
|
|
+ <p class="inline-16"><small>{{$t(`已使用返利金金额`)}}: </small><b>{{tool.formatAmount(mainData.rebateamount,2)}}</b></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="address_info">
|
|
|
+ <div>
|
|
|
+ <p class="normal-title" style="margin-bottom:10px">{{$t(`收货信息`)}}</p>
|
|
|
+ </div>
|
|
|
+ <div class="reveive__panel inline-16">
|
|
|
+ <div>
|
|
|
+ <p class="inline-16"><b>{{mainData.contactsEnterprise.enterprisename}}</b></p>
|
|
|
+ <p class="inline-16"><span class="inline-16"><b>{{mainData.contacts.name}}</b></span><small>{{mainData.contacts.phonenumber}}</small></p>
|
|
|
+ </div>
|
|
|
+ <small>{{mainData.contacts.province?mainData.contacts.province:'--'}}{{mainData.contacts.city}}{{mainData.contacts.county}}{{mainData.contacts.address?mainData.contacts.address:''}}</small>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ <div slot="slot1">
|
|
|
+ <default-info :mainData="mainData"></default-info>
|
|
|
+ </div>
|
|
|
+ <div slot="slot0">
|
|
|
+ <product-list @select="select" @onSuccess="queryMainData()" :data="mainData" ref="prod">
|
|
|
+ <div slot="operation">
|
|
|
+ <importFile v-if="mainData.status == '新建'" ref="importFile" class="inline-16" :bindData="{ownertable:'sa_order',ownerid:$route.query.id,usetype:'default'}" :ordertype="mainData.type" :errorUrl="errorUrl" @clearUrl="errorUrl = null" @onSuccess="bindImportOrder"></importFile>
|
|
|
+ <changeOrderMx v-if="mainData.status === '审核'" :tableData="selection" class="inline-16" :data="mainData" @onSuccess="$refs['prod'].listData();queryMainData"></changeOrderMx>
|
|
|
+ <el-button :disabled="mainData.status !== '审核' || selection.length === 0" size="small" type="primary" style="margin-bottom:12px" @click="adddispatch">{{$t(`一键发货`)}}</el-button>
|
|
|
+ </div>
|
|
|
+ </product-list>
|
|
|
+ </div>
|
|
|
+ <div slot="slot2">
|
|
|
+ <orderprogress></orderprogress>
|
|
|
+ </div>
|
|
|
+ <div slot="slot3">
|
|
|
+ <rebat></rebat>
|
|
|
+ </div>
|
|
|
+ <div slot="slot4">
|
|
|
+ <dispatch></dispatch>
|
|
|
+ </div>
|
|
|
+ <div slot="slot5">
|
|
|
+ <logistics></logistics>
|
|
|
+ </div>
|
|
|
+ <div slot="slot6">
|
|
|
+ <invoiceTable></invoiceTable>
|
|
|
+ </div>
|
|
|
+ <div slot="slot7">
|
|
|
+ <revenue :data="mainData"></revenue>
|
|
|
+ </div>
|
|
|
+ <div slot="slot8">
|
|
|
+ <writeOff :data="mainData"></writeOff>
|
|
|
+ </div>
|
|
|
+ <div slot="slot9">
|
|
|
+ <erpHistory :data="mainData"></erpHistory>
|
|
|
+ </div>
|
|
|
+ <div slot="slot10">
|
|
|
+ <changeHistory :data="mainData"></changeHistory>
|
|
|
+ </div>
|
|
|
+ </basicDetails>
|
|
|
+ <el-dialog append-to-body :title="$t(`退回原因`)" :visible.sync="dialogVisible" width="400px">
|
|
|
+ <el-input v-model="backreason" type="textarea" :placeholder="$t(`请输入退回原因`)"></el-input>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false" size="small">{{$t('取 消')}}</el-button>
|
|
|
+ <el-button type="primary" @click="onRebanck" size="small">{{$t('确 定')}}</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import Edit from '@/HDrpManagement/orderManage/modules/edit'
|
|
|
+import defaultInfo from '@/HDrpManagement/orderManage/details/tabs/defaultInfo.vue';
|
|
|
+import productList from '@/HDrpManagement/orderManage/details/tabs/productlist.vue'
|
|
|
+import confirmDate from '@/HDrpManagement/orderManage/modules/confirmDate.vue'
|
|
|
+import rebat from '@/HDrpManagement/orderManage/details/tabs/rebatesettlement.vue'
|
|
|
+import orderprogress from '@/HDrpManagement/orderManage/details/tabs/orderpProgress.vue'
|
|
|
+import dispatch from '@/HDrpManagement/orderManage/details/tabs/dispatch.vue'
|
|
|
+import logistics from '@/HDrpManagement/orderManage/details/tabs/logistics.vue'
|
|
|
+import invoiceTable from '@/HDrpManagement/orderManage/details/tabs/invoiceTable.vue'
|
|
|
+import changeSaler from '@/template/selectSaler/index'
|
|
|
+import revenue from '@/HDrpManagement/orderManage/details/tabs/revenueAndExp.vue'
|
|
|
+import changeOrderMx from '@/HDrpManagement/orderManage/details/tabs/changeOrderMx.vue'
|
|
|
+import writeOff from '@/HDrpManagement/orderManage/details/tabs/writeoff.vue'
|
|
|
+import erpHistory from '@/HDrpManagement/orderManage/details/tabs/erpHistory.vue'
|
|
|
+import changeHistory from '@/HDrpManagement/orderManage/details/tabs/changeHistory.vue'
|
|
|
+import importFile from '@/HDrpManagement/orderManage/details/importFile.vue'
|
|
|
+import EditRemark from '@/HDrpManagement/orderManage/modules/EditRemark.vue'
|
|
|
+export default {
|
|
|
+ name: "orderDetail",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ mainData:{},
|
|
|
+ mainAreaData:{},
|
|
|
+ backreason:'',
|
|
|
+ options:[],
|
|
|
+ dialogVisible:false,
|
|
|
+ visible:false,
|
|
|
+ value:'',
|
|
|
+ selection:[],
|
|
|
+ errorUrl:null,
|
|
|
+ rebateamount:'',
|
|
|
+ isusedrebate:'',
|
|
|
+ checked:0,
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ provide () {
|
|
|
+ return {
|
|
|
+ thisDetail:() => this
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components:{
|
|
|
+ Edit,
|
|
|
+ defaultInfo,
|
|
|
+ productList,
|
|
|
+ confirmDate,
|
|
|
+ rebat,
|
|
|
+ orderprogress,
|
|
|
+ dispatch,
|
|
|
+ logistics,
|
|
|
+ invoiceTable,
|
|
|
+ changeSaler,
|
|
|
+ revenue,
|
|
|
+ changeOrderMx,
|
|
|
+ writeOff,
|
|
|
+ erpHistory,
|
|
|
+ changeHistory,
|
|
|
+ importFile,
|
|
|
+ EditRemark
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ async orderreviewtype () {
|
|
|
+ const res = await this.$store.dispatch('optiontypeselect','orderreviewtype')
|
|
|
+ this.options = res.data
|
|
|
+ this.value = res.data[0].value
|
|
|
+ },
|
|
|
+ async queryMainData(id) {
|
|
|
+ return new Promise(async (re,rj) => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id":'20221108151302',
|
|
|
+ "content": {
|
|
|
+ "nocache":true,
|
|
|
+ "sa_orderid": this.$route.query.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.mainData = res.data
|
|
|
+ this.checked = this.mainData.rebate_used
|
|
|
+ if (this.mainData.rebateamount > this.mainData.defaultamount) {
|
|
|
+ this.rebateamount = this.tool.formatAmount(+this.mainData.defaultamount / 2)
|
|
|
+ } else {
|
|
|
+ this.rebateamount = this.mainData.rebateamount
|
|
|
+ }
|
|
|
+ console.log(this.mainData);
|
|
|
+ this.$refs.prod.listData(this.$refs.prod.param.content.pageNumber = 1)
|
|
|
+ this.queryUsedrebate()
|
|
|
+ this.changeDataStructure()
|
|
|
+ this.orderreviewtype()
|
|
|
+ re()
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ changeDataStructure() {
|
|
|
+ let that = this
|
|
|
+ this.mainAreaData = [
|
|
|
+ {
|
|
|
+ label:'订单状态',
|
|
|
+ value:this.$t(this.mainData.status),
|
|
|
+ style:function () {
|
|
|
+ let style = {}
|
|
|
+ switch (that.mainData.status) {
|
|
|
+ case '新建':
|
|
|
+ style = {color:"#000000"}
|
|
|
+ break;
|
|
|
+ case '提交':
|
|
|
+ style = {color:"#d90a0a"}
|
|
|
+ break;
|
|
|
+ case '交期待确认':
|
|
|
+ style = {color:"#e09a1a"}
|
|
|
+ break;
|
|
|
+ case '交期确认':
|
|
|
+ style = {color:"#3874f6"}
|
|
|
+ break;
|
|
|
+ case '审核':
|
|
|
+ style = {color:"#52C41A"}
|
|
|
+ break;
|
|
|
+ case '关闭':
|
|
|
+ style = {color:"#b2c0ea"}
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'订单类型',
|
|
|
+ value:this.mainData.type
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'明细分类',
|
|
|
+ value:this.mainData.typemx
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'单据日期',
|
|
|
+ value:this.mainData.billdate
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'企业名称',
|
|
|
+ value:this.mainData.enterprisename
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'订单总金额',
|
|
|
+ value:this.tool.formatAmount(this.mainData.defaultamount,2),
|
|
|
+ style:function () {
|
|
|
+ let style = {color:"#ff0000"}
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'折后总金额',
|
|
|
+ value:this.tool.formatAmount(this.mainData.amount,2),
|
|
|
+ style:function () {
|
|
|
+ let style = {color:"#ff0000"}
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'合计数量',
|
|
|
+ value:this.mainData.qty,
|
|
|
+ style:function () {
|
|
|
+ let style = {color:"#ff0000"}
|
|
|
+ return style
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'品牌',
|
|
|
+ value:this.mainData.brandname
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'领域',
|
|
|
+ value:this.mainData.tradefield
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'领域明细',
|
|
|
+ value:this.mainData.tradefieldmx
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'评审类型',
|
|
|
+ value:this.mainData.optiontyperemarks?this.mainData.reviewtype + '-' + this.mainData.optiontyperemarks : this.mainData.reviewtype
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'业务员',
|
|
|
+ value:this.mainData.saler_name
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'项目信息',
|
|
|
+ value:this.mainData.projectname
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'销售分类',
|
|
|
+ value:`${this.mainData.saletype}${this.mainData.saletyperemarks?'-':''}${this.mainData.saletyperemarks}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'运费状态',
|
|
|
+ value:this.$t(this.mainData.freightstatus)
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'备注',
|
|
|
+ value:this.mainData.remarks
|
|
|
+ },
|
|
|
+ /*{
|
|
|
+ label:'返利金使用比例(%)',
|
|
|
+ value:this.mainData.rebate_userate
|
|
|
+ },*/
|
|
|
+ {
|
|
|
+ label:'退回原因',
|
|
|
+ value:this.mainData.backreason
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'核销状态',
|
|
|
+ value:this.mainData.writeoffstatus
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'开票状态',
|
|
|
+ value:this.mainData.invoicestatus
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'erp单号',
|
|
|
+ value:this.mainData.erpbillno
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'回签单',
|
|
|
+ value:this.mainData.signbackstatus
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'项目备注',
|
|
|
+ value:this.mainData.projectnote
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ // 监听切换数据,上一页,下一页
|
|
|
+ pageChange (id,rowindex,tabIndex) {
|
|
|
+ /*this.$router.replace({path:'/orderdetail',query:{id:id,rowindex:rowindex}})*/
|
|
|
+ this.queryMainData(id)
|
|
|
+ },
|
|
|
+ // 查询站点是否使用返利金
|
|
|
+ async queryUsedrebate () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "webmanage.site.site",
|
|
|
+ "method": "querySite_Parameter",
|
|
|
+ "content": {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.isusedrebate = res.data.order_rebate_used
|
|
|
+ },
|
|
|
+ /* 变更业务员 */
|
|
|
+ salerChange (data) {
|
|
|
+ console.log(data);
|
|
|
+ this.$confirm(`${this.$t(`确定把`)} ${data.name} ${this.$t(`设置为业务员吗`)}`,this.$t('提示'),{
|
|
|
+ confirmButtonText:this.$t('确定'),
|
|
|
+ cancelButtonText:this.$t('取消')
|
|
|
+ }).then(async () => {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id":20230213154802,
|
|
|
+ "content": {
|
|
|
+ saler_hrid:data.hrid,
|
|
|
+ sa_orderid:this.$route.query.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(res);
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$refs.saler.visible = false
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 提交审核订单
|
|
|
+ onSubmit (type) {
|
|
|
+ this.$confirm(`${this.$t(`是否`)} ${this.$t(type)} ${this.$t(`该订单`)}`, this.$t('提示'), {
|
|
|
+ confirmButtonText: this.$t('确定'),
|
|
|
+ cancelButtonText: this.$t('取消'),
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": type === '审核'?20221108153502:20221108153402,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid": this.mainData.sa_orderid,
|
|
|
+ "sys_enterpriseid": this.mainData.sys_enterpriseid,
|
|
|
+ "sa_accountclassid": this.mainData.accountclass.sa_accountclassid,
|
|
|
+ "reviewtype":type === '审核'?this.value:''
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,async ()=>{
|
|
|
+ this.visible = false
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ }).catch((err) => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: this.$t('已取消')
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 反审核订单
|
|
|
+ onReturnCheck () {
|
|
|
+ this.$confirm(this.$t(`是否反审核该订单`), this.$t('提示'), {
|
|
|
+ confirmButtonText: this.$t('确定'),
|
|
|
+ cancelButtonText: this.$t('取消'),
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20230102141502,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid": this.mainData.sa_orderid,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$store.dispatch('changeDetailDrawer',false)
|
|
|
+ })
|
|
|
+ }).catch((err) => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: this.$t('已取消')
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async onRebanck () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221108161902,
|
|
|
+ "content": {
|
|
|
+ "sys_enterpriseid":this.mainData.sys_enterpriseid,
|
|
|
+ "sa_accountclassid":this.mainData.accountclass.sa_accountclassid,
|
|
|
+ "sa_orderid": this.mainData.sa_orderid,
|
|
|
+ "backreason": this.backreason //退回原因,可选
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.queryMainData()
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.$store.dispatch('changeDetailDrawer',false)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async closeOrder () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221108164502,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid":this.$route.query.id
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.queryMainData()
|
|
|
+ this.dialogVisible = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async confirmdate () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20221230094802,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid": this.$route.query.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async backconfirmdate () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20230227160002,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid": this.$route.query.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.queryMainData()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async onCopy () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20230102144502,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid": this.$route.query.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ /*this.tool.showMessage(res)*/
|
|
|
+ /* this.$store.dispatch('changeDetailDrawer',false)
|
|
|
+ this.$store.dispatch('changeDetailDrawer',true)
|
|
|
+ this.$router.push({path:'/orderdetail',query:{id:res.data.sa_orderid,rowindex:res.data.rowindex}})*/
|
|
|
+
|
|
|
+ this.$store.dispatch('changeDetailDrawer',false)
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.$router.replace({
|
|
|
+ path:'/orderdetail',
|
|
|
+ query:{
|
|
|
+ id:res.data.sa_orderid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$store.dispatch('changeDetailDrawer',true)
|
|
|
+ },500)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ select (data) {
|
|
|
+ this.selection = data
|
|
|
+ },
|
|
|
+ async adddispatch () {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": "20230220100604",
|
|
|
+ "content": {
|
|
|
+ "sa_orderid":this.mainData.sa_orderid,
|
|
|
+ "sa_orderitemsids": this.selection.map(e=>{
|
|
|
+ return e.sa_orderitemsid
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ let route = this.$route
|
|
|
+
|
|
|
+ this.oldRoute = {path:route.path,query:route.query}
|
|
|
+
|
|
|
+ this.$store.dispatch('setHistoryRouter',this.oldRoute)
|
|
|
+
|
|
|
+ this.$router.replace({path:'/dispatchdetail',query:{id:res.data.sa_dispatchid,rowindex:res.data.rowindex}})
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async bindImportOrder (id) {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": this.$refs.importFile.orderType == 1?20230308155803:20230227194803,
|
|
|
+ "content": {
|
|
|
+ "sa_orderid":this.$route.query.id,
|
|
|
+ "attachmentid":id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$refs['prod'].listData()
|
|
|
+ if (res.data !== '成功') {
|
|
|
+ this.errorUrl = res.data
|
|
|
+ }
|
|
|
+ this.queryMainData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.queryMainData(this.$route.query.id)
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.reveive__panel{
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 30px;
|
|
|
+ padding: 0 10px;
|
|
|
+ background: #d9ecff;
|
|
|
+ border: 1px dashed #0676e7;
|
|
|
+}
|
|
|
+.account__panel small,.reveive__panel small{
|
|
|
+ color:#888
|
|
|
+}
|
|
|
+</style>
|