123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960 |
- <template>
- <div class="borderless">
- <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>
- <el-button
- class="el-button--small-yh add-customer-btn"
- type="success" style="right: 140px;">
- 复制新单
- </el-button>
- <el-button
- class="el-button--small-yh add-customer-btn"
- type="primary"
- :disabled="disabled"
- @click="editCustomer"
- >{{ form.id ? '确认修改' : '确认新增' }}
- </el-button>
- </div>
- <div style="margin-top: 60px">
- <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
- <containerTitle title="基础资料"></containerTitle>
- <basic-container style="margin-bottom: 10px">
- <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"/>
- <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </basic-container>
- <containerTitle title="商品信息"></containerTitle>
- <basic-container style="margin-bottom: 10px">
- <avue-crud
- :option="customerContact"
- v-model="contactsForm"
- :data="contactsData"
- ref="crudContact"
- @row-save="rowSave"
- @row-click="handleRowClick"
- @row-update="rowUpdate"
- @row-del="rowDel"
- >
- <template slot="code" slot-scope="{row,index}">
- <span style="float: left;padding-top: 2px">{{ row.code }}</span>
- <el-button type="text" size="mini" style="float: right" @click="commodityChoice(row)">选择</el-button>
- </template>
- <template slot-scope="{row,index}" slot="menu">
- <el-button
- type="text"
- size="small"
- @click="rowCell(row,index)"
- >{{ row.$cellEdit ? '保存' : '修改' }}
- </el-button>
- </template>
- <template slot="menuLeft" slot-scope="{size}">
- <el-button type="primary"
- icon="el-icon-plus"
- size="small"
- @click="commoditySelection"
- >新增
- </el-button>
- </template>
- </avue-crud>
- </basic-container>
- <containerTitle title="费用明细"></containerTitle>
- <basic-container style="margin-bottom: 10px">
- <avue-crud
- :option="advantageProject"
- v-model="advantageProjectForm"
- :data="advantageProjectData"
- ref="crudProject"
- @row-save="rowSaveProject"
- @row-update="rowUpdateProject"
- @row-del="rowDelProject"
- >
- <template slot="code" slot-scope="{row,index}">
- <span style="float: left;padding-top: 2px">{{ row.code }}</span>
- <el-button type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
- </template>
- <template slot-scope="{row,index}" slot="menu">
- <el-button
- type="text"
- size="small"
- @click="rowCellTwo(row,index)"
- >{{ row.$cellEdit ? '保存' : '修改' }}
- </el-button>
- </template>
- <template slot="menuLeft" slot-scope="{size}">
- <el-button type="primary"
- icon="el-icon-plus"
- size="small"
- @click="costIncrease"
- >新增
- </el-button>
- </template>
- </avue-crud>
- </basic-container>
- <containerTitle title="附件上传"></containerTitle>
- <basic-container style="margin-bottom: 40px">
- <avue-crud
- :option="bankOfDeposit"
- v-model="bankOfDepositForm"
- :data="bankOfDepositData"
- @row-save="rowSaveBankOfDeposit"
- @row-update="rowUpdateBankOfDeposit"
- @row-del="rowDelBankOfDeposit"
- ></avue-crud>
- </basic-container>
- </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">
- <el-row style="height: 0;">
- <el-col :span="5">
- <div>
- <el-scrollbar>
- <basic-container>
- <avue-tree :option="treeOption" :data="treeData" @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"
- @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">
- <el-row style="height: 0;">
- <el-col :span="5">
- <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"
- @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>
- <!-- 打印-->
- <el-dialog
- title="打印单"
- append-to-body
- class="el-dialogDeep"
- :visible.sync="printVisible"
- width="100%"
- fullscreen
- :close-on-click-modal="false"
- :close-on-press-escape="false">
- <div class="print-div">
- <div
- style="
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-item: center;
- font-size: 24px;
- margin-bottom: 5px;
- width: 100%;
- text-align: center;
- "
- >
- <div><b>VITAL INDUSTRIAL GROUP LIMITED</b></div>
- <div>NO.37 DONGHAI ROAD, QINGDAO, CHINA</div>
- <div>TEL:0086-532-86019080 FAX:0086-532-86019080</div>
- <div>
- <b>COMMERCIAL INVOICE</b>
- <span style="float: right">ORIGINAL</span>
- </div>
- </div>
- <div class="print_table" style="display: flex">
- <table
- border="0"
- cellspacing="0"
- cellpadding="0"
- style="width: 100%; line-height: 30px"
- >
- <tr>
- <td colspan="5" rowspan="3">MESSERS:</td>
- <td colspan="2">INVOICE NO.</td>
- <td colspan="3"></td>
- </tr>
- <tr>
- <td colspan="2">DATE</td>
- <td colspan="3"></td>
- </tr>
- <tr>
- <td colspan="2">INCOTERM .</td>
- <td colspan="3"></td>
- </tr>
- <tr>
- <td colspan="5">PI NO.:</td>
- <td colspan="2">DELIVERY PORT</td>
- <td colspan="3"></td>
- </tr>
- <tr>
- <td rowspan="2">NO.</td>
- <td rowspan="2">DESCRIPTION</td>
- <td>THICK</td>
- <td>LENGTH</td>
- <td>WIDTH</td>
- <td rowspan="2">SHEETS</td>
- <td rowspan="2">CRATES</td>
- <td>UNIT PRICE</td>
- <td>TOTAL</td>
- <td>T. AMOUNT</td>
- </tr>
- <tr>
- <td>mm</td>
- <td>mm</td>
- <td>mm</td>
- <td>US$/M²</td>
- <td>M²</td>
- <td>US$</td>
- </tr>
- <tr>
- <td>1</td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>2</td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td>3</td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- </tr>
- <tr>
- <td colspan="9" style="text-align: right">FUMIGATION COST:</td>
- <td></td>
- </tr>
- <tr>
- <td colspan="9" style="text-align: right">INSURANCE:</td>
- <td></td>
- </tr>
- <tr>
- <td colspan="9" style="text-align: right">TOTAL:</td>
- <td>0.00</td>
- </tr>
- </table>
- </div>
- <div class="print-footer" style="margin-top: 8px">
- <div style="font-weight: bold">TOTAL AMOUNT: U.S. DOLLARS NINE THOUSAND FORTY SIX CENTS TWENTY FIVE ONLY.
- </div>
- </div>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- typeSave,
- detail,
- corpsattn,
- corpsbank,
- corpsitem,
- getList,
- getDeptLazyTreeS
- } from "@/api/basicData/purchaseOrder"
- 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} from "@/api/basicData/basicFeesDesc";
- export default {
- name: "detailsPage",
- data() {
- return {
- 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,
- 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;
- getDeptLazyTreeS(parentId).then(res => {
- console.log(res.data.data)
- 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: customerContact,
- advantageProject: advantageProject,
- bankOfDeposit: bankOfDeposit,
- basicData: {
- column: [
- {
- label: '系统编号',
- prop: 'sysNo',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '来源单号',
- prop: 'srcOrderNo',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: ' 银行账号',
- prop: 'banks',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '供应商',
- prop: 'corpId',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '付款方式',
- prop: 'paymentType',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '公司户头',
- prop: 'banksAccountName',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '包装要求',
- prop: 'packageRemarks',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '运费',
- prop: 'oceanFreight',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- }, {
- label: '要求到货日期',
- prop: 'requiredArrivalDate',
- type: 'datetime',
- rules: [
- {
- required: true,
- message: ' ',
- trigger: 'blur'
- }
- ]
- },{
- label: "备注",
- span: 24,
- prop: "orderRemark",
- mock: {
- type: 'county'
- }
- }
- ]
- }
- }
- },
- //初始化查询
- created() {
- if (this.$route.query.id) {
- let id = this.$route.query.id.replace(/\"/g, "")
- detail(id).then(res => {
- console.log(res.data.data.itemsVOList)
- this.form = res.data.data;
- this.contactsData = this.form.itemsVOList
- this.advantageProjectData = this.form.orderFeesList
- this.bankOfDepositData = this.form.orderFilesList
- delete this.form.itemsVOList
- delete this.form.orderFeesList
- delete this.form.orderFilesList
- });
- }
- },
- watch: {
- '$route'(to, from) {
- console.log(to, from);
- if (this.$route.query.id) {
- let id = JSON.parse(this.$route.query.id).replace(/\"/g, "")
- detail(id).then(res => {
- console.log(res.data.data)
- this.form = res.data.data;
- });
- } else {
- this.form = {}
- }
- }
- },
- methods: {
- //点击行可编辑
- handleRowClick(row, event, column) {
- console.log(row.$index)
- },
- //商品编辑
- rowCell(row, index) {
- console.log(row)
- this.$refs.crudContact.rowCell(row, index)
- },
- //费用编辑
- rowCellTwo(row, index) {
- console.log(row)
- this.$refs.crudProject.rowCell(row, index)
- },
- //费用新增触发
- costIncrease() {
- this.dialogCost = !this.dialogCost
- this.choiceData = false
- },
- //商品新增触发
- commoditySelection() {
- this.dialogVisible = !this.dialogVisible
- 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].specificationAndModel
- this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
- }
- this.dialogVisible = !this.dialogVisible
- this.commodityData = false
- },
- //费用编辑导入触发
- choiceCost() {
- console.log('1111')
- 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
- 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) {
- console.log(this.tableData[item])
- this.tableData[item].itemId = this.tableData[item].id
- delete this.tableData[item].id
- this.$refs.crudContact.rowCellAdd(this.tableData[item]);
- this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
- }
- }
- this.tableData = []
- this.dialogVisible = false
- },
- //选中触发
- 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) {
- console.log(row)
- console.log(this.contactsData)
- // 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(index, 1);
- })
- } else {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.contactsData.splice(index, 1);
- }
- })
- },
- //新增费用明细保存触发
- rowSaveProject(row, done, loading) {
- // this.advantageProjectData.push(row)
- done()
- },
- //修改费用明细触发
- rowUpdateProject(row, index, done, loading) {
- done(row);
- },
- //商品列表查询
- 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;
- });
- },
- //费用查询
- 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(index, 1);
- })
- } else {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.advantageProjectData.splice(index, 1);
- }
- })
- },
- //新增附件上传保存触发
- rowSaveBankOfDeposit(row, done, loading) {
- this.bankOfDepositData.push(row)
- done()
- },
- //修改附件上传触发
- rowUpdateBankOfDeposit(row, index, done, loading) {
- done(row);
- },
- //删除附件上传触发
- rowDelBankOfDeposit(row, index, donerowDel) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- //附件判断是否需要调用删除接口
- if (row.id) {
- corpsbank(row.id).then(res => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.bankOfDepositData.splice(index, 1);
- })
- } else {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.bankOfDepositData.splice(index, 1);
- }
- })
- },
- //修改提交触发
- editCustomer() {
- console.log(this.form)
- this.$refs["form"].validate((valid) => {
- if (valid) {
- //商品信息
- this.form.itemsVOList = this.contactsData
- this.form.orderFeesList = this.advantageProjectData
- this.form.orderFilesList = this.bankOfDepositData
- if (typeof this.form.corpsTypeId == 'object') {
- this.form.corpsTypeId = this.form.corpsTypeId.join(",")
- }
- this.disabled = true
- this.form.billType = 'CG'
- typeSave(this.form).then(res => {
- this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
- //成功关闭此页面回到列表页
- // this.backToList()
- })
- } else {
- return false;
- }
- });
- },
- //返回列表
- backToList() {
- this.$router.$avueRouter.closeTag();
- this.$router.push({
- path: '/businessManagement/purchaseOrder/index',
- query: {}
- });
- }
- }
- }
- </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;
- }
- </style>
|