
2 changed files with 565 additions and 0 deletions
@ -0,0 +1,33 @@ |
|||||
|
ALTER TABLE supervise_supplychain.supplier_bank_info CHANGE createSid createBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '创建者'; |
||||
|
ALTER TABLE supervise_supplychain.supplier_bank_info CHANGE modifySid modifyBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '更新者'; |
||||
|
|
||||
|
ALTER TABLE supervise_supplychain.supplier_bank_info CHANGE modifyBySid updateBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '更新者'; |
||||
|
ALTER TABLE supervise_supplychain.supplier_bank_info CHANGE modifyBySid updateBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '更新者'; |
||||
|
|
||||
|
|
||||
|
select @@GLOBAL.sql_mode; |
||||
|
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
||||
|
select @@sql_mode; |
||||
|
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
||||
|
|
||||
|
set @@global.sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
||||
|
|
||||
|
set sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
||||
|
|
||||
|
set @@SESSION.sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
||||
|
|
||||
|
set @@sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
||||
|
|
||||
|
ALTER TABLE supervise_supplychain.purchase_requisition CHANGE createSid createBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '创建者'; |
||||
|
ALTER TABLE supervise_supplychain.purchase_requisition CHANGE modifySid updateBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '更新者'; |
||||
|
ALTER TABLE supervise_supplychain.purchase_requisition ADD remarks varchar(200) NULL COMMENT '备注说明'; |
||||
|
|
||||
|
|
||||
|
ALTER TABLE supervise_supplychain.product_information CHANGE createSid createBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '创建者'; |
||||
|
ALTER TABLE supervise_supplychain.product_information CHANGE modifySid updateBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '更新者'; |
||||
|
|
||||
|
|
||||
|
ALTER TABLE supervise_supplychain.restricted_brand CHANGE createSid createBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '创建者'; |
||||
|
ALTER TABLE supervise_supplychain.restricted_brand CHANGE modifySid updateBySid varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '更新者'; |
||||
|
|
||||
|
|
@ -0,0 +1,532 @@ |
|||||
|
<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"> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
<!-- 标题按钮部分结束 --> |
||||
|
<!-- Start 新增修改部分 --> |
||||
|
<div class="listconadd" style="padding: 10px;"> |
||||
|
<el-card class="box-card"> |
||||
|
<div slot="header" class="clearfix"> |
||||
|
<span>采购订单excel文件上传</span> |
||||
|
<el-button style="float: right; padding: 3px 0" type="text" @click="handleDownload">下载Excel示例表样</el-button> |
||||
|
</div> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div> |
||||
|
<el-upload |
||||
|
ref="upload" |
||||
|
class="upload-demo" |
||||
|
accept=".xls" |
||||
|
:action="updateAction" |
||||
|
:before-upload="handleBeforeUpload" |
||||
|
:on-progress="handleProgress" |
||||
|
:on-success="handleSuccess" |
||||
|
:file-list="fileList" |
||||
|
:auto-upload="false" |
||||
|
:multiple="false" |
||||
|
:limit="1" |
||||
|
> |
||||
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
||||
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="16"> |
||||
|
<div>上传采购订单的Excel文件,文件名以订单号开头,类似《90002303240037石家庄朋硕家居用品有限公司.xls》。</div> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-card> |
||||
|
<el-collapse v-model="collOrderInfoActiveNames"> |
||||
|
<el-collapse-item title="订单详情" name="1"> |
||||
|
<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.buyerName }}</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.purchasingDeptName }}</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.purchasingDeptName }}</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> |
||||
|
<el-row> |
||||
|
<el-col :span="4" class="tleftb"><span>单据到效期</span></el-col> |
||||
|
<el-col :span="8" class="trightb"> |
||||
|
<el-form-item> |
||||
|
<span>{{ formobj.expiryDate }}</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.completionStatus }}</span> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title"> |
||||
|
<div>采购商品明细</div> |
||||
|
<div> |
||||
|
<span style="padding-right: 20px">合计数量:{{ totalQuantity }}</span> |
||||
|
<span>合计金额:{{ amountInTotal }}</span> |
||||
|
</div> |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.pros" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed label="序号" width="80px" type="index" :index="index + 1" align="center" /> |
||||
|
<el-table-column fixed label="操作" width="100px" align="center" header-align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品代码" align="center" width="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.proCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品名称" align="center" width="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.proName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="规格型号" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.content }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="数量" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.number }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="包装数量" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.packageNumber }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="包内数量" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.packageInsideNumber }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="包装规格" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.packageSpec }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="单位" align="center" width="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.unit }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="包装价格(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.packagePrice }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="包合计(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.packageTotalPrice }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="单价(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.unitPrice }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="含税单价(元)" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.unitPriceTax }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="合计(元)" align="center" width="120"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.totalPrice }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品品类名称" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.category }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="商品品类编码" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.categoryKey }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="品牌名称" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.brand }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="品牌编码" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.brandCode }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="发货日期" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.issuanceDate }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="零售金额" align="center" width="150"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ scope.row.retailAmount }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</el-collapse-item> |
||||
|
</el-collapse> |
||||
|
|
||||
|
<el-card class="box-card"> |
||||
|
<div slot="header" class="clearfix"> |
||||
|
<span>供应商信息检测</span> |
||||
|
<el-button style="float: right; padding: 3px 0" type="text" @click="handleDownload">重新检测</el-button> |
||||
|
</div> |
||||
|
<div> |
||||
|
供应商信息检测 |
||||
|
</div> |
||||
|
</el-card> |
||||
|
<el-card class="box-card"> |
||||
|
<div slot="header" class="clearfix"> |
||||
|
<span>商品信息检测</span> |
||||
|
<el-button style="float: right; padding: 3px 0" type="text" @click="handleDownload">重新检测</el-button> |
||||
|
</div> |
||||
|
<div> |
||||
|
商品信息检测 |
||||
|
</div> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
<!-- End 添加修改部分 --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/supervise/purchaserequisition' |
||||
|
export default { |
||||
|
name: 'PurchaserequisitionUploadxlsx', |
||||
|
data() { |
||||
|
return { |
||||
|
collOrderInfoActiveNames: '1', |
||||
|
candownload: true, |
||||
|
submitdisabled: false, |
||||
|
viewTitle: '', |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
updateAction: '/api/customer/v1/purchaserequisition/uploadXlsxFile', |
||||
|
fileList: [], |
||||
|
totalQuantity: '', // 合计数量 |
||||
|
amountInTotal: '', // 合计金额 |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
code: '', // 单号 |
||||
|
buyerName: '', // 采购人姓名 |
||||
|
buyerCode: '', // 采购人编码 |
||||
|
purchaseDate: '', // 采购日期 |
||||
|
arrivalDate: '', // 到货日期 |
||||
|
purchasingOrgName: '', // 采购组织名称 |
||||
|
purchasingOrgCode: '', // 采购组织编码 |
||||
|
purchasingDeptCode: '', // 采购部门名称 |
||||
|
purchasingDeptName: '', // 采购部门编码 |
||||
|
supplierName: '', // 供应商名称 |
||||
|
supplierCode: '', // 供应商编码 |
||||
|
logisticsCompanyName: '', // 物流公司名称 |
||||
|
logisticsCompanyCode: '', // 物流公司编码 |
||||
|
expiryDate: '', // 单据到效期 |
||||
|
warehousePosition: '', // 仓位 |
||||
|
warehousePositionCode: '', // 仓位code |
||||
|
newCode: '', // 新订单编号 |
||||
|
oldCode: '', // 旧订单编号 |
||||
|
completionStatus: '', // 完成状态 |
||||
|
completionStatusKey: '', // 完成状态key |
||||
|
pros: [] // 采购商品明细列表 |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
created() {}, |
||||
|
methods: { |
||||
|
handleReturn() { |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
code: '', // 单号 |
||||
|
buyerName: '', // 采购人姓名 |
||||
|
buyerCode: '', // 采购人编码 |
||||
|
purchaseDate: '', // 采购日期 |
||||
|
arrivalDate: '', // 到货日期 |
||||
|
purchasingOrgName: '', // 采购组织名称 |
||||
|
purchasingOrgCode: '', // 采购组织编码 |
||||
|
purchasingDeptCode: '', // 采购部门名称 |
||||
|
purchasingDeptName: '', // 采购部门编码 |
||||
|
supplierName: '', // 供应商名称 |
||||
|
supplierCode: '', // 供应商编码 |
||||
|
logisticsCompanyName: '', // 物流公司名称 |
||||
|
logisticsCompanyCode: '', // 物流公司编码 |
||||
|
expiryDate: '', // 单据到效期 |
||||
|
warehousePosition: '', // 仓位 |
||||
|
warehousePositionCode: '', // 仓位code |
||||
|
newCode: '', // 新订单编号 |
||||
|
oldCode: '', // 旧订单编号 |
||||
|
completionStatus: '', // 完成状态 |
||||
|
completionStatusKey: '', // 完成状态key |
||||
|
pros: [] // 采购商品明细列表 |
||||
|
} |
||||
|
this.totalQuantity = '' |
||||
|
this.amountInTotal = '' |
||||
|
this.$refs['form_obj'].resetFields() |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
// this.$emit('doback') |
||||
|
}, |
||||
|
handleBeforeUpload(file) { |
||||
|
console.log('handleBeforeUpload', file) |
||||
|
req.checkCodeByFileName(file.name).then(res => { |
||||
|
console.log('eeee', res) |
||||
|
return false |
||||
|
}) |
||||
|
}, |
||||
|
submitUpload() { |
||||
|
this.$refs.upload.submit() |
||||
|
}, |
||||
|
handleProgress(event, file, fileList) { |
||||
|
// this.progressFlag = true; // 显示进度条 |
||||
|
// this.loadProgress = parseInt(event.percent); // 动态获取文件上传进度 |
||||
|
// if (this.loadProgress >= 100) { |
||||
|
// this.loadProgress = 100 |
||||
|
// setTimeout( () => {this.progressFlag = false}, 1000) // 一秒后关闭进度条 |
||||
|
// } |
||||
|
// const _this = this |
||||
|
// this.fullscreenloading = this.$loading({ |
||||
|
// lock: true, |
||||
|
// text: '文件正在上传', |
||||
|
// spinner: 'el-icon-loading', |
||||
|
// background: 'rgba(0, 0, 0, 0.7)' |
||||
|
// }) |
||||
|
// console.log('111', event.percent) |
||||
|
// if (event.percent >= 100) { |
||||
|
// _this.fullscreenloading.text = '上传完成,正在导入数据库' |
||||
|
// } |
||||
|
}, |
||||
|
handleSuccess(resp, file, fileList) { |
||||
|
// if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// this.fullscreenloading = null |
||||
|
console.log('222', resp) |
||||
|
// const rdata = resp.data |
||||
|
// const _this = this |
||||
|
// _this.fullscreenloading.text = '数据导入完成,进行汇总' |
||||
|
// _this.uploadResultMesssage = '共导入数据:' + rdata.allNum + ' 条;符合监管条件的数据:' + rdata.validNum + ' 条;用时:' + rdata.durations + ' 毫秒。' |
||||
|
|
||||
|
// kchz() |
||||
|
// .then(res => { |
||||
|
// if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// this.fullscreenloading = null |
||||
|
// console.log('333', res) |
||||
|
// _this.hzFilePath = res.data |
||||
|
// }) |
||||
|
// .catch(e => { |
||||
|
// if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// this.fullscreenloading = null |
||||
|
// }) |
||||
|
// // kchzyc() |
||||
|
// // .then(res => { |
||||
|
// // if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// // this.fullscreenloading = null |
||||
|
// // console.log('444', res) |
||||
|
// // _this.ychzFilePath = res.data |
||||
|
// // }) |
||||
|
// // .catch(e => { |
||||
|
// // if (this.fullscreenloading) this.fullscreenloading.close() |
||||
|
// // this.fullscreenloading = null |
||||
|
// // }) |
||||
|
}, |
||||
|
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) { |
||||
|
this.totalQuantity = this.formobj.pros.length |
||||
|
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) { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: '导入成功' |
||||
|
}) |
||||
|
this.formobj = resp.data |
||||
|
if (this.formobj.pros.length > 0) { |
||||
|
this.totalQuantity = this.formobj.pros.length |
||||
|
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 |
||||
|
} |
||||
|
|
||||
|
console.log(',,1111', this.formobj.code) |
||||
|
if (this.formobj.code) { |
||||
|
this.candownload = false |
||||
|
} |
||||
|
} else { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
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…
Reference in new issue