Browse Source

烟草上报比对

master
liupopo 2 years ago
parent
commit
6b6db46e77
  1. 34
      base-ui/src/api/supervise/purchaserequisitiontobacco.js
  2. 27
      base-ui/src/api/supervise/purchaserequisitiontobaccodetails.js
  3. 371
      base-ui/src/router/index.js
  4. 382
      base-ui/src/views/supervise/tobaccopurchaseapplication/tobaccopurchaseapplicationAdd.vue

34
base-ui/src/api/supervise/purchaserequisitiontobacco.js

@ -0,0 +1,34 @@
import request from '@/utils/request'
// 库房提供的采购订单表
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/purchaserequisitiontobacco/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 保存新增记录
saveOrUpdate: function(params) {
return request({
url: '/purchaserequisitiontobacco/save',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 通过sid查询一条记录
fetchVoBySid: function(params) {
return request({
url: '/purchaserequisitiontobacco/fetchVoBySid',
params: params
})
}
}

27
base-ui/src/api/supervise/purchaserequisitiontobaccodetails.js

@ -0,0 +1,27 @@
import request from '@/utils/request'
// 库房提供的采购订单表
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/purchaserequisitiontobaccodetails/listPage',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 保存新增记录
saveOrUpdate: function(params) {
return request({
url: '/purchaserequisitiontobaccodetails/save',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
}
}

371
base-ui/src/router/index.js

@ -9,17 +9,14 @@ Vue.use(Router)
/* 所有角色可以访问/没有权限要求的基页 */
export const constantRoutes = [
{
export const constantRoutes = [{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index.vue')
},
]
children: [{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index.vue')
}, ]
},
{
path: '/',
@ -40,121 +37,170 @@ export const constantRoutes = [
redirect: '/index',
meta: {
title: '首页',
},
children: [
{
path: '/index',
component: () => import('@/views/index.vue'),
name: 'index',
meta: {
title: '主页',
noCache: true,
affix: true,
}
},
]
},
children: [{
path: '/index',
component: () => import('@/views/index.vue'),
name: 'index',
meta: {
title: '主页',
noCache: true,
affix: true,
}
}, ]
},
// 客户中心
{
path: 'customer',
component: Layout,
meta: { title: '客户中心' },
children: [
{
meta: {
title: '客户中心'
},
children: [{
path: '/supervise/purchaseapplicationmanagement/purchaseapplicationmanagementAdd',
component: () => import('@/views/supervise/purchaseapplicationmanagement/purchaseapplicationmanagementAdd.vue'),
name: 'PurchaseApplicationManagementAdd',
meta: { title: '采购申请管理',noCache: true }
},
{
meta: {
title: '采购申请管理',
noCache: true
}
}, {
path: '/tobaccopurchaseapplication',
component: () => import('@/views/supervise/tobaccopurchaseapplication/tobaccopurchaseapplicationAdd.vue'),
name: 'ToBaccopurchaseApplicationAdd',
meta: {
title: '烟草采购申请',
noCache: true
}
}, {
path: '/supervise/supplierbankinfo/supplierbankinfo',
component: () => import('@/views/supervise/supplierbankinfo/supplierbankinfo.vue'),
name: 'supplierManagement',
meta: {title: '供应商管理',noCache: true}
},
{
meta: {
title: '供应商管理',
noCache: true
}
}, {
path: 'dataReporting',
component: Layout,
meta: {title: '数据上报'},
children: [
{
meta: {
title: '数据上报'
},
children: [{
path: '/kucun/rkmx/index',
component: () => import('@/views/kucun/rkmx/index.vue'),
name: 'receiptDetailsReporting',
meta: {title: '入库明细上报',noCache: true}
meta: {
title: '入库明细上报',
noCache: true
}
},
{
path: '/kucun/kcxxcx/index',
component: () => import('@/views/kucun/kcxxcx/index.vue'),
name: 'inventoryDetailsReporting',
meta: {title: '库存明细上报',noCache: true}
meta: {
title: '库存明细上报',
noCache: true
}
},
{
path: '/kucun/pfsjgl/index',
component: () => import('@/views/kucun/pfsjgl/index.vue'),
name: 'wholesaleDataReporting',
meta: {title: '批发数据上报',noCache: true}
meta: {
title: '批发数据上报',
noCache: true
}
},
{
path: '/kucun/xssjgl/index.vue',
component: () => import('@/views/kucun/xssjgl/index.vue'),
name: 'salesDetailsReporting',
meta: {title: '销售明细上报',noCache: true}
meta: {
title: '销售明细上报',
noCache: true
}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '仓库调拨上报',noCache: true}
meta: {
title: '仓库调拨上报',
noCache: true
}
}
],
},
{
path: 'cgsq',
component: Layout,
meta: {title: '信息查询'},
children: [
{
meta: {
title: '信息查询'
},
children: [{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '库存信息查询',noCache: true}
meta: {
title: '库存信息查询',
noCache: true
}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '订单查询',noCache: true}
meta: {
title: '订单查询',
noCache: true
}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '订单商品查询',noCache: true}
meta: {
title: '订单商品查询',
noCache: true
}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '出入库查询',noCache: true}
meta: {
title: '出入库查询',
noCache: true
}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '供应商查询',noCache: true}
meta: {
title: '供应商查询',
noCache: true
}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '仓库调拨查询',noCache: true}
meta: {
title: '仓库调拨查询',
noCache: true
}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'manufacturerPreference',
meta: {title: '配送批发查询',noCache: true}
meta: {
title: '配送批发查询',
noCache: true
}
}
]
}
@ -164,73 +210,99 @@ export const constantRoutes = [
{
path: 'approvalCenter',
component: Layout,
meta: { title: '审批中心' },
children: [
{
meta: {
title: '审批中心'
},
children: [{
path: '/approvalCenter/readWork',
component: () => import('@/views/approvalCenter/readWork.vue'),
name: 'readWork',
meta: {title: '已阅工作',noCache: true,}
meta: {
title: '已阅工作',
noCache: true,
}
},
{
path: '/approvalCenter/waitingWork',
component: () => import('@/views/approvalCenter/waitingWork.vue'),
name: 'waitingWork',
meta: {title: '待阅工作',noCache: true}
meta: {
title: '待阅工作',
noCache: true
}
},
{
path: '/approvalCenter/alreadyHandledWork',
component: () => import('@/views/approvalCenter/alreadyHandledWork.vue'),
name: 'alreadyHandledWork',
meta: {title: '已办工作',noCache: true,}
meta: {
title: '已办工作',
noCache: true,
}
},
{
path: '/approvalCenter/handledWork',
component: () => import('@/views/approvalCenter/handledWork.vue'),
name: 'handledWork',
meta: {title: '待办工作',noCache: true}
meta: {
title: '待办工作',
noCache: true
}
}
]
},
// 报表中心
{
// 报表中心
{
path: 'reportCenter',
component: Layout,
meta: { title: '报表中心' },
children: [
{
meta: {
title: '报表中心'
},
children: [{
path: '/reportCenter/salesReport',
component: () => import('@/views/reportCenter/salesReport.vue'),
name: 'salesReport',
meta: {title: '销售报表',noCache: true,}
meta: {
title: '销售报表',
noCache: true,
}
},
{
path: '/reportCenter/goodsOnWay',
component: () => import('@/views/reportCenter/goodsOnWay.vue'),
name: 'goodsOnWay',
meta: {title: '在途商品管理表',noCache: true}
meta: {
title: '在途商品管理表',
noCache: true
}
},
{
path: '/reportCenter/test',
component: () => import('@/views/reportCenter/test.vue'),
name: 'test',
meta: {titcle: '测试数据',noCache: true}
meta: {
titcle: '测试数据',
noCache: true
}
}
]
},
// 风控管理
{
// 风控管理
{
path: 'riskControlManagement',
component: Layout,
meta: { title: '风控管理' },
children: [
{
path: '/risk/thresholdAnalysis',
component: () => import('@/views/risk/thresholdAnalysis.vue'),
name: 'thresholdAnalysis',
meta: {title: '阀值分析',noCache: true,}
meta: {
title: '风控管理'
},
children: [{
path: '/risk/thresholdAnalysis',
component: () => import('@/views/risk/thresholdAnalysis.vue'),
name: 'thresholdAnalysis',
meta: {
title: '阀值分析',
noCache: true,
}
]
}]
},
//监控中心
{
@ -244,43 +316,55 @@ export const constantRoutes = [
path: '/monitoringCenter/index',
component: () => import('@/views/supervise/monitoringCenter/index.vue'),
name: 'monitoringCenterIndex',
meta: { title: '视频监控' }
meta: {
title: '视频监控'
}
}]
},
//消息中心
{
path: 'messageCenter',
component: Layout,
meta: { title: '消息中心' },
children: [
{
path: '/messageCenter/unreadMessage',
component: () => import('@/views/messageCenter/unreadMessage.vue'),
name: 'unreadMessage',
meta: {title: '未读消息',noCache: true,}
},
{
path: '/messageCenter/readMessage',
component: () => import('@/views/messageCenter/readMessage.vue'),
name: 'readMessage',
meta: {title: '已读消息',noCache: true}
}
]
},
// 系统管理
//消息中心
{
path: 'systemManagement',
path: 'messageCenter',
component: Layout,
meta: { title: '系统管理' },
children: [
meta: {
title: '消息中心'
},
children: [{
path: '/messageCenter/unreadMessage',
component: () => import('@/views/messageCenter/unreadMessage.vue'),
name: 'unreadMessage',
meta: {
title: '未读消息',
noCache: true,
}
},
{
path: '/404',
component: () => import('@/views/404'),
name: 'thresholdAnalysis',
meta: {title: '用户管理',noCache: true,}
path: '/messageCenter/readMessage',
component: () => import('@/views/messageCenter/readMessage.vue'),
name: 'readMessage',
meta: {
title: '已读消息',
noCache: true
}
}
]
},
// 系统管理
{
path: 'systemManagement',
component: Layout,
meta: {
title: '系统管理'
},
children: [{
path: '/404',
component: () => import('@/views/404'),
name: 'thresholdAnalysis',
meta: {
title: '用户管理',
noCache: true,
}
}]
},
{
path: '/customer',
component: Layout,
@ -297,7 +381,10 @@ export const constantRoutes = [
path: 'PurchaseApplicationManagement',
component: () => import('@/views/supervise/purchaseapplicationmanagement/purchaseapplicationmanagement.vue'),
name: 'PurchaseApplicationManagement',
meta: { title: '采购申请管理', noCache: true }
meta: {
title: '采购申请管理',
noCache: true
}
}, {
path: 'kfpurchaserequisitionAdd',
component: () => import('@/views/supervise/kfpurchaserequisition/kfpurchaserequisitionAdd.vue'),
@ -318,7 +405,9 @@ export const constantRoutes = [
}, {
path: 'crksq',
component: () => import('@/views/customer/index.vue'),
meta: { title: '出入库申请' },
meta: {
title: '出入库申请'
},
children: [{
path: 'rksq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
@ -339,49 +428,53 @@ export const constantRoutes = [
}, {
path: 'sjsb',
component: () => import('@/views/customer/index.vue'),
meta: { title: '数据上报' },
meta: {
title: '数据上报'
},
children: [{
path: 'rkmxsq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionAdd',
meta: {
title: '入库明细上传',
noCache: true
}
}, {
path: 'xsbbsq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionInfo',
meta: {
title: '销售报表上传',
noCache: true
path: 'rkmxsq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionAdd',
meta: {
title: '入库明细上传',
noCache: true
}
}, {
path: 'xsbbsq',
component: () => import('@/views/xiaoshou/xstj/tj.vue'),
name: 'KfPurchaseRequisitionInfo',
meta: {
title: '销售报表上传',
noCache: true
}
}
}
// {
// path: 'xssb',
// component: () => import('@/views/xiaoshou/salesreport/salesreport.vue'),
// name: 'SalesReport',
// meta: { title: '销售上报', noCache: true }
// }, {
// path: 'ckdbsb',
// component: () => import('@/views/xiaoshou/warehousetransferreport/warehousetransferreport.vue'),
// name: 'WarehouseTransferReport',
// meta: { title: '仓库调拨上报', noCache: true }
// }, {
// path: 'pssb',
// component: () => import('@/views/xiaoshou/distributionreport/distributionreport.vue'),
// name: 'DistributionReport',
// meta: { title: '配送上报', noCache: true }
// }
// {
// path: 'xssb',
// component: () => import('@/views/xiaoshou/salesreport/salesreport.vue'),
// name: 'SalesReport',
// meta: { title: '销售上报', noCache: true }
// }, {
// path: 'ckdbsb',
// component: () => import('@/views/xiaoshou/warehousetransferreport/warehousetransferreport.vue'),
// name: 'WarehouseTransferReport',
// meta: { title: '仓库调拨上报', noCache: true }
// }, {
// path: 'pssb',
// component: () => import('@/views/xiaoshou/distributionreport/distributionreport.vue'),
// name: 'DistributionReport',
// meta: { title: '配送上报', noCache: true }
// }
]
}, {
path: 'gysgl',
component: () => import('@/views/customer/index.vue'),
meta: { title: '供应商管理' },
meta: {
title: '供应商管理'
},
children: [{
path: 'xzgys',
component: () => import('@/views/supervise/supplierbankinfo/supplierbankinfo.vue'),
name: 'SupplierBankInfoIndex',
component: () => import('@/views/supervise/supplierbankinfo/supplierbankinfo.vue'),
name: 'SupplierBankInfoIndex',
meta: {
title: '供应商管理',
noCache: true

382
base-ui/src/views/supervise/tobaccopurchaseapplication/tobaccopurchaseapplicationAdd.vue

@ -0,0 +1,382 @@
<template>
<div class="app-container">
<!-- 标题按钮部分开始 -->
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{ viewTitle }}</div>
<!-- start 添加修改按钮 -->
<div style="display: flex;flex-direction: row;justify-content: flex-end;align-items: center">
<div style="margin-left: 10px;margin-right: 10px">
<el-upload
ref="upload"
class="avatar-uploade"
accept=".xlsx"
:action="updateAction"
name="filename"
:file-list="fileList"
:on-success="handleSuccess"
:multiple="false"
:show-file-list="false"
:limit="1"
>
<el-button type="primary" size="small">上传烟草系统采购订单及明细.xlsx</el-button>
</el-upload>
</div>
<!-- <el-button type="primary" size="small" :disabled="candownload" @click="downCheckExcel">下载审核结果</el-button>-->
<div style="margin-left: 10px;margin-right: 10px">
<el-upload
ref="upload"
class="avatar-uploade"
accept=".csv"
:action="updateActionDetails"
:data="currentOrderSid"
name="filename"
:file-list="fileListDetails"
:before-upload="beforeUploadDetail"
:on-success="handleSuccessDetail"
:multiple="true"
:show-file-list="false"
>
<el-button :disabled="!currentOrderSid.sid" type="primary" size="small">上传报烟明细.csv</el-button>
</el-upload>
</div>
<el-button type="success" size="small" @click="loadData()">重新加载订单数据</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!-- end 添加修改按钮 -->
<!-- end 详情按钮 -->
</div>
<!-- 标题按钮部分结束 -->
<!-- Start 新增修改部分 -->
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd">
<div class="title"><div>烟草采购订单信息</div></div>
<el-row>
<el-col :span="4" class="tleftb"><span>采购申请编号</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.code }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>填单人</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.tdrName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>供货单位</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.supplierName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>仓位</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.warehousePosition }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>采购员</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.buyerName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>入库单位</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.purchasingOrgName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>要货单位</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.purchasingOrgName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>入库仓位</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.warehousePosition }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb"><span>填单日期</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.purchaseDate }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb"><span>到货日期</span></el-col>
<el-col :span="8" class="trightb">
<el-form-item>
<span>{{ formobj.arrivalDate }}</span>
</el-form-item>
</el-col>
</el-row>
<div class="title">
<div>门店采购明细</div>
<div>
<span>合计金额:{{ amountInTotal }}</span>
</div>
</div>
<el-table :key="tableKey" :data="formobj.storeList" :index="index" border style="width: 100%">
<el-table-column type="expand">
<template slot-scope="scope">
<div>
<el-table :data="scope.row.detailsList" border style="width: 100%">
<el-table-column label="卷烟代码" align="center" prop="ycode" />
<el-table-column label="商品" align="center" prop="prodName" />
<el-table-column label="批发价" align="center" prop="pfj" />
<el-table-column label="要货量" align="center" prop="yhl" />
<el-table-column label="订单量" align="center" prop="ddl" />
<el-table-column label="金额" align="center" prop="price" />
<el-table-column label="厂家名称" align="center" prop="cjmc" />
<el-table-column label="零售指导价" align="center" prop="lszdj" />
</el-table>
</div>
</template>
</el-table-column>
<el-table-column fixed label="序号" width="80px" type="index" :index="index + 1" align="center" />
<el-table-column label="烟草证编码" align="center" prop="ycode" />
<el-table-column label="门店名称" align="center">
<template slot-scope="scope">
<span>[{{ scope.row.storeCode }}]{{ scope.row.storeName }}</span>
</template>
</el-table-column>
<el-table-column label="金额(元)" align="center" prop="price" />
<el-table-column label="明细汇总金额" align="center" prop="detailPrice" />
<el-table-column label="金额比对" align="center">
<template slot-scope="scope">
<span v-if="parseFloat(scope.row.price).toFixed(2) == parseFloat(scope.row.detailPrice).toFixed(2)">相同</span>
<span v-else>不相符</span>
</template>
</el-table-column>
<el-table-column label="烟草批次" align="center" prop="pc" />
</el-table>
</el-form>
</div>
<!-- End 添加修改部分 -->
</div>
</template>
<script>
import req from '@/api/supervise/purchaserequisitiontobacco'
export default {
name: 'ToBaccopurchaseApplicationAdd',
data() {
return {
candownload: true,
submitdisabled: false,
viewTitle: '',
tableKey: 0,
index: 0,
updateAction: process.env.VUE_APP_BASE_API + '/purchaserequisitiontobacco/importOrderXlsx',
updateActionDetails: process.env.VUE_APP_BASE_API + '/purchaserequisitiontobaccodetails/importCsvBatch',
fileList: [],
fileListDetails: [],
deatilsNum: 0,
amountInTotal: '', //
currentOrderSid: {
sid: ''
},
formobj: {
sid: '',
code: '', //
buyerName: '', //
buyerCode: '', //
purchaseDate: '', //
arrivalDate: '', //
purchasingOrgName: '', //
purchasingOrgCode: '', //
purchasingDeptCode: '', //
purchasingDeptName: '', //
supplierName: '', //
supplierCode: '', //
logisticsCompanyName: '', //
logisticsCompanyCode: '', //
warehousePosition: '', //
warehousePositionCode: '', // code
newCode: '', //
oldCode: '', //
completionStatusKey: '', // key
tdrCode: '', //
tdrName: '', //
storeList: [] //
},
rules: {}
}
},
created() {},
methods: {
handleReturn() {
this.formobj = {
sid: '',
code: '', //
buyerName: '', //
buyerCode: '', //
purchaseDate: '', //
arrivalDate: '', //
purchasingOrgName: '', //
purchasingOrgCode: '', //
purchasingDeptCode: '', //
purchasingDeptName: '', //
supplierName: '', //
supplierCode: '', //
logisticsCompanyName: '', //
logisticsCompanyCode: '', //
warehousePosition: '', //
warehousePositionCode: '', // code
newCode: '', //
oldCode: '', //
completionStatusKey: '', // key
tdrCode: '', //
tdrName: '', //
storeList: [] //
}
this.amountInTotal = ''
this.$refs['form_obj'].resetFields()
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
// this.$emit('doback')
},
showAdd() {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【审核编号】'
},
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【审核编号】'
req
.fetchBySid(row.sid)
.then(resp => {
if (resp.success) {
this.formobj = resp.data
if (this.formobj.pros.length > 0) {
var aa = 0
for (var i = 0; i < this.formobj.pros.length; i++) {
if (this.formobj.pros[i].totalPrice !== '') {
aa = parseFloat(aa) + parseFloat(this.formobj.pros[i].totalPrice)
}
}
this.amountInTotal = aa
}
} else {
// resp.code
}
})
.catch(e => {
this.formobj = row
})
},
downCheckExcel() {
window.location.href = process.env.VUE_APP_BASE_API + '/v1/productnum/products?code=' + this.formobj.code
},
handleDownload() {
window.location.href = process.env.VUE_APP_BASE_API + '/v1/purchaserequisition/yb'
},
handleSuccess(resp, file, fileList) {
this.fileList = []
const _this = this
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '导入成功' })
_this.currentOrderSid.sid = resp.data
_this.loadData(resp.data)
} else {
this.$message({ showClose: true, type: 'error', message: resp.msg })
}
},
beforeUploadDetail(file) {
this.deatilsNum = 0
},
handleSuccessDetail(resp, file, fileList) {
// this.fileListDetails = []
const _this = this
_this.deatilsNum++
console.log('_this.deatilsNum: ' + _this.deatilsNum + '--- _this.fileListDetails.length= ' + fileList.length)
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '导入成功' })
if (_this.deatilsNum == fileList.length) {
_this.loadData()
_this.fileListDetails = []
}
} else {
this.$message({ showClose: true, type: 'error', message: resp.msg })
_this.fileListDetails = []
}
},
loadData() {
const _this = this
req
.fetchVoBySid({ sid: _this.currentOrderSid.sid })
.then(res => {
_this.formobj = res.data
console.log(',,1111', _this.formobj)
var aa = 0
for (var i = 0; i < _this.formobj.storeList.length; i++) {
if (_this.formobj.storeList[i].price !== '') {
aa = parseFloat(aa) + parseFloat(_this.formobj.storeList[i].price)
}
}
_this.amountInTotal = aa.toFixed(2)
})
.catch(e => {
console.log('EEEE:', e)
})
},
dataDelete(index) {
const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.formobj.pros.splice(index, 1)
})
},
saveOrUpdate() {
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req
.saveOrUpdate(this.formobj)
.then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn()
} else {
// resp.code
}
})
.catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
}
}
}
</script>
<style scoped>
.title {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>
Loading…
Cancel
Save