12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064 |
- <template>
- <div>
- <el-dialog
- :title="title"
- :visible.sync="showDialog"
- width="80%"
- :close-on-click-modal="false"
- @close="handleClose"
- >
- <el-form
- ref="form"
- :model="form"
- label-width="110px"
- >
- <el-row>
- <el-col :span="6">
- <el-form-item label="业务类型" prop="fBilltype">
- <el-select
- placeholder="请选择原业务类型"
- clearable
- size="small"
- style="width: 100%"
- :disabled="isDisabled"
- v-model="form.fBilltype"
- >
- <el-option
- v-for="(dict, index) in billTypeList"
- :key="index.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="客户名称">
- <el-select
- placeholder="请选择客户名称"
- clearable
- size="small"
- style="width: 100%"
- :disabled="isDisabled"
- v-model="form.fCorpid"
- >
- <el-option
- v-for="(dict, index) in fMblnoOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="系统编码" prop="fBillno">
- <el-input
- placeholder="请输入系统编码"
- size="small"
- style="width: 100%"
- :disabled="isDisabled"
- v-model="form.fBillno"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="提单号" prop="">
- <el-input
- placeholder="请输入提单号"
- size="small"
- style="width: 100%"
- :disabled="isDisabled"
- v-model="form.fMblno"
- ></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="6">
- <el-form-item label="业务日期" prop="fBstime">
- <el-date-picker
- v-model="form.fBstime"
- style="width: 80%"
- type="date"
- placeholder="业务日期"
- :disabled="isDisabled"
- >
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="仓库" prop="">
- <el-select
- v-model="form.fWarehouseid"
- style="width: 100%"
- :disabled="isDisabled"
- placeholder="请输入仓库"
- size="small"
- >
- <el-option
- v-for="(item, index) in warehouseOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <el-form-item label="品名" prop="">
- <el-select
- v-model="form.fGoodsid"
- style="width: 100%"
- :disabled="isDisabled"
- placeholder="请输入品名"
- size="small"
- >
- <el-option
- v-for="(item, index) in goodsOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="6">
- <div style="display: flex;justify-content: flex-end">
- <el-button
- type="primary"
- v-if="!isDisabled"
- >查询</el-button>
- </div>
- </el-col>
- </el-row>
- </el-form>
- <el-collapse v-model="collapselist">
- <el-collapse-item :name="1">
- <template slot="title">
- <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
- >原业务费用信息</span>
- </template>
- <el-row :gutter="10" style="padding-bottom: 10px">
- <div style="display: flex;justify-content: flex-end">
- <div style="margin: 0 12px">
- <el-button
- icon="el-icon-setting"
- size="mini"
- circle
- @click="showSetting = !showSetting"
- ></el-button>
- </div>
- </div>
- </el-row>
- <el-dialog title="自定义列显示" append-to-body :visible.sync="showSetting" width="700px">
- <div>配置排序列数据(拖动调整顺序)</div>
- <div style="margin-left: 17px">
- <el-checkbox
- v-model="allCheck"
- label="全选"
- @change="allChecked"
- ></el-checkbox>
- </div>
- <div style="padding: 4px; display: flex; justify-content: center">
- <draggable
- v-model="setRowList"
- group="site"
- animation="300"
- @start="onStart"
- @end="onEnd"
- handle=".indraggable"
- >
- <transition-group>
- <div
- v-for="item in setRowList"
- :key="item.surface"
- class="listStyle"
- >
- <div style="width: 500px" class="indraggable">
- <div class="progress" :style="{ width: item.width + 'px' }">
- <el-checkbox
- :label="item.name"
- v-model="item.checked"
- :true-label="0"
- :false-label="1"
- >{{ item.name }}
- </el-checkbox>
- </div>
- </div>
- <el-input-number
- v-model.number="item.width"
- controls-position="right"
- :min="1"
- :max="500"
- size="mini"
- ></el-input-number>
- </div>
- </transition-group>
- </draggable>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="showSetting = false">取 消</el-button>
- <el-button @click="delRow" type="danger">重 置</el-button>
- <el-button type="primary" @click="save()">确 定</el-button>
- </span>
- </el-dialog>
- <el-table :data="feesList" style="width: 100%">
- <el-table-column
- v-for="(item, index) in getRowList"
- :key="index"
- :label="item.name"
- :width="item.width"
- :prop="item.label"
- align="center"
- sortable
- :fixed="item.fixed"
- >
- <template slot-scope="scope">
- <span id="span1" v-if="item.label == 'fCorpid'">
- <el-select
- v-model="scope.row.fCorpid"
- placeholder="请输入客户名称"
- :clearable="true"
- filterable
- size="mini"
- :disabled="true"
- >
- <el-option
- v-for="(dict, index) in fMblnoOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- />
- </el-select>
- </span>
- <span v-else-if="item.label == 'fFeeid'">
- <el-select
- v-model="scope.row.fFeeid"
- filterable
- :disabled="true"
- remote
- placeholder="费用名称"
- >
- <el-option
- v-for="(dict, index) in fNameOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- ></el-option>
- </el-select>
- </span>
- <span v-else-if="item.label == 'fDc'">
- <el-select
- v-model="scope.row.fDc"
- placeholder="请选择"
- :disabled="true"
- >
- <el-option label="收" value="D"></el-option>
- <el-option label="付" value="C"></el-option>
- </el-select>
- </span>
- <span v-else-if="item.label == 'fFeeunitid'">
- <el-select
- v-model="scope.row.fFeeunitid"
- placeholder="请选择计费单位"
- :disabled="true"
- clearable
- >
- <el-option
- v-for="dict in jFeetunitOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </span>
- <span v-else-if="item.label == 'fQty'">
- <el-input
- v-model="scope.row.fQty"
- :disabled="true"
- placeholder="请输入计费数量"
- @input="total(scope.row)"
- v-input-limit="2"
- ></el-input>
- </span>
- <span v-else-if="item.label == 'fUnitprice'">
- <el-input
- v-model="scope.row.fUnitprice"
- :disabled="true"
- placeholder="请输入单价"
- @input="total(scope.row)"
- v-input-limit="2"
- ></el-input>
- </span>
- <span v-else-if="item.label == 'fCurrency'">
- <el-input
- v-model="scope.row.fCurrency"
- :disabled="true"
- placeholder="请输入币种"
- ></el-input>
- </span>
- <span v-else-if="item.label == 'fExrate'">
- <el-input
- v-model="scope.row.fExrate"
- :disabled="true"
- placeholder="请输入汇率"
- ></el-input>
- </span>
- <span v-else-if="item.label == 'fAmount'">
- <el-input
- v-model="scope.row.fAmount"
- :disabled="true"
- placeholder="请输入金额"
- ></el-input>
- </span>
- <span v-else-if="item.label == 'fTaxrate'">
- <el-input
- v-model="scope.row.fTaxrate"
- :disabled="true"
- placeholder="请输入税率"
- ></el-input>
- </span>
- <span v-else-if="item.label == 'remarks'">
- <el-input
- v-model="scope.row.remarks"
- :disabled="true"
- placeholder="请输入备注"
- ></el-input>
- </span>
- <span v-else-if="item.label == 'fSrcTypeId'">
- <span v-if="scope.row.fSrcTypeId == 0">手动录入</span>
- <span v-if="scope.row.fSrcTypeId == 1">协议导入</span>
- <span v-if="scope.row.fSrcTypeId == 2">凯和订单</span>
- <span v-if="scope.row.fSrcTypeId == 10">费用变更</span>
- </span>
- <span v-else>{{ scope.row[item.label] }}</span>
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- fixed="right"
- width="100px"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-circle-plus"
- @click.native.prevent="change(scope.row)"
- :disabled="form.fStatus > 3"
- >导入</el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-collapse-item>
- <el-collapse-item :name="2">
- <template slot="title">
- <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
- >更改费用信息</span>
- </template>
- <div>
- <div style="display: flex; justify-content: space-between; margin: 10px 0">
- <div>
- <el-button
- type="primary"
- icon="el-icon-plus"
- size="mini"
- @click="handleSave"
- v-hasPermi="['warehouse:modify:remove']"
- >保 存</el-button>
- <el-button
- type="primary"
- icon="el-icon-plus"
- size="mini"
- @click="hanldeAdd"
- v-hasPermi="['warehouse:modify:remove']"
- :disabled="form.fStatus > 3"
- >新 行</el-button>
- </div>
- </div>
- </div>
- <el-table :data="formfeesList" style="width: 100%">
- <el-table-column
- prop="fCorpid"
- label="结算单位"
- align="center"
- width="180"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fCorpid"
- placeholder="请输入计算单位"
- :clearable="true"
- filterable
- size="mini"
- style="width: 160px"
- :disabled="disabledtwo"
- >
- <el-option
- v-for="(dict, index) in fMblnoOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fFeeid"
- label="费用名称"
- align="center"
- width="120"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fFeeid"
- filterable
- :disabled="disabledtwo"
- remote
- placeholder="费用名称"
- >
- <el-option
- v-for="(dict, index) in fNameOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column prop="fDc" label="收付" align="center" width="100">
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fDc"
- placeholder="请选择"
- disabled
- >
- <el-option label="收" value="D"></el-option>
- <el-option label="付" value="C"></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fFeeunitid"
- label="计费单位"
- align="center"
- width="100"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fFeeunitid"
- placeholder="请选择计费单位"
- :disabled="disabledtwo"
- clearable
- >
- <el-option
- v-for="dict in jFeetunitOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fQty"
- label="计费数量"
- align="center"
- width="100"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fQty"
- :disabled="disabledtwo"
- placeholder="请输入内容"
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- @input="total(scope.row)"
- ></el-input>
- </template>
- </el-table-column>
- <el-table-column
- prop="fUnitprice"
- label="单价"
- align="center"
- width="100"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fUnitprice"
- :disabled="disabledtwo"
- placeholder="请输入内容"
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- @input="total(scope.row)"
- ></el-input>
- </template>
- </el-table-column>
- <el-table-column
- prop="fCurrency"
- label="币种"
- align="center"
- width="100">
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fCurrency"
- :disabled="disabledtwo"
- placeholder="请输入内容"></el-input>
- </template>
- </el-table-column>
- <el-table-column prop="fExrate" label="汇率" align="center" width="100">
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fExrate"
- :disabled="disabledtwo"
- placeholder="请输入内容"
- ></el-input>
- </template>
- </el-table-column>
- <el-table-column prop="fAmount" label="金额" align="center" width="100">
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fAmount"
- :disabled="disabledtwo"
- placeholder="请输入内容"
- ></el-input>
- </template>
- </el-table-column>
- <el-table-column
- prop="fTaxrate"
- label="税率"
- align="center"
- width="100"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fTaxrate"
- :disabled="disabledtwo"
- placeholder="请输入内容"
- ></el-input>
- </template>
- </el-table-column>
- <el-table-column prop="fSrcTypeId" label="费用来源" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.fSrcTypeId == 0">手动录入</span>
- <span v-if="scope.row.fSrcTypeId == 1">协议导入</span>
- <span v-if="scope.row.fSrcTypeId == 2">凯和订单</span>
- <span v-if="scope.row.fSrcTypeId == 10">费用变更</span>
- </template>
- </el-table-column>
- <el-table-column prop="remarks" label="录入人" align="center"></el-table-column>
- <el-table-column prop="remarks" label="录入日期" align="center"></el-table-column>
- <el-table-column prop="remarks" label="审核人" align="center"></el-table-column>
- <el-table-column prop="remarks" label="审核日期" align="center"></el-table-column>
- <el-table-column prop="remarks" label="备注" align="center" width="180">
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.remarks"
- :disabled="disabledtwo"
- placeholder="请输入内容"
- ></el-input>
- </template>
- </el-table-column>
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- fixed="right"
- width="140px"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- :disabled="form.fStatus > 3"
- @click.native.prevent="deleteRow(scope,scope.$index)"
- v-hasPermi="['warehouse:modify:remove']"
- >删除</el-button>
- <!-- <el-button-->
- <!-- size="mini"-->
- <!-- type="text"-->
- <!-- icon="el-icon-delete"-->
- <!-- :disabled="scope.row.fBillstatus === 6"-->
- <!-- v-if="scope.row.fId"-->
- <!-- @click.native.prevent="changerequest(scope)"-->
- <!-- >请核</el-button>-->
- </template>
- </el-table-column>
- </el-table>
- </el-collapse-item>
- </el-collapse>
- <span slot="footer">
- <approval-comments
- v-if="addOrUpdateVisib"
- ref="ApprovalComments"
- @refreshDataList="returnData"
- ></approval-comments>
- <el-button
- type="primary"
- v-if="approVal && form.fStatus >= 4 && form.fStatus < 6"
- @click="addOrUpdateHand(form, 'f_status')"
- >审 批</el-button>
- <el-button
- type="primary"
- v-if="form.fStatus > 3"
- @click="addOrUpdateHandle('f_status')"
- >查看审批</el-button>
- <el-button
- type="success"
- @click="submitAllowChanges"
- :disabled="form.fStatus > 3"
- >修 改</el-button>
- <el-button
- type="primary"
- @click="handleSave"
- >保 存</el-button>
- <el-button
- type="primary"
- @click="pleaseCheckHandle"
- v-if="form.fStatus <= 3"
- >请 核</el-button>
- <el-button
- type="danger"
- @click="cancelRequest"
- v-if="form.fStatus >= 4 && form.fStatus < 6"
- >撤销审批</el-button>
- <el-button @click="handleClose">取 消</el-button>
- </span>
- </el-dialog>
- <add-or-update
- ref="viewApproval"
- v-if="veiwVisible"
- @refreshDataList="getDataList"
- ></add-or-update>
- </div>
- </template>
- <script>
- import {saveWarehouseModify,
- checkWarehouseModify,
- deleteWarehouse,
- cancelRequest} from "@/api/warehouseBusiness/wareHouseModify";
- import { listCorps } from "@/api/basicdata/corps";
- import {listFees} from "@/api/basicdata/fees";
- import { addSet, resetModule, select } from '@/api/system/set';
- import Cookies from 'js-cookie';
- import draggable from "vuedraggable";
- import ApprovalComments from "@/views/startApproval";
- import AddOrUpdate from "@/views/viewApproval";
- export default {
- name: "AddOrUpdate1",
- props: {
- addOrUpdateVisible: {
- type: Boolean,
- default: false,
- },
- title: {
- type: String,
- required: ''
- },
- // 主表
- form: Object,
- // 原业务费用信息表
- feesList: {
- type: Array,
- default: () => [],
- },
- goodsOptions: {
- type: Array,
- default: () => [],
- },
- warehouseOptions: {
- type: Array,
- default: () => [],
- },
- // 更改费用信息
- formfeesList: {
- type: Array,
- default: () => [],
- },
- // 新增FALSE,查看/跳转TRUE
- isDisabled: {
- type: Boolean
- },
- fDc: {
- type: String
- },
- warehouseId: {
- type: Number
- },
- disabledtwo: {
- type: Boolean,
- default: false,
- },
- approVal: {
- type: Boolean,
- default: false
- },
- },
- components: {
- draggable,
- AddOrUpdate,
- ApprovalComments,
- },
- data() {
- return {
- // 控制弹出框显示隐藏
- showDialog: false,
- // 折叠面板激活
- collapselist: [1, 2],
- billTypeList: [],
- fMblnoOptions: [],
- tableDate: [
- {
- surface: "1",
- label: "fCorpid",
- name: "结算单位",
- checked: 0,
- width: 150,
- },
- {
- surface: "2",
- label: "fFeeid",
- name: "费用名称",
- checked: 0,
- width: 120,
- },
- {
- surface: "3",
- label: "fDc",
- name: "收付",
- checked: 0,
- width: 100,
- },
- {
- surface: "4",
- label: "fFeeunitid",
- name: "计费单位",
- checked: 0,
- width: 120,
- },
- {
- surface: "5",
- label: "fQty",
- name: "计费数量",
- checked: 0,
- width: 100,
- },
- {
- surface: "6",
- label: "fUnitprice",
- name: "单价",
- checked: 0,
- width: 100,
- },
- {
- surface: "7",
- label: "fCurrency",
- name: "币种",
- checked: 0,
- width: 100,
- },
- {
- surface: "8",
- label: "fExrate",
- name: "汇率",
- checked: 0,
- width: 100,
- },
- {
- surface: "9",
- label: "fAmount",
- name: "金额",
- checked: 0,
- width: 100,
- },
- {
- surface: "10",
- label: "fTaxrate",
- name: "税率",
- checked: 0,
- width: 100,
- },
- {
- surface: "11",
- label: "remarks",
- name: "备注",
- checked: 0,
- width: 150,
- },
- {
- surface: "12",
- label: "fSrcTypeId",
- name: "费用来源",
- checked: 0,
- width: 100,
- },
- ],
- setRowList: [],
- getRowList: [],
- // 自定义列弹窗显示
- showSetting: false,
- //自定义列宽
- allCheck: false,
- drag: false,
- fNameOptions: [],
- jFeetunitOptions: [],
- veiwVisible: false,
- addOrUpdateVisib: false
- }
- },
- created() {
- this.setRowList = this.tableDate;
- this.getRowList = this.tableDate;
- this.getDicts("data_billtype_type").then((response) => {
- console.log(response)
- this.billTypeList = response.data;
- });
- this.getDicts("data_unitfees").then((response) => {
- if (response.data) {
- this.jFeetunitOptions = response.data;
- this.jFeetunitOptions.forEach(item => {
- item.dictValue = parseInt(item.dictValue)
- })
- }
- });
- listCorps().then((response) => {
- this.fMblnoOptions = response.rows;
- });
- // this.$nextTick(() => {
- // console.log(this.fDc)
- // if (this.fDc == 'D') {
- // listFees({fDc: "D"}).then((response) => {
- // this.fNameOptions = response.rows;
- // });
- // } else if(this.fDc == 'C') {
- // listFees({fDc: "C"}).then((response) => {
- // this.fNameOptions = response.rows;
- // });
- // }
- // })
- },
- watch: {
- addOrUpdateVisible(oldVal, newWal) {
- this.showDialog = this.addOrUpdateVisible;
- }
- },
- methods: {
- init() {
- let fDc = '';
- if (this.fDc) {
- fDc = this.fDc
- } else {
- fDc = this.form.fDc
- }
- listFees({fDc: fDc}).then((response) => {
- this.fNameOptions = response.rows;
- });
- },
- // 弹出框关闭后触发
- handleClose() {
- // 子组件调用父组件方法,并传递参数
- this.disabledtwo = true
- this.$emit("changeShow", "false");
- this.collapses = [];
- },
- // 添加新行
- hanldeAdd() {
- let DC = null
- if (this.form.fDc) {
- DC = this.form.fDc
- } else {
- DC = this.fDc
- }
- let list = {
- fId: null,
- fCorpid: null,
- fDc: DC,
- fFeeunitid: null,
- fQty: null,
- fUnitprice: null,
- fCurrency: null,
- fExrate: null,
- fAmount: null,
- fTaxrate: null,
- fSrcTypeId: 10,
- fBillstatus: null,
- actId: 1000,
- }
- console.log(list)
- this.formfeesList.push(list)
- },
- //变更按钮
- change(row){
- console.log(row)
- let list = JSON.parse(JSON.stringify(row))
- list.fId = ''
- list.fBillstatus = ''
- list.actId = 1100
- list.fSrcTypeId = 10
- this.formfeesList.push(list)
- // for (let item in this.formfeesList){
- // if (scope.row.fId === this.formfeesList[item].fId) {
- // this.$message({
- // showClose: true,
- // message: '已有相同单据',
- // type: 'error'
- // });
- // return
- // }
- // }
- },
- //內容删除
- deleteRow(rows,index) {
- this.$confirm('是否删除此数据','提示', {
- confirmButtonText: "确认",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- if (rows.row.fId){
- deleteWarehouse(rows.row.fId).then(res => {
- this.formfeesList.splice(index, 1);
- })
- }else {
- this.formfeesList.splice(index, 1);
- }
- })
- },
- //修改
- submitAllowChanges() {
- this.msgSuccess("允许修改");
- this.disabledtwo = false
- },
- // 保存
- handleSave() {
- let data = {
- warehouseId: this.warehouseId,
- items: this.formfeesList,
- itemDel: [],
- fDc: this.fDc,
- }
- data = Object.assign({}, this.form, data)
- saveWarehouseModify(data).then(res => {
- this.form = res.data;
- this.formfeesList = this.form.items
- this.$message.success(res.msg)
- })
- },
- pleaseCheckHandle() {
- // this.handleSave()
- let data = {
- warehouseId: this.warehouseId,
- items: this.formfeesList,
- itemDel: [],
- fDc: this.fDc,
- }
- data = Object.assign({}, this.form, data)
- checkWarehouseModify(data).then(res => {
- this.$message.success(res.msg)
- this.showDialog = false
- })
- },
- addOrUpdateHandle(status) {
- this.veiwVisible = true;
- this.$nextTick(() => {
- this.$refs.viewApproval.init(this.form.fId, 1000, status);
- });
- },
- addOrUpdateHand(form, status) {
- this.addOrUpdateVisib = true;
- this.$nextTick(() => {
- this.$refs.ApprovalComments.init(form.fId, status, 1000);
- });
- },
- // 查看审批流
- getDataList() {
- this.veiwVisible = false;
- },
- returnData() {
- this.addOrUpdateVisib = false;
- this.addOrUpdateVisible = false;
- },
- // 撤销审批
- cancelRequest() {
- let data = {
- actId: 1000,
- billId: this.form.fId,
- id: this.form.fId,
- fidStatus: "f_status",
- }
- cancelRequest(data).then(res => {
- this.$message.success('撤销成功')
- this.handleClose()
- })
- },
- //列设置全选
- allChecked() {
- if (this.allCheck == true) {
- this.setRowList.map((e) => {
- return (e.checked = 0);
- });
- } else {
- this.setRowList.map((e) => {
- return (e.checked = 1);
- });
- }
- },
- //开始拖拽事件
- onStart() {
- this.drag = true;
- },
- //拖拽结束事件
- onEnd() {
- this.drag = false;
- },
- //重置列表
- delRow() {
- this.data = {
- tableName: "费用变更",
- userId: Cookies.get("userName"),
- };
- resetModule(this.data).then((res) => {
- if (res.code == 200) {
- this.showSetting = false;
- this.setRowList = this.tableDate;
- console.log(this.setRowList)
- this.getRowList = this.tableDate;
- }
- });
- },
- //保存列设置
- save() {
- this.showSetting = false;
- this.data = {
- tableName: "船舶信息",
- userId: Cookies.get("userName"),
- sysTableSetList: this.setRowList,
- };
- addSet(this.data).then((res) => {
- this.getRowList = this.setRowList.filter((e) => e.checked == 0);
- });
- },
- total(row) {
- if (row.fQty && row.fUnitprice) {
- this.$set(row, "fAmount", (Number(row.fQty) * Number(row.fUnitprice)).toFixed(2));
- } else {
- this.$set(row, "fAmount", 0);
- }
- },
- },
- }
- </script>
- <style scoped>
- </style>
|