1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633 |
- <template>
- <div class="borderless" v-loading="pageLoading">
- <div class="customer-head">
- <div class="customer-back">
- <!-- <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
- @click="backToList">返回列表
- </el-button>
- </div>
- <div class="add-customer-btn">
- <el-button
- v-if="detailData.seeDisabled"
- size="small"
- @click="editHandle"
- type="primary"
- >编 辑</el-button>
- <el-button type="primary"
- size="small"
- :disabled="!form.id"
- :loading="saveLoading"
- @click="postMessage"
- >发送消息</el-button>
- <el-button
- class="el-button--small-yh"
- type="primary"
- @click="revokeInGoods"
- size="small"
- v-if="form.deliveryStatus !== '录入'"
- :loading="saveLoading"
- :disabled="detailData.seeDisabled"
- >撤销发货</el-button>
- <el-button
- class="el-button--small-yh"
- type="primary"
- @click="sendInGoods"
- size="small"
- v-if="form.deliveryStatus == '录入'"
- :loading="saveLoading"
- :disabled="detailData.seeDisabled || !this.form.id"
- >确认发货</el-button>
- <el-button
- class="el-button--small-yh"
- size="small"
- type="success" @click="copyOrder"
- :loading="saveLoading"
- :disabled="detailData.seeDisabled || !this.form.id">
- 复制单据
- </el-button>
- <el-button
- class="el-button--small-yh"
- type="primary"
- :disabled="disabled || detailData.seeDisabled"
- @click="editCustomer(false)"
- size="small"
- :loading="saveLoading"
- >保 存
- </el-button>
- </div>
- </div>
- <div class="customer-main">
- <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
- <containerTitle title="基础资料"></containerTitle>
- <basic-container>
- <el-row>
- <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8">
- <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
- <!-- <avue-input-tree v-if="item.prop === 'corpsTypeId'" leaf-only multiple :props="{label:'title'}" v-model="form[item.prop]" placeholder="请选择内容" type="tree" :dic="dic"-->
- <!-- ></avue-input-tree>-->
- <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]"
- size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" :disabled="detailData.seeDisabled || receiveDisabled"/>
- <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]"
- size="small" type="date" placeholder="选择日期"
- :disabled="detailData.seeDisabled || receiveDisabled"/>
- <crop-select
- v-else-if="item.prop === 'corpId'"
- v-model="form[item.prop]"
- corpType="GYS"
- :disabled="detailData.seeDisabled || receiveDisabled"
- @getCorpData="returnBack"
- ></crop-select>
- <crop-select
- v-else-if="item.prop === 'salesCompany'"
- v-model="form[item.prop]"
- corpType="GS"
- :disabled="detailData.seeDisabled || receiveDisabled"
- @getCorpData="getGSName"
- ></crop-select>
- <!-- <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]"-->
- <!-- :configuration="configuration" style="width: 100%" :disabled="detailData.seeDisabled"/>-->
- <!-- <selectComponent v-else-if="item.prop === 'salesCompany'" v-model="form[item.prop]"-->
- <!-- :configuration="companyConfiguration" style="width: 100%" :disabled="detailData.seeDisabled"/>-->
- <el-select v-else-if="item.prop === 'purchaseMode'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || receiveDisabled">
- <el-option v-for="(item,index) in procurementMethodOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
- </el-select>
- <el-select v-else-if="item.prop === 'warehouseType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || receiveDisabled">
- <el-option v-for="(item,index) in warehouseTypeOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
- </el-select>
- <el-select
- v-else-if="item.prop === 'arrivalAddress'"
- v-model="form[item.prop]"
- placeholder="请选择"
- clearable
- filterable
- style="width: 100%"
- size="small"
- @change="arrivalAddressChange"
- :disabled="detailData.seeDisabled || receiveDisabled">
- <el-option v-for="(item,index) in GYSInfo" :key="index" :label="item.addr" :value="item.addr"></el-option>
- </el-select>
- <el-radio-group v-else-if="item.prop === 'logisticsConfirm'" v-model="form[item.prop]" :disabled="detailData.seeDisabled || receiveDisabled" @change="logisticsConfirmChange">
- <el-radio label="1">是</el-radio>
- <el-radio label="0">否</el-radio>
- </el-radio-group>
- <el-radio-group v-else-if="item.prop === 'assistantConfirm'" v-model="form[item.prop]" :disabled="detailData.seeDisabled || receiveDisabled" @change="assistantConfirmChange">
- <el-radio label="1">是</el-radio>
- <el-radio label="0">否</el-radio>
- </el-radio-group>
- <warehouse-select v-else-if="item.prop === 'storageId'" v-model="form[item.prop]"
- :configuration="configurationWarehouse" style="width: 100%" :disabled="detailData.seeDisabled || receiveDisabled"/>
- <el-input
- v-else-if="item.type == 'number'"
- placeholder="请输入"
- v-input-limit="2"
- size="small"
- :disabled="item.disabled || detailData.seeDisabled || receiveDisabled"
- v-model.trim="form[item.prop]"
- />
- <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || receiveDisabled"></el-input>
- <el-input type="age" v-else v-model.trim="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled || detailData.seeDisabled || receiveDisabled"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </basic-container>
- <containerTitle title="商品信息"></containerTitle>
- <basic-container>
- <avue-crud
- :option="customerContact"
- v-model="contactsForm"
- :data="contactsData"
- ref="crudContact"
- @row-save="rowSave"
- @row-click="handleRowClick"
- @row-update="rowUpdate"
- @row-del="rowDel"
- @saveColumn="saveColumn('goods')"
- @resetColumn="resetColumn"
- >
- <template slot="headerSerial">
- <el-button type="primary" icon="el-icon-circle-plus-outline" circle size="mini" @click="$refs.crudContact.rowCellAdd()"></el-button>
- </template>
- <template slot="code" slot-scope="{row}">
- <el-button type="text" size="mini" style="padding:4px 10px;float:left" :disabled="detailData.seeDisabled || !row.$cellEdit" @click="commodityChoice(row)">选择</el-button>
- <span>{{ row.code }}</span>
- </template>
- <template slot-scope="{row,index}" slot="menu">
- <el-button
- type="text"
- size="small"
- @click="rowCell(row,index)"
- :disabled="detailData.seeDisabled || receiveDisabled"
- >{{ row.$cellEdit ? '保存' : '修改' }}
- </el-button>
- <el-button
- size="small"
- icon="el-icon-delete"
- type="text"
- @click="rowDel(row, index)"
- :disabled="detailData.seeDisabled || receiveDisabled"
- v-if="!row.$cellEdit"
- >删 除</el-button>
- </template>
- <template slot="actualQuantity" slot-scope="{ row }">
- <el-input
- v-if="row.$cellEdit"
- v-model.trim="row.actualQuantity"
- v-input-limit="0"
- @input="actualQuantityChange(row)"
- ></el-input>
- <span v-else>{{ row.actualQuantity | IntegerFormat }}</span>
- </template>
- <template slot="purchaseQuantity" slot-scope="{ row }">
- <span>{{ row.purchaseQuantity | IntegerFormat }}</span>
- </template>
- <template slot="purchaseAmount" slot-scope="{ row }">
- <span>{{ row.purchaseAmount | decimalFormat }}</span>
- </template>
- <template slot="deliveryAmount" slot-scope="{ row }">
- <span>{{ row.deliveryAmount | decimalFormat }}</span>
- </template>
- <template slot="menuLeft" slot-scope="{size}">
- <el-button type="primary"
- icon="el-icon-plus"
- size="small"
- @click="commoditySelection"
- :disabled="detailData.seeDisabled || receiveDisabled"
- >录入明细
- </el-button>
- <el-button type="info" :size="size" icon="el-icon-printer">报表打印</el-button>
- </template>
- </avue-crud>
- </basic-container>
- <fee-info
- ref="feeInfo"
- :orderFeesList="advantageProjectData"
- :disabled="detailData.seeDisabled || receiveDisabled"
- @beforeFinance="beforeFinance"
- :srcType="3"
- optionType="GN"
- itemType="发货"
- feeUrl="/blade-deliver-goods/deliveryfees/update"
- :corpId="form.corpId"
- />
- <containerTitle title="附件上传"></containerTitle>
- <c-upload
- :data="bankOfDepositData"
- deleteUrl="/api/blade-deliver-goods/deliveryfiles/update"
- :enumerationValue="77"
- />
- </el-form>
- </div>
- <el-dialog
- title="导入商品"
- append-to-body
- class="el-dialogDeep"
- :visible.sync="dialogVisible"
- width="80%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- @close="closeGoods">
- <el-row :style="{height: rowHeight}">
- <el-col :span="5" style="height: 100%;overflow-y: auto">
- <div>
- <el-scrollbar>
- <basic-container>
- <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick"/>
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col>
- <el-col :span="19">
- <basic-container>
- <avue-crud :option="optionTwo"
- :table-loading="loading"
- :data="data"
- ref="crud"
- @refresh-change="refreshChange"
- @selection-change="selectionChange"
- :page.sync="page"
- @search-change="goodsSearch"
- @on-load="onLoad"></avue-crud>
- </basic-container>
- </el-col>
- </el-row>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
- <el-button type="primary" @click="importChoice" v-if="commodityData === true"
- :disabled="tableData.length !== 1">导入</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="导入费用"
- append-to-body
- class="el-dialogDeep"
- :visible.sync="dialogCost"
- width="80%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- @close="closeFees">
- <el-row :style="{height: rowHeight}">
- <el-col :span="5" style="height: 100%;overflow-y: auto">
- <div>
- <el-scrollbar>
- <basic-container>
- <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col>
- <el-col :span="19">
- <basic-container>
- <avue-crud :option="optionTwoCost"
- :table-loading="loadingCost"
- :data="dataCost"
- ref="crud"
- @refresh-change="refreshChangeCost"
- @selection-change="selectionChangeCost"
- :page.sync="pageCost"
- @searchChange="feesSearch"
- @on-load="onLoadCost">
- </avue-crud>
- </basic-container>
- </el-col>
- </el-row>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogCost = false">取 消</el-button>
- <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
- <el-button type="primary" @click="choiceCost" v-if="choiceData === true"
- :disabled="tableDataCost.length !== 1">导入</el-button>
- </span>
- </el-dialog>
- <messagePost
- v-if="messageVisble"
- ref="messagePost"
- @closeDialog="closeDialog"
- ></messagePost>
- </div>
- </template>
- <script>
- import {
- typeSave, detail, deleteDetails,
- corpstypeTree,
- corpsattn,
- corpsbank,
- corpsfiles,
- corpsitem,
- // getList,
- sendInGoods,
- revokeInGoods
- } from "@/api/basicData/receipt"
- import {getList} from "@/api/basicData/commodityType";
- import customerContact from "./configuration/customerContact.json"
- import advantageProject from "./configuration/advantageProject.json"
- import bankOfDeposit from "./configuration/bankOfDeposit.json"
- import commodity from "./configuration/commodity.json"
- import optionTwoCost from "./configuration/mainListCost.json"
- import {getDeptLazyTree, customerList,getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc";
- import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
- import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
- import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
- import { contrastObj, contrastList } from "@/util/contrastData";
- import feeInfo from "@/components/fee-info/main";
- import {
- isDiscount,
- isPercentage,
- micrometerFormat,
- IntegerFormat
- } from "@/util/validate";
- import {detail as GYSDetail} from "@/api/basicData/customerInformation";
- import { getMarketPrice, getPurchasePrice } from "@/api/basicData/fees";
- import { dateFormat } from "@/util/date";
- export default {
- name: "detailsPage",
- props: {
- detailData: {
- type: Object
- }
- },
- components: {
- feeInfo,
- },
- data() {
- return {
- saveLoading: false,
- configuration: {
- multipleChoices: false,
- multiple: false,
- collapseTags: false,
- placeholder: '请点击右边按钮选择',
- dicData: []
- },
- companyConfiguration: {
- multipleChoices: false,
- multiple: false,
- collapseTags: false,
- placeholder: '请点击右边按钮选择',
- dicData: []
- },
- configurationWarehouse: {
- multipleChoices: false,
- multiple: false,
- collapseTags: false,
- placeholder: "请点击右边按钮选择",
- dicData: [],
- },
- form: {},
- data: [],
- loadingCost: false,
- choiceData: false,
- commodityData: false,
- dataCost: [],
- choiceIndex: '',
- dialogCost: false,
- treeDeptId: '',
- treeDeptIdCost: '',
- pageCost: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- loading: false,
- contactsForm: {},
- optionTwo: commodity,
- optionTwoCost: optionTwoCost,
- treeData: [],
- treeDataGoods: [],
- treeOptionCost: {
- nodeKey: 'id',
- lazy: true,
- treeLoad: function (node, resolve) {
- const parentId = (node.level === 0) ? 0 : node.data.id;
- getDeptLazyTree(parentId).then(res => {
- resolve(res.data.data.map(item => {
- return {
- ...item,
- leaf: !item.hasChildren
- }
- }))
- });
- },
- addBtn: false,
- menu: false,
- size: 'small',
- props: {
- labelText: '标题',
- label: 'title',
- value: 'value',
- children: 'children'
- }
- },
- treeOption: {
- nodeKey: 'id',
- lazy: true,
- treeLoad: function (node, resolve) {
- const parentId = (node.level === 0) ? 0 : node.data.id;
- getDeptLazyTreeTwo(parentId).then(res => {
- resolve(res.data.data.map(item => {
- return {
- ...item,
- leaf: !item.hasChildren
- }
- }))
- });
- },
- addBtn: false,
- menu: false,
- size: 'small',
- props: {
- labelText: '标题',
- label: 'title',
- value: 'value',
- children: 'children'
- }
- },
- dialogVisible: false,
- advantageProjectForm: {},
- bankOfDepositForm: {},
- contactsData: [],
- advantageProjectData: [],
- disabled: false,
- bankOfDepositData: [],
- tableDataCost: [],
- dic: [],
- tableData: [],
- customerContact: {},
- advantageProject: {},
- bankOfDeposit: bankOfDeposit,
- basicData: {
- column: [
- {
- label: '系统编号',//发货通知(点击)
- prop: 'sysNo',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '供应商',
- prop: 'corpId',
- span: 16,
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },{
- label: '采购方式',
- prop: 'purchaseMode',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '所属公司',
- prop: 'salesCompany',
- span: 16,
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },{
- label: '仓库类型',
- prop: 'warehouseType',//字典表
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '仓库名称',
- prop: 'storageId',
- span: 16,
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '匹配订单号',
- prop: 'srcOrderNo',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },{
- label: '入库金额',
- prop: 'deliveryAmount',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '采购金额',
- prop: 'purchaseAmount',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },{
- label: '入库数量',
- prop: 'totalQuantity',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '费用合计',
- type: 'number',
- prop: 'totalCost',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '入库日期',
- prop: 'businessDate',
- type: 'datetime',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '发货地址',
- prop: 'arrivalAddress',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '发货人',
- prop: 'arrivalContact',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '发货电话',
- prop: 'arrivalTel',
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "物流确认",
- prop: "logisticsConfirm",
- },
- {
- label: "操作人",
- prop: "logisticsConfirmUser",
- disabled:true
- },
- {
- label: "操作时间",
- prop: "logisticsConfirmTime",
- disabled:true
- },
- {
- label: "助理确认",
- prop: "assistantConfirm",
- },
- {
- label: "操作人",
- prop: "assistantConfirmUser",
- disabled:true
- },
- {
- label: "操作时间",
- prop: "assistantConfirmTime",
- disabled:true
- },
- {
- label: '重量合计',
- prop: 'totalWeight',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },{
- label: '体积合计',
- prop: 'totalVolumn',
- disabled: true,
- rules: [
- {
- required: false,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },
- {
- label: "入库单备注",
- span: 24,
- type: 'textarea',
- prop: "deliveryRemarks",
- mock: {
- type: 'county'
- }
- }
- ]
- },
- statusOption: [],
- procurementMethodOption: [],
- warehouseTypeOption: [],
- // 仓库类型
- warehouseType: [],
- // 仓库名称
- warehouseName: [],
- // 第一次进入
- firstComing: false,
- // 费用信息排序的最大值
- maxFeeNum: 0,
- maxGoodsNum: 0,
- oldForm: {
- orderStatus: "录入"
- },
- oldGoodsList: [],
- oldFeesList: [],
- oldUploadList: [],
- // 弹窗高度
- rowHeight: '',
- // 查询时loading页面
- pageLoading: false,
- // 发货禁用
- receiveDisabled: false,
- messageVisble:false,
- GYSInfo: [], //供应商发货方信息
- }
- },
- mounted() {
- this.$nextTick(() => {
- // 监听浏览器高度变化,改变表格高度
- window.onresize = () => {
- this.rowHeight = (window.innerHeight - 130) + 'px'
- }
- })
- },
- filters: {
- IntegerFormat(num) {
- return IntegerFormat(num);
- },
- decimalFormat(num) {
- return num ? Number(num).toFixed(2) : "0.00";
- }
- },
- //初始化查询
- async created() {
- this.rowHeight = (window.innerHeight - 130) + 'px'
- this.customerContact = await this.getColumnData(this.getColumnName(24), customerContact);
- this.advantageProject = await this.getColumnData(this.getColumnName(25), advantageProject);
- this.getWorkDicts("procurement_method").then(res => {
- this.procurementMethodOption = res.data.data
- })
- this.getWorkDicts("warehouseType").then(res => {
- this.warehouseTypeOption = res.data.data
- })
- wareHouseType().then(res => {
- this.warehouseType = res.data.data.records
- this.warehouseType.forEach(item => {
- this.$set(item, 'label', item.cname)
- this.$set(item, 'value', item.id)
- if (item.hasChildren) {
- this.$set(item, 'children', [])
- }
- })
- let result = [], temp = {}
- for(let i = 0; i < this.warehouseType.length;i++) {
- temp[this.warehouseType[i].id] = this.warehouseType[i]
- }
- for (let j = 0;j < this.warehouseType.length;j++) {
- let current = this.warehouseType[j]
- let tempCurrentParent = temp[current.parentId]
- if (tempCurrentParent) {
- if (!tempCurrentParent["children"]) {
- tempCurrentParent["children"] = []
- }
- tempCurrentParent["children"].push(current)
- } else {
- result.push(current)
- }
- }
- this.warehouseType = result
- });
- selectWareHouse().then(res => {
- this.warehouseName = res.data.data.records
- })
- this.form.deliveryAmount = 0
- this.form.totalQuantity = 0
- this.form.purchaseAmount = 0
- this.form.deliveryStatus = '录入'
- if (this.detailData.id) {
- this.queryData(this.detailData.id)
- }else if (this.detailData.form){
- this.form = JSON.parse(this.detailData.form);
- this.$set(this.form, 'orgId', this.form.id);
- delete this.form.createTime
- delete this.form.id
- delete this.form.sysNo
- this.contactsData = this.form.orderItemsList
- delete this.form.orderItemsList
- this.configuration.dicData = this.form.corpName
- delete this.form.corpName
- this.$set(this.form, 'deliveryStatus', '录入')
- this.$set(this.form, 'salesCompany', this.form.belongToCorpId)
- this.$set(this.form, 'totalWeight', this.form.cartonWeight)
- this.$set(this.form, 'totalVolumn', this.form.cntrVolumn)
- delete this.form.belongToCorpList
- this.$set(this.form, 'deliveryAmount', 0)
- this.$set(this.form, 'totalQuantity', 0)
- this.$set(this.form, 'purchaseAmount', 0)
- this.returnBack({id: this.form.corpId})
- this.contactsData.forEach(item => {
- this.$set(item, 'containerVolume', item.cntrVolumn)
- this.$set(item, 'actualWeight', item.cartonWeight)
- this.$set(item, 'specificationAndModel', item.itemType)
- this.$set(item, 'orgOrderNo', this.form.orgOrderNo)
- this.$set(item, "inventoryNumber", item.storageQuantity)
- this.$set(item, "srcId", item.id)
- // this.$set(item, "deliveryAmount", item.amount)
- this.$set(item, "purchaseAmount", item.purchaseAmount)
- this.$set(item, "purchaseQuantity", Number(item.orderQuantity))
- this.$set(item, "actualQuantity", (Number(item.orderQuantity) - Number(item.actualQuantity)))
- this.actualQuantityChange(item)
- // 入库数量和入库金额的比例
- // this.$set(item, 'scale', Number(item.deliveryAmount / item.actualQuantity))
- this.form.deliveryAmount = Number(this.form.deliveryAmount) + Number(item.deliveryAmount)
- this.form.totalQuantity = Number(this.form.totalQuantity) + Number(item.actualQuantity)
- this.form.purchaseAmount = Number(this.form.purchaseAmount) + Number(item.deliveryAmount)
- this.form.deliveryAmount = (this.form.deliveryAmount).toFixed(2)
- this.form.purchaseAmount = (this.form.purchaseAmount).toFixed(2)
- delete item.id
- delete item.pid
- })
- } else if (this.detailData.copyId) {
- this.queryData(this.detailData.copyId, true)
- }
- },
- watch: {
- },
- methods: {
- queryData(id, isCopy = false) {
- this.pageLoading = true
- this.saveLoading = true
- detail(id).then(res => {
- this.form = res.data.data;
- this.receiveDisabled = this.form.deliveryStatus == '录入'? false: true
- this.contactsData = this.form.deliveryItemsList
- this.advantageProjectData = this.form.deliveryFeesList
- this.bankOfDepositData = this.form.deliveryFilesList
- this.configuration.dicData = this.form.corpName
- this.contactsData.forEach(item => {
- // this.form.deliveryAmount += Number(item.deliveryAmount)
- // this.form.totalQuantity += Number(item.actualQuantity)
- // 入库金额和入库数量的比例
- // this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
- })
- let feesData = []
- this.form.deliveryFeesList.forEach(item => {
- let a = {
- cname: item.corpName,
- id: item.corpId
- }
- feesData.push(a)
- })
- this.configuration.dicData = this.configuration.dicData.concat(feesData)
- // 去重
- this.removeRepeat()
- if (this.form.companyName) {
- this.companyConfiguration.dicData = this.companyConfiguration.dicData.concat(this.form.companyName)
- }
- delete this.form.deliveryItemsList
- delete this.form.deliveryFeesList
- delete this.form.deliveryFilesList
- delete this.form.corpName
- delete this.form.companyName
- // 获取最大值
- let num = []
- this.advantageProjectData.forEach(item => {
- num.push(item.sort)
- })
- if (num.length == 0) {
- this.maxFeeNum = 0;
- } else {
- this.maxFeeNum = num.reduce((a, b) => {
- return b > a? b: a;
- })
- }
- let goodsNum = []
- this.contactsData.forEach(item => {
- goodsNum.push(item.sort)
- })
- if (goodsNum.length == 0) {
- this.maxGoodsNum = 0;
- } else {
- this.maxGoodsNum = goodsNum.reduce((a, b) => {
- return b > a? b: a;
- })
- }
- this.oldGoodsList = []
- this.oldFeesList = []
- this.oldUploadList = []
- this.oldForm = Object.assign({}, this.form)
- this.oldGoodsList = this.deepClone(this.contactsData)
- this.oldFeesList = this.deepClone(this.advantageProjectData)
- this.oldUploadList = this.deepClone(this.bankOfDepositData)
- if (isCopy) {
- delete this.form.id
- delete this.form.sysNo
- this.contactsData.forEach(item => {
- delete item.id
- delete item.pid
- delete item.itemId
- })
- this.advantageProjectData.forEach(item => {
- delete item.id
- delete item.pid
- })
- this.bankOfDepositData.forEach(item => {
- delete item.id
- delete item.pid
- })
- this.form.deliveryStatus = '录入'
- this.receiveDisabled = false;
- }
- }).finally(() => {
- this.saveLoading = false
- this.pageLoading = false
- });
- },
- copyOrder() {
- this.queryData(this.form.id, true)
- },
- // 入库数量变化时调用
- actualQuantityChange(row) {
- if (Number(row.actualQuantity) > Number(row.purchaseQuantity)) {
- this.$message.error('入库数量不能超过采购数量')
- row.actualQuantity = '0.00'
- row.deliveryAmount = '0.00'
- } else {
- this.$set(row, 'deliveryAmount', Number(row.actualQuantity) * Number(row.purchaseAmount))
- // row.deliveryAmount = Number(row.actualQuantity) * Number(row.purchaseAmount)
- }
- },
- // 类别变换时触发
- warehouseTreeChange(id) {
- this.warehouseName = []
- if (this.firstComing) {
- if (!this.form.storageId) {
- this.$set(this.form, 'storageId', null)
- } else {
- this.form.storageId = null
- }
- }
- let data = {
- storageTypeId: id
- }
- selectWareHouse(data).then(res => {
- this.warehouseName = res.data.data.records
- })
- this.firstComing = true
- },
- //点击行可编辑
- handleRowClick(row, event, column) {
- console.log(row.$index)
- },
- //商品编辑
- rowCell(row, index) {
- this.$refs.crudContact.rowCell(row, row.$index)
- },
- //费用编辑
- rowCellTwo(row, index) {
- this.$refs.crudProject.rowCell(row, row.$index)
- },
- //费用新增触发
- costIncrease() {
- this.dialogCost = !this.dialogCost
- this.choiceData = false
- },
- //商品新增触发
- commoditySelection() {
- this.dialogVisible = !this.dialogVisible
- this.tableData = []
- this.commodityData = false
- },
- //点击费用明细选择触发
- choice(row) {
- this.dialogCost = !this.dialogCost
- this.choiceData = true
- console.log(row)
- this.choiceIndex = row.$index
- },
- //点击商品明细选择触发
- commodityChoice(row) {
- this.dialogVisible = !this.dialogVisible
- this.commodityData = true
- console.log(row)
- this.choiceIndexT = row.$index
- },
- //导入商品触发
- importChoice() {
- if (this.tableData.length === 1) {
- this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
- this.contactsData[this.choiceIndexT].code = this.tableData[0].code
- this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
- this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].typeno
- this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
- getPurchasePrice({code: this.contactsData[this.choiceIndexT].code}).then(res => {
- if (res.data.data.length > 0) {
- this.$set(this.contactsData[this.choiceIndexT], 'purchaseAmount', res.data.data[0].purchasePrice)
- } else {
- this.$set(this.contactsData[this.choiceIndexT], 'purchaseAmount', '0')
- }
- })
- selectGoodsNum({
- goodsId: this.tableData[0].id,
- itemType: this.tableData[0].typeno
- }).then(res => {
- this.contactsData[this.choiceIndexT].storageQuantity = res.data.data
- })
- }
- this.dialogVisible = !this.dialogVisible
- this.commodityData = false
- },
- //费用编辑导入触发
- choiceCost() {
- if (this.tableDataCost.length === 1) {
- this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
- this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
- this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
- }
- this.dialogCost = !this.dialogCost
- this.choiceData = false
- },
- //费用导入触发
- importCost() {
- console.log('111111')
- // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
- if (this.tableDataCost.length > 0) {
- for (let item in this.tableDataCost) {
- console.log(this.tableDataCost[item])
- this.tableDataCost[item].itemId = this.tableDataCost[item].id
- this.tableDataCost[item].feeName = this.tableDataCost[item].cname
- this.tableDataCost[item].sort = this.maxFeeNum + 1
- this.maxFeeNum++
- delete this.tableDataCost[item].id
- this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
- this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length - 1)
- }
- }
- this.tableDataCost = []
- this.dialogCost = false
- },
- //确认导入触发
- importGoods() {
- // this.contactsData = this.contactsData.concat(this.tableData)
- if (this.tableData.length > 0) {
- for (let item in this.tableData) {
- getPurchasePrice({code: this.tableData[item].code}).then(res => {
- if (res.data.data.length > 0) {
- this.$set(this.tableData[item], 'purchaseAmount', res.data.data[0].purchasePrice)
- } else {
- this.$set(this.tableData[item], 'purchaseAmount', '0')
- }
- })
- selectGoodsNum({
- goodsId: this.tableData[item].id,
- itemType: this.tableData[item].typeno
- }).then(res => {
- this.tableData[item].storageQuantity = res.data.data
- this.tableData[item].itemId = this.tableData[item].id
- this.tableData[item].priceCategory = this.tableData[item].goodsTypeName
- delete this.tableData[item].goodsTypeName
- delete this.tableData[item].id
- delete this.tableData[item].status
- delete this.tableData[item].isDeleted
- this.$set(this.tableData[item], 'specificationAndModel', this.tableData[item].typeno)
- this.$set(this.tableData[item], 'purchaseQuantity', 0)
- this.$set(this.tableData[item], 'actualQuantity', 0)
- this.$set(this.tableData[item], 'purchaseAmount', 0)
- this.$set(this.tableData[item], 'deliveryAmount', 0)
- this.tableData[item].sort = this.maxGoodsNum + 1
- this.maxGoodsNum++
- this.$refs.crudContact.rowCellAdd(this.tableData[item]);
- this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
- })
- }
- }
- this.dialogVisible = false
- },
- closeGoods() {
- this.treeDataGoods = [];
- this.treeDeptId = "";
- },
- closeFees() {
- this.treeDeptIdCost = "";
- this.treeData = [];
- },
- logisticsConfirmChange(row){
- if(row==1){
- this.$set(this.form, 'logisticsConfirmUser',JSON.parse(localStorage.getItem("saber-userInfo")).content.real_name)
- this.$set(this.form, 'logisticsConfirmTime',dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss"))
- }else{
- this.$set(this.form, 'logisticsConfirmUser',null)
- this.$set(this.form, 'logisticsConfirmTime',null)
- }
- },
- assistantConfirmChange(row){
- if(row==1){
- this.$set(this.form, 'assistantConfirmUser',JSON.parse(localStorage.getItem("saber-userInfo")).content.real_name)
- this.$set(this.form, 'assistantConfirmTime',dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss"))
- }else{
- this.$set(this.form, 'assistantConfirmUser',null)
- this.$set(this.form, 'assistantConfirmTime',null)
- }
- },
- //选中触发
- selectionChange(list) {
- console.log(list);
- this.tableData = list
- },
- //费用选中触发
- selectionChangeCost(list) {
- console.log(list);
- this.tableDataCost = list
- },
- //导入页左商品类型查询
- nodeClick(data) {
- this.treeDeptId = data.id;
- this.page.currentPage = 1;
- this.onLoad(this.page);
- },
- //导入页左费用类型查询
- nodeClickCost(data) {
- this.treeDeptIdCost = data.id;
- this.pageCost.currentPage = 1;
- this.onLoadCost(this.pageCost);
- },
- //刷新触发
- refreshChange() {
- this.treeDeptId = '';
- this.page.currentPage = 1;
- this.onLoad(this.page);
- },
- //费用刷新触发
- refreshChangeCost() {
- this.treeDeptIdCost = '';
- this.pageCost.currentPage = 1;
- this.onLoadCost(this.pageCost);
- },
- //新增商品信息保存触发
- rowSave(row, done, loading) {
- // this.contactsData.push(row)
- done()
- },
- //修改商品信息触发
- rowUpdate(row, index, done, loading) {
- done(row);
- },
- //删除商品信息触发
- rowDel(row, index, donerowDel) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- //商品判断是否需要调用删除接口
- if (row.id) {
- corpsattn(row.id).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.contactsData.splice(row.$index, 1);
- })
- } else {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.contactsData.splice(row.$index, 1);
- }
- })
- },
- //新增费用明细保存触发
- rowSaveProject(row, done, loading) {
- // this.advantageProjectData.push(row)
- done()
- },
- //修改费用明细触发
- rowUpdateProject(row, index, done, loading) {
- done(row);
- },
- goodsSearch(params, done) {
- this.treeDeptId = '';
- this.onLoad(this.page, params);
- done()
- },
- //商品列表查询
- onLoad(page, params = {}) {
- this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
- console.log(res)
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- });
- },
- // 费用查询按钮
- feesSearch(params, done) {
- this.treeDeptIdCost = '';
- this.onLoadCost(this.pageCost, params)
- done()
- },
- //费用查询
- onLoadCost(page, params = {}) {
- this.loadingCost = true;
- let queryParams = Object.assign({}, params, {
- pageSize: page.pageSize,
- pageNum: page.currentPage,
- parentId: 0,
- feesTypeId: this.treeDeptIdCost
- })
- customerList(queryParams).then(res => {
- console.log(res)
- const data = res.data.data;
- this.pageCost.total = data.total;
- this.dataCost = data.records;
- this.loadingCost = false;
- });
- },
- //删除费用明细触发
- rowDelProject(row, index, donerowDel) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- //费用判断是否需要调用删除接口
- if (row.id) {
- corpsitem(row.id).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.advantageProjectData.splice(row.$index, 1);
- })
- } else {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.advantageProjectData.splice(row.$index, 1);
- }
- })
- },
- // 去重
- removeRepeat() {
- let obj = []
- this.configuration.dicData = this.configuration.dicData.reduce((current,next) => {
- obj[next.id] ? '': obj[next.id] = true && current.push(next)
- return current
- }, [])
- },
- receiveList(data){
- this.configuration.dicData = this.configuration.dicData.concat(data)
- this.removeRepeat()
- },
- // 确认发货
- sendInGoods() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.contactsData.length == 0) {
- return this.$message.error('商品信息为空')
- }
- if (contrastObj(this.form, this.oldForm) ||
- contrastList(this.contactsData, this.oldGoodsList) ||
- // contrastList(this.advantageProjectData, this.oldFeesList) ||
- contrastList(this.bankOfDepositData, this.oldUploadList)
- ) {
- this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(async () => {
- await this.editCustomer(false, '发货')
- }).catch(() => {
- this.$message.info('已取消')
- })
- } else {
- //商品信息
- this.form.deliveryItemsList = this.contactsData
- this.form.deliveryFeesList = this.advantageProjectData
- this.form.deliveryFilesList = this.bankOfDepositData
- if (typeof this.form.corpsTypeId == 'object') {
- this.form.corpsTypeId = this.form.corpsTypeId.join(",")
- }
- this.saveLoading = true
- this.pageLoading = true
- sendInGoods(this.form).then(res => {
- this.$message.success('发货成功')
- this.queryData(res.data.data.id)
- }).finally(() => {
- this.pageLoading = false
- this.saveLoading = false
- })
- }
- } else {
- return false;
- }
- });
- },
- // 撤销发货
- revokeInGoods() {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- //商品信息
- this.form.deliveryItemsList = this.contactsData
- this.form.deliveryFeesList = this.advantageProjectData
- this.form.deliveryFilesList = this.bankOfDepositData
- if (typeof this.form.corpsTypeId == 'object') {
- this.form.corpsTypeId = this.form.corpsTypeId.join(",")
- }
- this.pageLoading = true
- this.saveLoading = true
- revokeInGoods(this.form).then(res => {
- this.$message.success('撤销成功')
- this.queryData(res.data.data.id)
- }).finally(() => {
- this.pageLoading = false
- this.saveLoading = false
- })
- } else {
- return false;
- }
- });
- },
- //修改提交触发
- editCustomer(isBack = false, type) {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- this.form.deliveryAmount = 0
- this.form.totalQuantity = 0
- this.form.purchaseAmount = 0
- this.contactsData.forEach(item => {
- this.form.deliveryAmount = Number(this.form.deliveryAmount) + Number(item.deliveryAmount)
- this.form.totalQuantity = Number(this.form.totalQuantity) + Number(item.actualQuantity)
- this.form.purchaseAmount = Number(this.form.purchaseAmount) + Number(item.deliveryAmount)
- this.form.deliveryAmount = (this.form.deliveryAmount).toFixed(2)
- this.form.purchaseAmount = (this.form.purchaseAmount).toFixed(2)
- })
- //商品信息
- this.form.deliveryItemsList = this.contactsData
- // this.form.deliveryFeesList = this.advantageProjectData
- this.form.deliveryFeesList = this.$refs.feeInfo.submitData()
- this.form.deliveryFilesList = this.bankOfDepositData
- if (typeof this.form.corpsTypeId == 'object') {
- this.form.corpsTypeId = this.form.corpsTypeId.join(",")
- }
- // this.form.id && this.unLock({moduleName: 'sh',tableName: 'business_delivery', billId: this.form.id})
- this.saveLoading = true
- typeSave(this.form).then(res => {
- // this.$set(this.detailData, 'seeDisabled', true);
- this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
- if (isBack) {
- //成功关闭此页面回到列表页
- this.$emit("goBack");
- this.leaveDetailsKey(this.$route.name)
- } else {
- this.queryData(res.data.data.id)
- }
- if (type == '发货') {
- this.$nextTick(() => {
- this.form.deliveryItemsList = this.contactsData
- this.form.deliveryFeesList = this.advantageProjectData
- this.form.deliveryFilesList = this.bankOfDepositData
- if (typeof this.form.corpsTypeId == 'object') {
- this.form.corpsTypeId = this.form.corpsTypeId.join(",")
- }
- this.pageLoading = true
- this.saveLoading = true
- sendInGoods(this.form).then(res => {
- this.$message.success('发货成功')
- this.queryData(res.data.data.id)
- }).finally(() => {
- this.pageLoading = false
- this.saveLoading = false
- })
- })
- }
- }).catch(() => {
- this.pageLoading = false
- this.saveLoading = false
- })
- }
- });
- },
- //返回列表
- backToList() {
- if (contrastObj(this.form, this.oldForm) ||
- contrastList(this.contactsData, this.oldGoodsList) ||
- // contrastList(this.advantageProjectData, this.oldFeesList) ||
- contrastList(this.bankOfDepositData, this.oldUploadList)
- ) {
- this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- this.editCustomer(true)
- }).catch(() => {
- !this.detailData.seeDisabled && this.form.id && this.unLock({moduleName: 'sh',tableName: 'business_delivery', billId: this.form.id})
- this.$emit("goBack");
- this.leaveDetailsKey(this.$route.name)
- })
- } else {
- !this.detailData.seeDisabled && this.form.id && this.unLock({moduleName: 'sh',tableName: 'business_delivery', billId: this.form.id})
- this.$emit("goBack");
- this.leaveDetailsKey(this.$route.name)
- }
- },
- // 保存列设置
- async saveColumn(name) {
- if (name == 'goods') {
- const inSave = await this.saveColumnData(
- this.getColumnName(24),
- this.customerContact
- );
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
- this.$nextTick(() => {
- this.$refs.crudContact.doLayout()
- })
- }
- } else if (name === 'fees') {
- const inSave = await this.saveColumnData(
- this.getColumnName(25),
- this.advantageProject
- );
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs.crudProject.$refs.dialogColumn.columnBox = false;
- }
- }
- },
- async resetColumn() {
- this.customerContact = customerContact
- const inSave = await this.delColumnData(
- this.getColumnName(24),
- customerContact
- );
- if (inSave) {
- this.$nextTick(() => {
- this.$refs.crudContact.doLayout()
- })
- this.$message.success("重置成功");
- //关闭窗口
- this.$refs.crudContact.$refs.dialogColumn.columnBox = false;
- }
- },
- //费用明细回调
- beforeFinance(feesData,callback){
- this.advantageProjectData = feesData;
- let params = {}
- //暂时默认通过 之后优化
- params.valid = true
- params.parentId = this.form.id
- params.srcOrderno = this.form.orderNo
- callback(params)
- },
- // 发送消息
- postMessage() {
- this.messageVisble = true
- this.$nextTick(() => {
- this.$refs.messagePost.init()
- })
- },
- closeDialog() {
- this.messageVisble = false
- },
- editHandle() {
- const data = {
- moduleName: 'sh',
- tableName: 'business_delivery',
- billId: this.form.id,
- no: localStorage.getItem('browserID'),
- billNo: this.form.sysNo
- }
- this.saveLoading = true
- this.checkLock(data).then(res => {
- if (res.data.code == 200) {
- this.onLock(data).then(response => {
- this.queryData(this.form.id)
- })
- this.inDetailsKey(this.$route.name, {
- moduleName: 'sh',
- tableName: 'business_delivery',
- billId: this.form.id,
- })
- this.detailData.seeDisabled = false;
- }
- }).catch(error => {
- }).finally(() => {
- this.saveLoading = false
- })
- },
- returnBack(data) {
- GYSDetail(data.id).then(res => {
- if (res.data.data.corpsAddrList.length > 0) {
- this.GYSInfo = res.data.data.corpsAddrList
- this.$set(this.form, 'arrivalAddress', this.GYSInfo[0].addr);
- this.$set(this.form, 'arrivalContact', this.GYSInfo[0].attn);
- this.$set(this.form, 'arrivalTel', this.GYSInfo[0].tel);
- } else {
- this.GYSInfo = []
- this.$set(this.form, 'arrivalAddress', null);
- this.$set(this.form, 'arrivalContact', null);
- this.$set(this.form, 'arrivalTel', null);
- }
- })
- if (data.belongtocompany) {
- // this.form.salesCompany = data.belongtocompany
- }
- },
- getGSName(row) {
- this.form.belongCompany = row.cname
- },
- arrivalAddressChange(val) {
- let isTrue = false
- this.GYSInfo.forEach(item => {
- if (val == item.addr) {
- this.$set(this.form, 'arrivalContact', item.attn)
- this.$set(this.form, 'arrivalTel', item.tel)
- isTrue = true
- }
- })
- if (!isTrue) {
- this.$set(this.form, 'arrivalContact', null)
- this.$set(this.form, 'arrivalTel', null)
- }
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- //.customer-head {
- // position: fixed;
- // top: 105px;
- // width: 100%;
- // margin-left: -10px;
- // height: 62px;
- // background: #ffffff;
- // box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
- // z-index: 999;
- // /* display: flex;
- // justify-content: left; */
- //}
- //
- //.customer-back {
- // cursor: pointer;
- // line-height: 62px;
- // font-size: 16px;
- // color: #323233;
- // font-weight: 400;
- //}
- .back-icon {
- line-height: 64px;
- font-size: 20px;
- margin-right: 8px;
- }
- //.add-customer-btn {
- // position: fixed;
- // right: 36px;
- // top: 115px;
- //}
- ::v-deep .el-form-item {
- margin-bottom: 0;
- }
- .el-dialogDeep {
- ::v-deep .el-dialog {
- margin: 1vh auto 0 !important;
- padding-bottom: 10px !important;
- .el-dialog__body, .el-dialog__footer {
- padding-bottom: 0 !important;
- padding-top: 0 !important;
- }
- }
- }
- .print-div {
- color: #000;
- }
- .print_table {
- table {
- border-right: 1px solid #000;
- border-bottom: 1px solid #000;
- font-size: 12px;
- margin-bottom: 5px;
- }
- table td {
- border-left: 1px solid #000;
- border-top: 1px solid #000;
- vertical-align: middle;
- padding: 2px;
- text-align: center;
- }
- }
- .table {
- border-collapse: collapse;
- border-spacing: 0;
- background-color: transparent;
- display: table;
- width: 99%;
- max-width: 100%;
- margin: 0 auto;
- }
- .table td {
- text-align: left;
- vertical-align: middle;
- font-size: 14px;
- color: #000000;
- padding: 10.5px 0 10.5px 30px;
- //border: 1px solid #000;
- }
- ::v-deep .el-form-item {
- margin-bottom: 0;
- }
- ::v-deep .el-form-item__content{
- line-height: 32px;
- }
- </style>
|