|
@@ -6,22 +6,27 @@
|
|
<a href="javascript:;" @click="handleBack">
|
|
<a href="javascript:;" @click="handleBack">
|
|
<a-icon type="left"></a-icon> 返回列表
|
|
<a-icon type="left"></a-icon> 返回列表
|
|
</a>
|
|
</a>
|
|
- <span style="margin: 0 15px;color: #666;font-weight: bold;">货架名称:{{ pageInfo&&pageInfo.shelfName?pageInfo.shelfName:'--' }}</span>
|
|
|
|
|
|
+ <span style="margin: 0 15px;color: #666;font-weight: bold;">{{ pageInfo&&pageInfo.shelfName?pageInfo.shelfName:'--' }}</span>
|
|
</template>
|
|
</template>
|
|
</a-page-header>
|
|
</a-page-header>
|
|
<a-card :bordered="false" size="small" class="goodsAllocationSet-baseInfo">
|
|
<a-card :bordered="false" size="small" class="goodsAllocationSet-baseInfo">
|
|
<a-collapse :activeKey="['1']">
|
|
<a-collapse :activeKey="['1']">
|
|
<a-collapse-panel key="1" header="基础信息">
|
|
<a-collapse-panel key="1" header="基础信息">
|
|
<a-descriptions size="small" :column="3">
|
|
<a-descriptions size="small" :column="3">
|
|
- <a-descriptions-item label="配件经销商">{{ pageInfo&&pageInfo.dealerSn?pageInfo.dealerSn:'--' }}</a-descriptions-item>
|
|
|
|
- <a-descriptions-item label="汽车修理厂">{{ pageInfo&&pageInfo.storeSn?pageInfo.storeSn:'--' }}</a-descriptions-item>
|
|
|
|
|
|
+ <a-descriptions-item label="配件经销商">{{ pageInfo&&pageInfo.dealerName?pageInfo.dealerName:'--' }}</a-descriptions-item>
|
|
|
|
+ <a-descriptions-item label="汽车修理厂">{{ pageInfo&&pageInfo.storeName?pageInfo.storeName:'--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="货架归属">{{ pageInfo&&pageInfo.ownerType==1?'自有':'平台' }}</a-descriptions-item>
|
|
<a-descriptions-item label="货架归属">{{ pageInfo&&pageInfo.ownerType==1?'自有':'平台' }}</a-descriptions-item>
|
|
- <a-descriptions-item label="货架图片">{{ pageInfo&& pageInfo.dealerSn?pageInfo.dealerSn:'--' }}</a-descriptions-item>
|
|
|
|
|
|
+ <a-descriptions-item label="货架图片" v-if="pageInfo&&pageInfo.ownerType==1">
|
|
|
|
+ <div v-if="pageInfo && pageInfo.images&&pageInfo.images.length>0">
|
|
|
|
+ <img :src="pageInfo.images[0]|| ''" width="30" height="30" class="imageUrl" @click="inited(pageInfo.images)" /> {{ '共'+pageInfo.images.length+'张' }}
|
|
|
|
+ </div>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </a-descriptions-item>
|
|
<a-descriptions-item label="备注">{{ pageInfo&&pageInfo.remarks?pageInfo.remarks:'--' }}</a-descriptions-item>
|
|
<a-descriptions-item label="备注">{{ pageInfo&&pageInfo.remarks?pageInfo.remarks:'--' }}</a-descriptions-item>
|
|
</a-descriptions>
|
|
</a-descriptions>
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
</a-collapse>
|
|
</a-collapse>
|
|
- <a-collapse :activeKey="['1']" class="bzj-collapse">
|
|
|
|
|
|
+ <a-collapse :activeKey="['1']" class="bzj-collapse" v-if="pageInfo&&pageInfo.settleType">
|
|
<a-collapse-panel key="1" header="保证金 ( 保证金的新增/编辑/删除请在左侧菜单“保证金管理”功能中操作 )">
|
|
<a-collapse-panel key="1" header="保证金 ( 保证金的新增/编辑/删除请在左侧菜单“保证金管理”功能中操作 )">
|
|
<s-table
|
|
<s-table
|
|
class="sTable fixPagination"
|
|
class="sTable fixPagination"
|
|
@@ -31,7 +36,7 @@
|
|
:showPagination="false"
|
|
:showPagination="false"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :defaultLoadData="false"
|
|
|
|
|
|
+ :defaultLoadData="true"
|
|
bordered>
|
|
bordered>
|
|
<template slot="status" slot-scope="text, record">
|
|
<template slot="status" slot-scope="text, record">
|
|
<a-button type="link" @click="handleEdit(record)">编辑</a-button>
|
|
<a-button type="link" @click="handleEdit(record)">编辑</a-button>
|
|
@@ -53,112 +58,125 @@
|
|
:wrapper-col="formItemLayout.wrapperCol"
|
|
:wrapper-col="formItemLayout.wrapperCol"
|
|
>
|
|
>
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
- <a-col :span="24">
|
|
|
|
- <a-form-model-item label="结算方式" prop="name">
|
|
|
|
- <div style="display: flex;">
|
|
|
|
- <v-select code="ENABLE_FLAG" v-model="form.isEnable" allowClear placeholder="请选择结算方式" @change="changeJStype"></v-select>
|
|
|
|
- <a-button type="link" @click="handleModify">修改</a-button>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <a-col :span="24">
|
|
|
|
- <a-form-model-item label="授信额度" prop="name" v-if="form.isEnable==1">
|
|
|
|
- <a-input
|
|
|
|
- id="userEdit-loginName"
|
|
|
|
- v-model.trim="form.name"
|
|
|
|
- allowClear
|
|
|
|
- placeholder="请输入授信额度"
|
|
|
|
- suffix="元"/>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- <a-form-model-item label="结算日期" prop="phone" v-if="form.isEnable==0">
|
|
|
|
|
|
+ <a-row>
|
|
|
|
+ <a-col :span="15">
|
|
|
|
+ <a-form-model-item label="结算方式" prop="settleType">
|
|
|
|
+ <v-select
|
|
|
|
+ code="SHELF_SETTLE_TYPE"
|
|
|
|
+ v-model="form.settleType"
|
|
|
|
+ allowClear
|
|
|
|
+ placeholder="请选择结算方式"
|
|
|
|
+ :disabled="pageInfo&&pageInfo.settleType?true:false">
|
|
|
|
+ </v-select>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="1"><a-button size="small" type="link" @click="handleModify(pageInfo,settleInfo)" v-if="pageInfo&&pageInfo.settleType" style="padding-top: 10px;">修改</a-button></a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ <a-row v-if="form.settleType=='CREDIT'">
|
|
|
|
+ <a-col :span="15">
|
|
|
|
+ <a-form-model-item label="授信额度" prop="creditLimit">
|
|
|
|
+ <a-input-number
|
|
|
|
+ id="shelfSet-bindProduct-creditLimit"
|
|
|
|
+ v-model="form.creditLimit"
|
|
|
|
+ :precision="2"
|
|
|
|
+ :min="0.01"
|
|
|
|
+ :max="999999"
|
|
|
|
+ placeholder="请输入正数(最多允许两位小数)"
|
|
|
|
+ style="width: 100%;display: inline-block;" />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="1"> <span style="display: inline-block; padding: 10px;">元</span></a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ <a-col :span="15">
|
|
|
|
+ <a-form-model-item label="结算日期(每月)" prop="settleDay" v-if="form.settleType=='MONTH'">
|
|
<a-select
|
|
<a-select
|
|
style="background-color: none;"
|
|
style="background-color: none;"
|
|
placeholder="请选择结算日期"
|
|
placeholder="请选择结算日期"
|
|
- id="userSyncEdit-roleNames"
|
|
|
|
|
|
+ id="userSyncEdit-settleDay"
|
|
allowClear
|
|
allowClear
|
|
- v-model="form.roleNames"
|
|
|
|
|
|
+ v-model="form.settleDay"
|
|
>
|
|
>
|
|
<a-select-option v-for="item in dateList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
|
<a-select-option v-for="item in dateList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <!-- </a-row>
|
|
|
|
- <a-row :gutter="24"> -->
|
|
|
|
- <a-col :span="24">
|
|
|
|
- <a-form-model-item label="结算提醒金额" prop="loginName" v-if="form.isEnable==1">
|
|
|
|
- <a-input
|
|
|
|
- id="userEdit-loginName"
|
|
|
|
- v-model.trim="form.loginName"
|
|
|
|
- allowClear
|
|
|
|
- placeholder="请输入结算提醒金额"
|
|
|
|
- suffix="元"/>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- <a-form-model-item label="结算提醒日期" prop="loginName" v-if="form.isEnable==0">
|
|
|
|
|
|
+ <a-row v-if="form.settleType=='CREDIT'">
|
|
|
|
+ <a-col :span="15">
|
|
|
|
+ <a-form-model-item label="结算提醒金额" prop="creditWarnLimit" >
|
|
|
|
+ <a-input-number
|
|
|
|
+ id="shelfSet-bindProduct-creditWarnLimit"
|
|
|
|
+ v-model="form.creditWarnLimit"
|
|
|
|
+ :precision="2"
|
|
|
|
+ :min="0.01"
|
|
|
|
+ :max="form.creditLimit-0.1"
|
|
|
|
+ placeholder="请输入正数(最多允许两位小数)"
|
|
|
|
+ style="width: 100%;display: inline-block;" />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="1"> <span style="display: inline-block; padding: 10px;">元</span></a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ <a-col :span="15">
|
|
|
|
+ <a-form-model-item label="结算提醒(每月提醒提前的天数)" prop="warnBeforeDays" v-if="form.settleType=='MONTH'">
|
|
<a-select
|
|
<a-select
|
|
style="background-color: none;"
|
|
style="background-color: none;"
|
|
placeholder="请选择结算提醒日期"
|
|
placeholder="请选择结算提醒日期"
|
|
- id="userSyncEdit-roleNames"
|
|
|
|
|
|
+ id="userSyncEdit-warnBeforeDays"
|
|
allowClear
|
|
allowClear
|
|
- v-model="form.roleNames"
|
|
|
|
|
|
+ v-model="form.warnBeforeDays"
|
|
>
|
|
>
|
|
- <a-select-option v-for="item in dateList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
|
|
|
|
|
+ <a-select-option v-for="item in dateTXList" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :span="24">
|
|
|
|
- <a-form-model-item :label="form.isEnable==1?'超过授信额度':'超期未结算'" prop="loginName" v-if="form.isEnable==1">
|
|
|
|
- <a-checkbox @change="onChange">
|
|
|
|
|
|
+ <a-col :span="15" v-if="form.settleType">
|
|
|
|
+ <a-form-model-item :label="form.settleType=='CREDIT'?'超过授信额度':'超期未结算'">
|
|
|
|
+ <a-checkbox @change="onChange" >
|
|
限制汽车修理厂无法使用数字货架
|
|
限制汽车修理厂无法使用数字货架
|
|
</a-checkbox>
|
|
</a-checkbox>
|
|
- <!-- <a-radio-group v-model="value" @change="onChange">
|
|
|
|
- <a-radio :value="1"></a-radio>
|
|
|
|
- </a-radio-group> -->
|
|
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <!-- </a-row>
|
|
|
|
- <a-row :gutter="24"> -->
|
|
|
|
- <a-col :span="24">
|
|
|
|
- <a-form-model-item label="是否需要缴纳保证金" prop="loginFlag" v-if="form.isEnable==1">
|
|
|
|
- <a-radio-group name="radioGroup" v-model="form.loginFlag">
|
|
|
|
|
|
+ <a-col :span="15" v-if="pageInfo&&!pageInfo.settleType &&form.settleType ">
|
|
|
|
+ <a-form-model-item label="是否需要缴纳保证金" prop="bondFlag" >
|
|
|
|
+ <a-radio-group name="radioGroup" v-model="form.bondFlag" @change="changeRadio">
|
|
<a-radio :value="1">是</a-radio>
|
|
<a-radio :value="1">是</a-radio>
|
|
<a-radio :value="0">否</a-radio>
|
|
<a-radio :value="0">否</a-radio>
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <!-- 状态 -->
|
|
|
|
- <a-col :span="24">
|
|
|
|
- <a-form-model-item label="保证金缴纳金额" prop="loginName" v-if="form.isEnable==1">
|
|
|
|
- <a-input
|
|
|
|
- id="userEdit-loginName"
|
|
|
|
- v-model.trim="form.loginName"
|
|
|
|
- allowClear
|
|
|
|
- placeholder="请输入保证金缴纳金额"
|
|
|
|
- suffix="元"/>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- </a-col>
|
|
|
|
- <!-- </a-row>
|
|
|
|
- <a-row :gutter="24"> -->
|
|
|
|
|
|
+ <a-row v-if="form.settleType&&form.bondFlag&&isEdit">
|
|
|
|
+ <a-col :span="15">
|
|
|
|
+ <a-form-model-item label="保证金缴纳金额" prop="bondAmount" >
|
|
|
|
+ <a-input-number
|
|
|
|
+ id="shelfSet-bindProduct-bondAmount"
|
|
|
|
+ v-model="form.bondAmount"
|
|
|
|
+ :precision="2"
|
|
|
|
+ :min="0.01"
|
|
|
|
+ :max="999999"
|
|
|
|
+ placeholder="请输入正数(最多允许两位小数)"
|
|
|
|
+ style="width: 100%;display: inline-block;" />
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :span="1"> <span style="display: inline-block; padding: 10px;">元</span></a-col>
|
|
|
|
+ </a-row>
|
|
</a-row>
|
|
</a-row>
|
|
<a-form-model-item :label-col="{span: 0}" :wrapper-col="{span: 24}" style="text-align: center;">
|
|
<a-form-model-item :label-col="{span: 0}" :wrapper-col="{span: 24}" style="text-align: center;">
|
|
- <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }">保存</a-button>
|
|
|
|
- <a-button :style="{ marginLeft: '8px' }" @click="handleBack">取消</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="handleSubmit" >保存</a-button>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</a-card>
|
|
</a-card>
|
|
<!-- 修改结算方式弹窗 -->
|
|
<!-- 修改结算方式弹窗 -->
|
|
- <settlementModifyModal :visible="openModal" :settlementType="settlementType" @close="openModal=false"></settlementModifyModal>
|
|
|
|
|
|
+ <settlementModifyModal :visible="openModal" :settleInfo="settleInfo" :shelfInfo="pageInfo" @close="close"></settlementModifyModal>
|
|
</a-spin>
|
|
</a-spin>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
-import { shelfDetail } from '@/api/shelf.js'
|
|
|
|
|
|
+import { shelfDetail, shelfSettleRuleSave, settleRuleDetail } from '@/api/shelf.js'
|
|
import { bondRecordList } from '@/api/boundRecord.js'
|
|
import { bondRecordList } from '@/api/boundRecord.js'
|
|
import settlementModifyModal from './settlementModifyModal.vue'
|
|
import settlementModifyModal from './settlementModifyModal.vue'
|
|
|
|
+import { toThousands } from '@/libs/tools.js'
|
|
export default {
|
|
export default {
|
|
components: { STable, settlementModifyModal, VSelect },
|
|
components: { STable, settlementModifyModal, VSelect },
|
|
data () {
|
|
data () {
|
|
@@ -167,53 +185,54 @@ export default {
|
|
isEdit: false, // 货位号是否为编辑
|
|
isEdit: false, // 货位号是否为编辑
|
|
openModal: false, // 货位模板弹窗初始状态
|
|
openModal: false, // 货位模板弹窗初始状态
|
|
formItemLayout: {
|
|
formItemLayout: {
|
|
- labelCol: { span: 8 },
|
|
|
|
- wrapperCol: { span: 10 }
|
|
|
|
|
|
+ labelCol: { span: 13 },
|
|
|
|
+ wrapperCol: { span: 11 }
|
|
},
|
|
},
|
|
- value: '',
|
|
|
|
|
|
+ settleInfo: null, // 结算详情
|
|
|
|
+ // shelfInfo: null, // 数字货架详情
|
|
settlementType: '', // 结算方式
|
|
settlementType: '', // 结算方式
|
|
pageInfo: null,
|
|
pageInfo: null,
|
|
form: {
|
|
form: {
|
|
- isEnable: '',
|
|
|
|
- name: '',
|
|
|
|
- phone: '',
|
|
|
|
- loginName: '',
|
|
|
|
- sex: undefined,
|
|
|
|
- loginFlag: '', // 状态
|
|
|
|
- roleNames: undefined, // 角色
|
|
|
|
- productMsg: '', // 图片
|
|
|
|
- remarks: ''
|
|
|
|
|
|
+ settleType: '', // 结算方式
|
|
|
|
+ creditLimit: '', // 授信额度
|
|
|
|
+ creditWarnLimit: '', // 结算提醒金额
|
|
|
|
+ settleDay: '', // 每月结算日
|
|
|
|
+ warnBeforeDays: '', // 结算提醒提前天数
|
|
|
|
+ limitFlag: '', // 是否限制使用
|
|
|
|
+ bondFlag: '', // 是否缴纳保证金
|
|
|
|
+ bondAmount: '' // 保证金金额
|
|
},
|
|
},
|
|
dateList: [{ id: 1, name: 1 }, { id: 2, name: 2 }, { id: 3, name: 3 }, { id: 4, name: 4 }, { id: 5, name: 5 }, { id: 6, name: 6 }, { id: 7, name: 7 }, { id: 8, name: 8 }, { id: 9, name: 9 }, { id: 10, name: 10 }, { id: 11, name: 11 }, { id: 12, name: 12 }, { id: 13, name: 13 }, { id: 14, name: 14 }, { id: 15, name: 15 }, { id: 16, name: 16 }, { id: 17, name: 17 }, { id: 18, name: 18 }, { id: 19, name: 19 }, { id: 20, name: 20 }, { id: 21, name: 21 }, { id: 22, name: 22 }, { id: 23, name: 23 }, { id: 24, name: 24 }, { id: 25, name: 25 }],
|
|
dateList: [{ id: 1, name: 1 }, { id: 2, name: 2 }, { id: 3, name: 3 }, { id: 4, name: 4 }, { id: 5, name: 5 }, { id: 6, name: 6 }, { id: 7, name: 7 }, { id: 8, name: 8 }, { id: 9, name: 9 }, { id: 10, name: 10 }, { id: 11, name: 11 }, { id: 12, name: 12 }, { id: 13, name: 13 }, { id: 14, name: 14 }, { id: 15, name: 15 }, { id: 16, name: 16 }, { id: 17, name: 17 }, { id: 18, name: 18 }, { id: 19, name: 19 }, { id: 20, name: 20 }, { id: 21, name: 21 }, { id: 22, name: 22 }, { id: 23, name: 23 }, { id: 24, name: 24 }, { id: 25, name: 25 }],
|
|
|
|
+ dateTXList: [{ id: 1, name: 1 }, { id: 2, name: 2 }, { id: 3, name: 3 }, { id: 4, name: 4 }, { id: 5, name: 5 }, { id: 6, name: 6 }, { id: 7, name: 7 }, { id: 8, name: 8 }, { id: 9, name: 9 }, { id: 10, name: 10 }],
|
|
rules: {
|
|
rules: {
|
|
- name: [ { required: true, message: '请输入授信额度', trigger: 'blur' }, { pattern: '/^0\.([1-9]|\d[1-9])$|^[1-9]\d{0,8}\.\d{0,2}$|^[1-9]\d{0,8}$/', message: '授信额度最多2位小数且最大为999999' } ],
|
|
|
|
- phone: [ { required: true, message: '请输入手机号码', trigger: 'blur' }, { pattern: /^[1][0-9]{10}$/, message: '请输入正确的手机号码!' } ],
|
|
|
|
- loginName: [ { required: true, message: '请输入用户账号', trigger: 'blur' }, { pattern: /^[0-9A-Za-z]+$/, message: '用户账号为数字或大小写字母组成!' } ],
|
|
|
|
- isEnable: [ { required: true, message: '请选择结算方式', trigger: 'change' } ],
|
|
|
|
- loginFlag: [ { required: true, message: '请选择结算日期', trigger: 'change' } ],
|
|
|
|
- roleNames: [ { required: true, message: '请选择结算提醒日期', trigger: 'change' } ]
|
|
|
|
|
|
+ settleType: [ { required: true, message: '请选择结算方式', trigger: 'change' } ],
|
|
|
|
+ creditLimit: [ { required: true, message: '请输入授信额度', trigger: 'blur' } ],
|
|
|
|
+ creditWarnLimit: [{ required: true, message: '请输入结算提醒金额', trigger: 'blur' }],
|
|
|
|
+ settleDay: [ { required: true, message: '请选择每月结算日期', trigger: 'change' } ],
|
|
|
|
+ warnBeforeDays: [ { required: true, message: '请选择每月结算提醒提前的日期', trigger: 'change' } ],
|
|
|
|
+ bondFlag: [ { required: true, message: '请选择是否缴纳保证金', trigger: 'change' }],
|
|
|
|
+ bondAmount: [ { required: true, message: '请输入保证金金额', trigger: 'blur' }]
|
|
},
|
|
},
|
|
// 表头
|
|
// 表头
|
|
columns: [
|
|
columns: [
|
|
- { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '保证金金额', dataIndex: 'bondAmount', width: '11%', align: 'center', scopedSlots: { customRender: 'name' } },
|
|
|
|
- { title: '状态', dataIndex: 'state', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '支付时间', width: '9%', align: 'center', dataIndex: 'payPersonDate' }
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '10%', align: 'center', customRender: function (text, record, index) { return index + 1 || '--' } },
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '保证金金额', dataIndex: 'bondAmount', width: '30%', align: 'right', customRender: function (text) { return toThousands(text, 2) || '--' } },
|
|
|
|
+ { title: '状态', dataIndex: 'stateDictValue', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '支付时间', width: '20%', align: 'center', dataIndex: 'payDate' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
- return bondRecordList(Object.assign({})).then(res => {
|
|
|
|
|
|
+ return bondRecordList(Object.assign({ shelfSn: this.$route.params.shelfSn })).then(res => {
|
|
let data
|
|
let data
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
data = res.data
|
|
data = res.data
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
- // for (let i = 0; i < data.list.length; i++) {
|
|
|
|
- // const _item = data.list[i]
|
|
|
|
- // _item.no = no + i + 1
|
|
|
|
- // _item.loginFlag = _item.loginFlag + '' === '1'
|
|
|
|
- // }
|
|
|
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
|
+ const _item = data[i]
|
|
|
|
+ _item.no = no + i + 1
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.spinning = false
|
|
this.spinning = false
|
|
return data
|
|
return data
|
|
@@ -223,8 +242,36 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
handleBack () {
|
|
handleBack () {
|
|
- this.$router.go(-1)
|
|
|
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
|
+ this.form = {}
|
|
|
|
+ this.$router.push({ path: '/numsGoodsShelves/goodsShelvesAdministration/list' })
|
|
|
|
+ // this.$router.go(-1)
|
|
|
|
+ },
|
|
|
|
+ // 查看图片
|
|
|
|
+ inited (viewer) {
|
|
|
|
+ if (viewer) {
|
|
|
|
+ const imageUrl = []
|
|
|
|
+ viewer.map(item => {
|
|
|
|
+ imageUrl.push(item.imageUrl)
|
|
|
|
+ })
|
|
|
|
+ this.$viewerApi({
|
|
|
|
+ images: imageUrl
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onChange (e) {
|
|
|
|
+ console.log(e.target.checked)
|
|
|
|
+ if (e.target.checked) {
|
|
|
|
+ this.form.limitFlag = 1
|
|
|
|
+ } else {
|
|
|
|
+ this.form.limitFlag = 0
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //
|
|
|
|
+ changeRadio (e) {
|
|
|
|
+ this.isEdit = e.target.value
|
|
},
|
|
},
|
|
|
|
+ // 数字货架详情
|
|
getShelfDetail () {
|
|
getShelfDetail () {
|
|
this.spinning = true
|
|
this.spinning = true
|
|
shelfDetail({
|
|
shelfDetail({
|
|
@@ -232,57 +279,73 @@ export default {
|
|
}).then(res => {
|
|
}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.pageInfo = Object.assign({}, res.data)
|
|
this.pageInfo = Object.assign({}, res.data)
|
|
|
|
+ if (this.pageInfo.ownerType == 1 && this.pageInfo.images) {
|
|
|
|
+ this.pageInfo.images = this.pageInfo.images.split(',')
|
|
|
|
+ }
|
|
|
|
+ this.settlementType = this.pageInfo.settleType
|
|
|
|
+ console.log(this.form, 'this.form')
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.getSettleDetail()
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
this.pageInfo = null
|
|
this.pageInfo = null
|
|
}
|
|
}
|
|
this.spinning = false
|
|
this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- handleExport () {
|
|
|
|
- console.log('=========导入货位')
|
|
|
|
|
|
+ // 结算详情
|
|
|
|
+ getSettleDetail () {
|
|
|
|
+ if (this.settlementType) {
|
|
|
|
+ console.log(this.settlementType, 'this.settlementType')
|
|
|
|
+ settleRuleDetail({ shelfSn: this.pageInfo.shelfSn, settleType: this.settlementType }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.form = Object.assign({}, res.data)
|
|
|
|
+ this.settleInfo = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.form = {}
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ close (type) {
|
|
|
|
+ console.log(type, 'type')
|
|
|
|
+ this.settlementType = type
|
|
|
|
+ this.openModal = false
|
|
|
|
+ this.getSettleDetail()
|
|
|
|
+ console.log(this.settlementType, 'this.settlementType')
|
|
},
|
|
},
|
|
handleEdit (row) {
|
|
handleEdit (row) {
|
|
this.isEdit = true
|
|
this.isEdit = true
|
|
},
|
|
},
|
|
- handleSave (row, type) {
|
|
|
|
- if (type == 0) {
|
|
|
|
- console.log('====保存')
|
|
|
|
- } else {
|
|
|
|
- console.log('=====取消')
|
|
|
|
- }
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.isEdit = false
|
|
|
|
- this.$refs.table.refresh()
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 修改结算方式
|
|
|
|
- changeJStype (val, option) {
|
|
|
|
- console.log(val, option, 'val')
|
|
|
|
- },
|
|
|
|
- handleModify () {
|
|
|
|
- this.settlementType = this.form.isEnable
|
|
|
|
|
|
+ // 修改
|
|
|
|
+ handleModify (shelfVal, settleVal) {
|
|
|
|
+ console.log(shelfVal, settleVal, '----------修改')
|
|
|
|
+ this.pageInfo = shelfVal
|
|
|
|
+ this.settleInfo = settleVal
|
|
this.openModal = true
|
|
this.openModal = true
|
|
console.log('----------修改')
|
|
console.log('----------修改')
|
|
},
|
|
},
|
|
- onChange (e) {
|
|
|
|
- console.log(e.target.checked)
|
|
|
|
- },
|
|
|
|
handleSubmit () {
|
|
handleSubmit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
const params = JSON.parse(JSON.stringify(_this.form))
|
|
const params = JSON.parse(JSON.stringify(_this.form))
|
|
- params.roleNames = _this.form.roleNames.join(',')
|
|
|
|
- params.id = _this.nowData && _this.nowData.id ? _this.nowData.id : null
|
|
|
|
- params.ownerOrgFlag = _this.nowData && _this.nowData.ownerOrgFlag
|
|
|
|
|
|
+ if (params.limitFlag == '') {
|
|
|
|
+ params.limitFlag = 0
|
|
|
|
+ }
|
|
|
|
+ if (this.pageInfo) {
|
|
|
|
+ params.shelfSn = this.pageInfo.shelfSn
|
|
|
|
+ params.storeSn = this.pageInfo.storeSn
|
|
|
|
+ params.dealerSn = this.pageInfo.dealerSn
|
|
|
|
+ }
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- saveUserPower(params).then(res => {
|
|
|
|
|
|
+ shelfSettleRuleSave(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
- _this.$emit('refresh')
|
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
_this.isshow = false
|
|
_this.isshow = false
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
|
|
+ _this.handleBack()
|
|
}, 300)
|
|
}, 300)
|
|
} else {
|
|
} else {
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
@@ -296,7 +359,6 @@ export default {
|
|
},
|
|
},
|
|
pageInit () {
|
|
pageInit () {
|
|
this.getShelfDetail()
|
|
this.getShelfDetail()
|
|
- this.$refs.table.refresh()
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
@@ -311,7 +373,8 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
- next(vm => {})
|
|
|
|
|
|
+ next(vm => {
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|