|
|
@@ -0,0 +1,512 @@
|
|
|
+<!-- eslint-disable vue/require-valid-default-prop -->
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-dialog :title="title" :visible.sync="dialogVisible" append-to-body width="80%" :before-close="handleClose"
|
|
|
+ :close-on-click-modal="false">
|
|
|
+ <div v-if="dialogVisible">
|
|
|
+ <el-divider>费用原来信息</el-divider>
|
|
|
+ <avue-form :option="oldOption" v-model="oldForm" ref="form"></avue-form>
|
|
|
+ <el-divider>费用修改信息</el-divider>
|
|
|
+ <avue-form :option="newOption" v-model="newForm" ref="form">
|
|
|
+ <template slot="corpTypeUpdate">
|
|
|
+ <dic-select v-model="newForm.corpTypeUpdate" key="id" label="cnName" res="records"
|
|
|
+ url="/blade-los/bcorpstypedefine/list?status=0¤t=1&size=20" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="dicChange('corpTypeUpdate', $event)"></dic-select>
|
|
|
+ </template>
|
|
|
+ <template slot="shortNameUpdate">
|
|
|
+ <dic-select v-model="newForm.shortNameUpdate" placeholder="结算单位" :key="newForm.corpTypeUpdate"
|
|
|
+ label="shortName" res="records"
|
|
|
+ :url="'/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=' + newForm.corpTypeUpdate"
|
|
|
+ :filterable="true" :remote="true" dataName="shortName"
|
|
|
+ @selectChange="dicChange('shortNameUpdate', $event)" :slotRight="true" rightLabel="code"
|
|
|
+ :disabled="newOption.disabled"></dic-select>
|
|
|
+ </template>
|
|
|
+ <!-- <template slot="billShortNameUpdate">
|
|
|
+ <dic-select v-model="newForm.billShortNameUpdate" placeholder="客户名称" label="shortName" res="records"
|
|
|
+ url="/blade-los/bcorps/selectList?status=0¤t=1&size=5" :filterable="true" :remote="true"
|
|
|
+ dataName="shortName" @selectChange="dicChange('billShortNameUpdate', $event)" :slotRight="true"
|
|
|
+ rightLabel="code" :disabled="newOption.disabled"></dic-select>
|
|
|
+ </template> -->
|
|
|
+ <template slot="feeCnNameUpdate">
|
|
|
+ <dic-select v-model="newForm.feeCnNameUpdate" placeholder="费用名称" label="cnName" res="records"
|
|
|
+ url="/blade-los/bfees/list?status=0¤t=1&size=20" :filterable="true" :remote="true" dataName="cnName"
|
|
|
+ @selectChange="dicChange('feeCnNameUpdate', $event)" :slotRight="true" rightLabel="code"
|
|
|
+ :disabled="newOption.disabled"></dic-select>
|
|
|
+ </template>
|
|
|
+ <template slot="unitNoUpdate">
|
|
|
+ <dic-select v-model="newForm.unitNoUpdate" :key="updateFormKey" placeholder="计量单位" label="code"
|
|
|
+ :filterable="true" :mockData="unitNoData" :disabled="newOption.disabled"
|
|
|
+ @selectChange="dicChange('unitNoUpdate', $event)"></dic-select>
|
|
|
+ <!-- <el-select v-model="newForm.unitNoUpdate" placeholder="请选择 计量单位" size="small"
|
|
|
+ @visible-change="visibleChange" @change="dicChange('unitNoUpdate', $event)">
|
|
|
+ <el-option v-for="item in unitNoData" :key="item.code" :label="item.code" :value="item.code">
|
|
|
+ </el-option>
|
|
|
+ </el-select> -->
|
|
|
+ </template>
|
|
|
+ <template slot="curCodeUpdate">
|
|
|
+ <dic-select v-model="newForm.curCodeUpdate" placeholder="币别" label="code"
|
|
|
+ :url="'/blade-los/bcurrency/obtainRate?deptId=' + deptId + '&date=' + form.etd + ' 00:00:00' + '&type=1'"
|
|
|
+ :filterable="true" @selectChange="dicChange('curCodeUpdate', $event, row)"
|
|
|
+ :disabled="newOption.disabled"></dic-select>
|
|
|
+ </template>
|
|
|
+ <template slot="priceUpdate">
|
|
|
+ <el-input-number v-model="newForm.priceUpdate" :controls="false" placeholder="请输入 单价" size="small"
|
|
|
+ style="width: 100%;" :precision="2" @change="countChange()"
|
|
|
+ :disabled="newOption.disabled"></el-input-number>
|
|
|
+ </template>
|
|
|
+ <template slot="quantityUpdate">
|
|
|
+ <el-input-number v-model="newForm.quantityUpdate" :controls="false" placeholder="请输入 数量" size="small"
|
|
|
+ style="width: 100%;" :precision="0" @change="countChange()"
|
|
|
+ :disabled="newOption.disabled"></el-input-number>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false" size="mini">关 闭</el-button>
|
|
|
+ <el-button v-if="type" type="primary" @click="submit" size="mini">确定修改</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { applyUpdate, revokeapplyUpdate, getDetail, applyUpdateCheck } from '@/api/iosBasicData/feeModify.js'
|
|
|
+import dicSelect from "@/components/dicSelect/main";
|
|
|
+import { getBunitsPage } from "@/api/iosBasicData/bunits";
|
|
|
+import _ from "lodash";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ dicSelect
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ form: {
|
|
|
+ type: Object,
|
|
|
+ default: () => { },
|
|
|
+ },
|
|
|
+ url: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ pageStatus: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ pageLabel: {
|
|
|
+ type: String,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ deptId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
|
|
|
+ oldForm: {},
|
|
|
+ newForm: {},
|
|
|
+ unitNoData: [],
|
|
|
+ dialogVisible: false,
|
|
|
+ oldOption: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 12,
|
|
|
+ disabled: true,
|
|
|
+ labelWidth: 100,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "类别",
|
|
|
+ prop: "corpType",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "结算单位",
|
|
|
+ prop: "shortName",
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: "客户名称",
|
|
|
+ // prop: "billShortName",
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: "费用名称",
|
|
|
+ prop: "feeCnName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "计量单位",
|
|
|
+ prop: "unitNo",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "币别",
|
|
|
+ prop: "curCode",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "汇率",
|
|
|
+ prop: "exrate",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "数量",
|
|
|
+ prop: "quantity",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "单价",
|
|
|
+ prop: "price",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "金额",
|
|
|
+ prop: "amount",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ minRows: 2,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ newOption: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 12,
|
|
|
+ disabled: false,
|
|
|
+ labelWidth: 100,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "类别",
|
|
|
+ prop: "corpTypeUpdate",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "结算单位",
|
|
|
+ prop: "shortNameUpdate",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "费用名称",
|
|
|
+ prop: "feeCnNameUpdate",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "计量单位",
|
|
|
+ prop: "unitNoUpdate",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "币别",
|
|
|
+ prop: "curCodeUpdate",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "汇率",
|
|
|
+ prop: "exrateUpdate",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "数量",
|
|
|
+ prop: "quantityUpdate",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "单价",
|
|
|
+ prop: "priceUpdate",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "金额",
|
|
|
+ prop: "amountUpdate",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarksUpdate",
|
|
|
+ minRows: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改原因",
|
|
|
+ prop: "updateReason",
|
|
|
+ minRows: 2,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ type: null,
|
|
|
+ title: null,
|
|
|
+ updateFormKey: new Date().getTime(),
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ // this.option = await this.getColumnData(this.getColumnName(309.6), this.optionBack);
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 获取计算属性
|
|
|
+ // async getBunitsPagefun(type, feeRow) {
|
|
|
+ // let srcBillId = null
|
|
|
+ // if (this.form.billType == 'MH') {
|
|
|
+ // srcBillId = this.form.masterId
|
|
|
+ // } else {
|
|
|
+ // srcBillId = this.form.id
|
|
|
+ // }
|
|
|
+ // const res = await getBunitsPage({ srcBillId })
|
|
|
+ // this.unitNoData = []
|
|
|
+ // let boxarr40 = ['40HC', '40GP']
|
|
|
+ // let boxarr20 = ['20GP']
|
|
|
+ // let teunum = 0
|
|
|
+ // for (let item of res.data.data) {
|
|
|
+ // // 按箱型
|
|
|
+ // if (item.quantityRule != 1) {
|
|
|
+ // // TEU
|
|
|
+ // if (item.quantityRule == 4) {
|
|
|
+ // for (let data of this.form.preContainersList) {
|
|
|
+ // // 40*2 20*1
|
|
|
+ // if (boxarr40.indexOf(data.cntrTypeCode) != -1) {
|
|
|
+ // teunum += Number(data.quantity) * 2
|
|
|
+ // } else if (boxarr20.indexOf(data.cntrTypeCode) != -1) {
|
|
|
+ // teunum += Number(data.quantity)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.unitNoData.push({ ...item, quantity: teunum })
|
|
|
+ // } else {
|
|
|
+ // this.unitNoData.push(item) // 不是TEU和不是箱的走这个
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // let arr = this.form.preContainersList.map(item => {
|
|
|
+ // return {
|
|
|
+ // quantityRule: 1, // 1 是按箱量
|
|
|
+ // code: item.cntrTypeCode,
|
|
|
+ // quantity: item.quantity,
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // this.unitNoData = [...arr, ...this.unitNoData]
|
|
|
+ // // this.updateFormKey = new Date().getTime()
|
|
|
+ // // // 选择费用时带出第一条
|
|
|
+ // // if (type) {
|
|
|
+ // // let feeunitNodata = []
|
|
|
+ // // for (let item of this.unitNoData) {
|
|
|
+ // // if (item.quantityRule == feeRow.unitNo) {
|
|
|
+ // // feeunitNodata.push(item)
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // // this.newForm.unitNoUpdate=feeunitNodata[0].code
|
|
|
+ // // }
|
|
|
+ // },
|
|
|
+ openDialog(row, type) {
|
|
|
+ if (type == 'fix') {
|
|
|
+ this.oldForm = row
|
|
|
+ this.newForm = {
|
|
|
+ corpIdUpdate: row.corpId,
|
|
|
+ corpCnNameUpdate: row.corpCnName,
|
|
|
+ corpEnNameUpdate: row.corpEnName,
|
|
|
+ shortNameUpdate: row.shortName,
|
|
|
+ // billCorpIdUpdate: row.billCorpId,
|
|
|
+ // billCorpCnNameUpdate: row.billCorpCnName,
|
|
|
+ // billCorpEnNameUpdate: row.billCorpEnName,
|
|
|
+ // billShortNameUpdate: row.billShortName,
|
|
|
+ corpTypeUpdate: row.corpType,
|
|
|
+ feeIdUpdate: row.feeId,
|
|
|
+ feeCodeUpdate: row.feeCode,
|
|
|
+ feeEnNameUpdate: row.feeEnName,
|
|
|
+ feeCnNameUpdate: row.feeCnName,
|
|
|
+ unitNoUpdate: row.unitNo,
|
|
|
+ curCodeUpdate: row.curCode,
|
|
|
+ exrateUpdate: row.exrate,
|
|
|
+ quantityUpdate: row.quantity,
|
|
|
+ priceUpdate: row.price,
|
|
|
+ amountUpdate: row.amount,
|
|
|
+ }
|
|
|
+ this.checkRate(null, (this.form.etd ? this.form.etd + ' 00:00:00' : null), this.oldForm.dc, 1, this.form.branchId)
|
|
|
+ this.type = type
|
|
|
+ this.title = '费用申请修改'
|
|
|
+ let obj = {
|
|
|
+ ...this.oldForm,
|
|
|
+ ...this.newForm,
|
|
|
+ billDate: this.oldForm.billDate ? this.oldForm.billDate + ' 00:00:00' : null,
|
|
|
+ etd: this.oldForm.etd ? this.oldForm.etd + ' 00:00:00' : null,
|
|
|
+ eta: this.oldForm.eta ? this.oldForm.eta + ' 00:00:00' : null,
|
|
|
+ id: null,
|
|
|
+ pid: this.form.id,
|
|
|
+ itemId: this.oldForm.id,
|
|
|
+ branchId: this.form.branchId,
|
|
|
+ branchName: this.form.branchName,
|
|
|
+ url: this.url,
|
|
|
+ pageStatus: this.pageStatus,
|
|
|
+ pageLabel: this.pageLabel,
|
|
|
+ }
|
|
|
+ applyUpdateCheck(obj).then(res => {
|
|
|
+ this.dialogVisible = true
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ if (type == 'del') {
|
|
|
+ this.$confirm('是否申请费用删除?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.oldForm = row
|
|
|
+ let obj = {
|
|
|
+ ...this.oldForm,
|
|
|
+ ...this.newForm,
|
|
|
+ billDate: this.oldForm.billDate ? this.oldForm.billDate + ' 00:00:00' : null,
|
|
|
+ etd: this.oldForm.etd ? this.oldForm.etd + ' 00:00:00' : null,
|
|
|
+ eta: this.oldForm.eta ? this.oldForm.eta + ' 00:00:00' : null,
|
|
|
+ type: 1,
|
|
|
+ id: null,
|
|
|
+ pid: this.form.id,
|
|
|
+ itemId: this.oldForm.id,
|
|
|
+ branchId: this.form.branchId,
|
|
|
+ branchName: this.form.branchName,
|
|
|
+ url: this.url,
|
|
|
+ pageStatus: this.pageStatus,
|
|
|
+ pageLabel: this.pageLabel,
|
|
|
+ }
|
|
|
+ applyUpdateCheck(obj).then(res => {
|
|
|
+ applyUpdate(obj).then(res => {
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.$emit('updateDetail')
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (type == 'view') {
|
|
|
+ const obj = {
|
|
|
+ id: row.id,
|
|
|
+ }
|
|
|
+ getDetail(obj).then(res => {
|
|
|
+ this.oldForm = res.data.data
|
|
|
+ this.newForm = res.data.data
|
|
|
+ this.newOption.disabled = true
|
|
|
+ this.title = '查看费用'
|
|
|
+ this.dialogVisible = true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (type == 'revoke') {
|
|
|
+ let obj = {
|
|
|
+ billId: this.form.id,
|
|
|
+ itemId: row.id
|
|
|
+ }
|
|
|
+ revokeapplyUpdate(obj).then(res => {
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.$emit('updateDetail')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ countChange() {
|
|
|
+ this.newForm.amountUpdate = _.round(_.multiply(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0, this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0), 2)
|
|
|
+ },
|
|
|
+ dicChange(name, row) {
|
|
|
+ if (name == 'corpTypeUpdate') {
|
|
|
+ console.log(row)
|
|
|
+ if (row.cnName == '国内直接客户' || row.cnName == '国内同行及代理' || row.cnName == '国外直接客户') {
|
|
|
+ this.newForm.corpIdUpdate = this.form.corpId
|
|
|
+ this.newForm.shortNameUpdate = this.form.shortName
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.corpCnName
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.corpEnName
|
|
|
+ } else if (row.cnName == '国外同行及代理') {
|
|
|
+ this.newForm.corpIdUpdate = this.form.foreignAgencyId
|
|
|
+ this.newForm.shortNameUpdate = this.form.foreignAgencyCnName
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.foreignAgencyCnName
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.foreignAgencyEnName
|
|
|
+ } else if (row.cnName == '船公司') {
|
|
|
+ this.newForm.corpIdUpdate = this.form.carrierId
|
|
|
+ this.newForm.shortNameUpdate = this.form.carrierShortName
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.carrierCnName
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.carrierEnName
|
|
|
+ } else if (row.cnName == '场站') {
|
|
|
+ this.newForm.corpIdUpdate = this.form.cyId
|
|
|
+ this.newForm.shortNameUpdate = this.form.cyShortName
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.cyCnName
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.cyEnName
|
|
|
+ } else if (row.cnName == '船代') {
|
|
|
+ this.newForm.corpIdUpdate = this.form.shippingAgencyId
|
|
|
+ this.newForm.shortNameUpdate = this.form.shippingAgencyCname
|
|
|
+ this.newForm.corpCnNameUpdate = this.form.shippingAgencyCname
|
|
|
+ this.newForm.corpEnNameUpdate = this.form.shippingAgencyEname
|
|
|
+ } else {
|
|
|
+ this.newForm.corpIdUpdate = null
|
|
|
+ this.newForm.shortNameUpdate = null
|
|
|
+ this.newForm.corpCnNameUpdate = null
|
|
|
+ this.newForm.corpEnNameUpdate = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'shortNameUpdate') {
|
|
|
+ if (row) {
|
|
|
+ this.newForm.corpIdUpdate = row.id
|
|
|
+ this.newForm.corpCnNameUpdate = row.cnName
|
|
|
+ this.newForm.corpEnNameUpdate = row.enName
|
|
|
+ } else {
|
|
|
+ this.newForm.corpIdUpdate = null
|
|
|
+ this.newForm.corpCnNameUpdate = null
|
|
|
+ this.newForm.corpEnNameUpdate = null
|
|
|
+ this.newForm.shortNameUpdate = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'billShortNameUpdate') {
|
|
|
+ if (row) {
|
|
|
+ this.newForm.billCorpIdUpdate = row.id
|
|
|
+ this.newForm.billCorpCnNameUpdate = row.cnName
|
|
|
+ this.newForm.billCorpEnNameUpdate = row.enName
|
|
|
+ } else {
|
|
|
+ this.newForm.billCorpIdUpdate = null
|
|
|
+ this.newForm.billCorpCnNameUpdate = null
|
|
|
+ this.newForm.billCorpEnNameUpdate = null
|
|
|
+ this.newForm.billShortNameUpdate = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'feeCnNameUpdate') {
|
|
|
+ if (row) {
|
|
|
+ this.newForm.feeIdUpdate = row.id
|
|
|
+ this.newForm.feeCodeUpdate = row.code
|
|
|
+ this.newForm.feeEnNameUpdate = row.enName
|
|
|
+ this.newForm.curCodeUpdate = row.curNo
|
|
|
+ this.newForm.exrateUpdate = this.getExchangeRate(row.curNo, this.oldForm.dc, 1)
|
|
|
+ // this.getBunitsPagefun(true, row)
|
|
|
+ } else {
|
|
|
+ this.newForm.feeIdUpdate = null
|
|
|
+ this.newForm.feeCodeUpdate = null
|
|
|
+ this.newForm.feeEnNameUpdate = null
|
|
|
+ this.newForm.feeCnNameUpdate = null
|
|
|
+ this.newForm.exrateUpdate = null
|
|
|
+ this.newForm.exrateUpdate = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'curCodeUpdate') {
|
|
|
+ if (row) {
|
|
|
+ // console.log()
|
|
|
+ this.newForm.exrateUpdate = this.getExchangeRate(row.code, this.oldForm.dc, 1)
|
|
|
+ } else {
|
|
|
+ this.newForm.exrateUpdate = null
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (name == 'unitNoUpdate') {
|
|
|
+ // console.log(row)
|
|
|
+ // this.unitNoData.forEach(item => {
|
|
|
+ // if (item.code == row) {
|
|
|
+ // this.newForm.quantityUpdate = item.quantity
|
|
|
+ // this.newForm.amountUpdate = _.round(_.multiply(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0, this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0), 2)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ if (row) {
|
|
|
+ this.newForm.quantityUpdate = row.quantity
|
|
|
+ this.newForm.amountUpdate = _.round(_.multiply(this.newForm.priceUpdate ? this.newForm.priceUpdate : 0, this.newForm.quantityUpdate ? this.newForm.quantityUpdate : 0), 2)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ visibleChange() {
|
|
|
+ // this.getBunitsPagefun()
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ let obj = {
|
|
|
+ ...this.oldForm,
|
|
|
+ ...this.newForm,
|
|
|
+ billDate: this.oldForm.billDate ? this.oldForm.billDate + ' 00:00:00' : null,
|
|
|
+ etd: this.oldForm.etd ? this.oldForm.etd + ' 00:00:00' : null,
|
|
|
+ eta: this.oldForm.eta ? this.oldForm.eta + ' 00:00:00' : null,
|
|
|
+ type: 0,
|
|
|
+ id: null,
|
|
|
+ pid: this.form.id,
|
|
|
+ itemId: this.oldForm.id,
|
|
|
+ branchId: this.form.branchId,
|
|
|
+ branchName: this.form.branchName,
|
|
|
+ url: this.url,
|
|
|
+ pageStatus: this.pageStatus,
|
|
|
+ pageLabel: this.pageLabel,
|
|
|
+ }
|
|
|
+ applyUpdate(obj).then(res => {
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.$emit('updateDetail')
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+::v-deep .el-dialog__body {
|
|
|
+ padding: 6px 20px !important;
|
|
|
+}
|
|
|
+</style>
|