提交 975ecc52 编写于 作者: changdi.hao's avatar changdi.hao

Merge branch 'release' into 'test'

Release

See merge request com.pica.cloud.education.frontend/pica.cloud.web-education-admin!409
...@@ -46,4 +46,15 @@ export const uploadPersonExcel = (data, projectId) => { ...@@ -46,4 +46,15 @@ export const uploadPersonExcel = (data, projectId) => {
description: '上传excel文件', description: '上传excel文件',
}) })
// }) // })
}
export const uploadShieldExcel = (data, projectId) => {
return fetch({
headers: {
token: localStorage.getItem('storageToken'),
},
url: getBaseUrl('aggregate/black/setPeopleBlackStatus/batch/' + projectId),
method: 'post',
data: data,
description: '上传excel文件',
})
} }
\ No newline at end of file
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
</el-col> </el-col>
<el-col :span="6" style="padding:0;text-align:right;padding-right:10px;"> <el-col :span="6" style="padding:0;text-align:right;padding-right:10px;">
<el-button type="primary" size="small" @click="searchList()">搜索</el-button> <el-button type="primary" size="small" @click="searchList()">搜索</el-button>
<el-button type="primary" size="small" @click="importOrder()" v-if="shieldType == 1">批量导入</el-button>
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
...@@ -103,12 +104,60 @@ ...@@ -103,12 +104,60 @@
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
<!-- 导入屏蔽人员名单 -->
<el-dialog
class="exportlogistics-dialog"
title="批量导入"
:visible="isShowImport"
@close="isShowImport = false"
width="600px"
>
<el-form label-width="120px">
<el-form-item label="导入文档:">
<el-upload
class="upload-excel"
action="#"
accept=".xlsx"
multiple
:limit="1"
:show-file-list="true"
:before-upload="uploadfile"
>
<div class="upload-container">
<el-input
class="file-name"
v-model="fileData.fileName"
size="mini"
readonly
></el-input
>
<el-button type="primary" size="mini">选择文件</el-button>
</div>
</el-upload>
</el-form-item>
<el-form-item label="模板:">
<a class="import-url" :href="logisticsUrl" style="color: #449284">
批量导入模板.xlxs</a>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="cancelImport">取消</el-button>
<el-button
size="small"
:loading="isLoading"
type="primary"
@click="confirmImport"
>确认</el-button
>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import BreadCrumb from "../../components/breadcrumb.vue"; import BreadCrumb from "../../components/breadcrumb.vue";
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { openLoading, closeLoading } from "../../utils/utils"; import { openLoading, closeLoading } from "../../utils/utils";
import { uploadShieldExcel } from "@/utils/education/educationApi";
import * as commonUtil from "../../utils/utils"; import * as commonUtil from "../../utils/utils";
import * as operationData from "../../utils/operation"; import * as operationData from "../../utils/operation";
let vm = null; let vm = null;
...@@ -118,6 +167,14 @@ export default { ...@@ -118,6 +167,14 @@ export default {
}, },
data() { data() {
return { return {
isShowImport: false,
isLoading: false,
logisticsUrl: 'https://files.yunqueyi.com/template/portal_template.xlsx',
fileData: {
ext: '',
file: "",
fileName: "",
},
curmbFirst: "教培项目", curmbFirst: "教培项目",
curmbSecond: "屏蔽", curmbSecond: "屏蔽",
projectId: "", projectId: "",
...@@ -232,6 +289,69 @@ export default { ...@@ -232,6 +289,69 @@ export default {
// } // }
// }, // },
methods: { methods: {
// 批量导入
importOrder() {
this.isShowImport = true;
},
uploadfile(file) {
console.log(file, '导入file');
let _this = this;
let arr = file.name.split(".");
let ext = "." + arr[1];
let name = file.name;
let reader = new FileReader();
reader.onload = function (e) {
_this.fileData.fileName = name;
_this.fileData.file = e.target.result.substr(
e.target.result.indexOf("base64,") + 7
);
_this.fileData.ext = ext;
console.log("fileJson", _this.fileData);
};
reader.readAsDataURL(file);
},
// 确认导入
confirmImport() {
this.isLoading = true;
let parmas = {
base64: this.fileData,
type: ''
}
uploadShieldExcel(parmas, this.projectId).then(res => {
if (res.code == '000000') {
if (res.data == '') {
this.isLoading = false;
this.isShowImport = false;
this.$message({
message: '导入成功',
type: 'success'
});
} else {
let a = document.createElement('a');
let href = res.data;
a.setAttribute('href',href);
a.click();
this.isLoading = false;
this.$message.error('导入失败');
}
} else {
this.isLoading = false;
this.$message.error(res.message);
}
}).catch(error => {
this.isLoading = false;
this.$message.error(error.message);
})
},
// 取消导入
cancelImport() {
this.fileData = {
file: "",
fileName: "",
};
this.isShowImport = false;
},
handleChange(value) { handleChange(value) {
let areaId = "000"; let areaId = "000";
for (let i = 0; i < value.length; i++) { for (let i = 0; i < value.length; i++) {
......
...@@ -726,6 +726,13 @@ ...@@ -726,6 +726,13 @@
</el-col> </el-col>
</el-form-item> </el-form-item>
</div> </div>
<div class="inline" v-if="formData.saleType == 1">
<el-form-item label="绩效分值">
<el-col :span="20">
<el-input-number class="stock-com" @input="$forceUpdate();" v-model="formData.scorePerformance" size="small" :precision="2" :min="0.00" :max="999999.99"></el-input-number>
</el-col>
</el-form-item>
</div>
<div class="inline"> <div class="inline">
<el-form-item label="库存" prop="stock" class="required-label"> <el-form-item label="库存" prop="stock" class="required-label">
<el-col :span="20"> <el-col :span="20">
...@@ -1138,8 +1145,9 @@ ...@@ -1138,8 +1145,9 @@
this.hasRepoFlag = hasRepoFlag; this.hasRepoFlag = hasRepoFlag;
this.$set(this.formData2, 'suitableArr', this.formData.suitable.split(',')); this.$set(this.formData2, 'suitableArr', this.formData.suitable.split(','));
this.$set(this.formData, 'suitableArr', this.formData.suitable.split(',')); this.$set(this.formData, 'suitableArr', this.formData.suitable.split(','));
this.formData.optPrice = this.formData.costPrice/100;
this.formData.stock = this.formData.goodsStock; this.formData.stock = this.formData.goodsStock;
this.formData.scorePerformance = this.formData.scorePerformance/100;
this.formData.optPrice = this.formData.costPrice/100;
this.fileGoodsList = this.getImges(goodsInfo.goodsHeaderImages,1); this.fileGoodsList = this.getImges(goodsInfo.goodsHeaderImages,1);
this.goodsCheckList = this.getImges(medicalService.goodsCheckImages, goodsType); this.goodsCheckList = this.getImges(medicalService.goodsCheckImages, goodsType);
if (goodsInfo.goodsVideoList.length > 0) { if (goodsInfo.goodsVideoList.length > 0) {
...@@ -1191,6 +1199,7 @@ ...@@ -1191,6 +1199,7 @@
this.hasRepoFlag = hasRepoFlag; this.hasRepoFlag = hasRepoFlag;
this.buyLimitDtoList = this.formData.buyLimitDtoList; this.buyLimitDtoList = this.formData.buyLimitDtoList;
this.formData.optPrice = this.formData.costPrice/100; this.formData.optPrice = this.formData.costPrice/100;
this.formData.scorePerformance = this.formData.scorePerformance/100;
this.fileGoodsList = this.getImges(goodsList[0].goodsImgList,1); this.fileGoodsList = this.getImges(goodsList[0].goodsImgList,1);
this.fileIntrList = this.getImges(goodsList[0].medicImgList,2); this.fileIntrList = this.getImges(goodsList[0].medicImgList,2);
this.formData.stock = this.formData.goodsStock; this.formData.stock = this.formData.goodsStock;
...@@ -1524,7 +1533,6 @@ ...@@ -1524,7 +1533,6 @@
return; return;
} }
} }
if(!isTrue){ if(!isTrue){
return false; return false;
}else{ }else{
...@@ -1548,9 +1556,11 @@ ...@@ -1548,9 +1556,11 @@
}, },
//更新商品 //更新商品
updateGoodsInfo(){ updateGoodsInfo(){
console.log('提交值',this.formData); console.log('提交值',JSON.parse(JSON.stringify(this.formData)));
const submieFn = this.isCheckServe ? updateGoodsV2 : updateGoods; const submieFn = this.isCheckServe ? updateGoodsV2 : updateGoods;
submieFn(this.formData).then((res)=>{ let params = JSON.parse(JSON.stringify(this.formData))
params.scorePerformance = params.scorePerformance * 100;
submieFn(params).then((res)=>{
if (res.code !== '000000') { if (res.code !== '000000') {
return this.$message({ return this.$message({
message: res.message, message: res.message,
......
...@@ -58,6 +58,7 @@ const form = { ...@@ -58,6 +58,7 @@ const form = {
incrStock: "", //增加库存 incrStock: "", //增加库存
storeId: "", storeId: "",
optPrice: "", optPrice: "",
scorePerformance: 0,
goodsStock: 0, goodsStock: 0,
stock: 0, stock: 0,
externalGoodsCode: "", externalGoodsCode: "",
......
...@@ -593,7 +593,8 @@ ...@@ -593,7 +593,8 @@
</div> </div>
<div v-if="formData.certifyReq.certType == 2|| formData.storeType == 2 " class="flex-upload"> <div v-if="formData.certifyReq.certType == 2|| formData.storeType == 2 " class="flex-upload">
<p v-if="certifyValidDtoList(5)" class="red">{{certifyValidDtoList(5)}}</p> <p v-if="certifyValidDtoList(5)" class="red">{{certifyValidDtoList(5)}}</p>
<div>委托书</div> <div class="required-star" >委托书</div>
<el-form-item prop="imgUrlP5" ref="pIdCardBack">
<el-upload <el-upload
:disabled="Boolean(formData.imgUrlP5)" :disabled="Boolean(formData.imgUrlP5)"
v-model="formData.imgUrlP5" v-model="formData.imgUrlP5"
...@@ -623,6 +624,7 @@ ...@@ -623,6 +624,7 @@
<i class="el-icon-delete"></i> <i class="el-icon-delete"></i>
</div> </div>
</el-upload> </el-upload>
</el-form-item>
</div> </div>
<div v-if="formData.storeType == 1 && formData.certifyReq.certType === 1"> <div v-if="formData.storeType == 1 && formData.certifyReq.certType === 1">
...@@ -846,7 +848,7 @@ ...@@ -846,7 +848,7 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="资质信息" class="required-label" v-if="formData.storeType < 3"> <el-form-item label="资质信息" class="required-label" v-if="formData.storeType < 3">
<div v-if="controlLicense.includes('1') || formData.storeType == 2"> <div v-if="controlLicense.filter((i => { return String(i).charAt(0) == '1'; })).length > 0 || formData.storeType == 2">
<p v-if="certifyValidDtoList(7)" class="red">{{certifyValidDtoList(7)}}</p> <p v-if="certifyValidDtoList(7)" class="red">{{certifyValidDtoList(7)}}</p>
<p class="tips">药品经营许可证</p> <p class="tips">药品经营许可证</p>
<el-form-item prop="imgUrlP7"> <el-form-item prop="imgUrlP7">
...@@ -945,7 +947,7 @@ ...@@ -945,7 +947,7 @@
<!-- </el-date-picker>--> <!-- </el-date-picker>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- </div>--> <!-- </div>-->
<div v-if="controlLicense.includes('3')"> <div v-if="controlLicense.filter((i => { return String(i).charAt(0) == '3'; })).length > 0">
<p v-if="certifyValidDtoList(9)" class="red">{{certifyValidDtoList(9)}}</p> <p v-if="certifyValidDtoList(9)" class="red">{{certifyValidDtoList(9)}}</p>
<p class="tips">食品经营(流通)许可证</p> <p class="tips">食品经营(流通)许可证</p>
<el-form-item prop="imgUrlP9"> <el-form-item prop="imgUrlP9">
...@@ -994,7 +996,7 @@ ...@@ -994,7 +996,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
<div v-if="controlLicense.includes(3) && controlLicense.includes('2')"> <div v-if="controlLicense.filter((i => { return String(i).charAt(0) == '2'; })).length > 0">
<p v-if="certifyValidDtoList(10)" class="red">{{certifyValidDtoList(10)}}</p> <p v-if="certifyValidDtoList(10)" class="red">{{certifyValidDtoList(10)}}</p>
<p class="tips">医疗器械经营许可证</p> <p class="tips">医疗器械经营许可证</p>
<el-form-item prop="imgUrlP10"> <el-form-item prop="imgUrlP10">
...@@ -1043,7 +1045,7 @@ ...@@ -1043,7 +1045,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
<div v-if="controlLicense.includes('2')"> <div v-if="controlLicense.filter((i => { return String(i).charAt(0) == '2' && String(i).charAt(3) == '3'; })).length > 0">
<p class="tips">医疗器械网络销售备案</p> <p class="tips">医疗器械网络销售备案</p>
<el-form-item prop="imgUrlP13"> <el-form-item prop="imgUrlP13">
<el-upload <el-upload
...@@ -1091,7 +1093,7 @@ ...@@ -1091,7 +1093,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
<div v-if="controlLicense.includes(2) && controlLicense.includes('2')"> <div v-if="controlLicense.filter((i => { return String(i).charAt(0) == '2' && String(i).charAt(3) == '2'; })).length > 0">
<p v-if="certifyValidDtoList(11)" class="red">{{certifyValidDtoList(11)}}</p> <p v-if="certifyValidDtoList(11)" class="red">{{certifyValidDtoList(11)}}</p>
<p class="tips">二类医疗器械经营备案凭证</p> <p class="tips">二类医疗器械经营备案凭证</p>
<el-form-item prop="imgUrlP11"> <el-form-item prop="imgUrlP11">
...@@ -1605,7 +1607,7 @@ export default { ...@@ -1605,7 +1607,7 @@ export default {
'certifyReq.legalName':[{type: "string", required: true, message: '请输入法人姓名', trigger: 'change'}], 'certifyReq.legalName':[{type: "string", required: true, message: '请输入法人姓名', trigger: 'change'}],
'certifyReq.legalCertNo':[{type: "string", required: true, message: '请输入证件号码', trigger: 'change'}], 'certifyReq.legalCertNo':[{type: "string", required: true, message: '请输入证件号码', trigger: 'change'}],
imgUrlC3Date:[{type: "array", required: true, message: '请选择有效日期', trigger: 'change'}], imgUrlC3Date:[{type: "array", required: true, message: '请选择有效日期', trigger: 'change'}],
imgUrlP5:[{type: "string", required: true, message: '请上传图片', trigger: 'blur'}], imgUrlP5:[{type: "string", required: true, message: '请上传图片', trigger: 'change'}],
imgUrlP5Date:[{type: "array", required: true, message: '请选择有效日期', trigger: 'change'}], imgUrlP5Date:[{type: "array", required: true, message: '请选择有效日期', trigger: 'change'}],
imgUrlP8:[{type: "string", required: true, message: '请上传图片', trigger: 'change'}], imgUrlP8:[{type: "string", required: true, message: '请上传图片', trigger: 'change'}],
imgUrlP9:[{type: "string", required: true, message: '请上传图片', trigger: 'change'}], imgUrlP9:[{type: "string", required: true, message: '请上传图片', trigger: 'change'}],
...@@ -1697,20 +1699,6 @@ export default { ...@@ -1697,20 +1699,6 @@ export default {
} }
}, },
watch: { watch: {
"formData.certifyReq.bizScope": {
handler(val) {
console.log(val);
const j = [];
if(val) {
val.map( i => {
i.type && j.push(String(i.type),i.id)
})
this.controlLicense = j;
console.log(this.controlLicense);
}
},
deep: true,
},
}, },
created() { created() {
vm = this; vm = this;
...@@ -1760,21 +1748,13 @@ export default { ...@@ -1760,21 +1748,13 @@ export default {
storejs.remove('store_info'); storejs.remove('store_info');
this.curmbSecond = "新建店铺"; this.curmbSecond = "新建店铺";
this.isDisabled = false; this.isDisabled = false;
// if(s){
// // 存在数据 就反现
// this.formData = s;
// const {areaStr} = s.certifyReq;
// const v = areaStr.map(i => {return i.label;}).join('/');
// this.orgRegionValueFirst = v;
// this.orgDateReverse();
// }
} }
} }
}, },
//日期 设置 //日期 设置
orgDateReverse () { orgDateReverse () {
const {licenseValidDateBegin,licenseValidDateEnd,legalValidDateBegin, legalValidDateEnd, assignorValidDateBegin, assignorValidDateEnd} = this.formData.certifyReq; const {licenseValidDateBegin,licenseValidDateEnd,legalValidDateBegin, legalValidDateEnd, assignorValidDateBegin, assignorValidDateEnd} = this.formData.certifyReq;
const {certifyLicenseImgList, certifyReportImgList} = this.formData.certifyReq; const {certifyLicenseImgList, certifyReportImgList, bizScope} = this.formData.certifyReq;
this.formData.imgUrlC1Date = [licenseValidDateBegin, licenseValidDateEnd]; this.formData.imgUrlC1Date = [licenseValidDateBegin, licenseValidDateEnd];
this.formData.imgUrlC5Date = [assignorValidDateBegin, assignorValidDateEnd]; this.formData.imgUrlC5Date = [assignorValidDateBegin, assignorValidDateEnd];
this.formData.imgUrlC3Date = [legalValidDateBegin, legalValidDateEnd]; this.formData.imgUrlC3Date = [legalValidDateBegin, legalValidDateEnd];
...@@ -1785,7 +1765,14 @@ export default { ...@@ -1785,7 +1765,14 @@ export default {
const m = `imgUrlP${i.imageType}`; const m = `imgUrlP${i.imageType}`;
this.formData[n] = [i.validDateBegin, i.validDateEnd]; this.formData[n] = [i.validDateBegin, i.validDateEnd];
this.formData[m] = i.url; this.formData[m] = i.url;
}) });
if(bizScope){
const j = [];
bizScope.map( i => {
i.type && j.push(String(i.type) + '__' + i.id,)
})
this.controlLicense = j;
}
}, },
resetImgUrl () { resetImgUrl () {
// 营业执照 legalCertBackUrl legalCertFrontUrl // 营业执照 legalCertBackUrl legalCertFrontUrl
...@@ -2388,6 +2375,7 @@ export default { ...@@ -2388,6 +2375,7 @@ export default {
break; break;
case 'imgUrlP5': case 'imgUrlP5':
// 委托书 // 委托书
this.$refs.pIdCardBack.clearValidate();
this.formData.certifyReq.assignorLetterUrl = u; this.formData.certifyReq.assignorLetterUrl = u;
break; break;
case 'imgUrlP7': case 'imgUrlP7':
...@@ -2492,11 +2480,23 @@ export default { ...@@ -2492,11 +2480,23 @@ export default {
} }
}, },
orgScopeLISTChange(v){ orgScopeLISTChange(v){
const that = this;
this.$nextTick(() => {
const c = that.$refs['cascaderBizScope'].getCheckedNodes();
const m = c.filter( i => {return !i.hasChildren;}).map(k => {return {...k.data}});
const j = [];
if(m) {
m.map( i => {
i.type && j.push(String(i.type) + '__' + i.id,)
})
this.controlLicense = j;
}
});
const checkedNodes = this.$refs['cascaderBizScope'].getCheckedNodes(); const checkedNodes = this.$refs['cascaderBizScope'].getCheckedNodes();
const n = checkedNodes.filter( i => {return !i.hasChildren;}).map(k => {return {...k.data}}); const n = checkedNodes.filter( i => {return !i.hasChildren;}).map(k => {return {...k.data}});
vm.formData.certifyReq.bizScope = n; vm.formData.certifyReq.bizScope = n;
this.bizScopeCasValue = v; this.bizScopeCasValue = v;
console.log(this.bizScopeCasValue ,this.controlLicense);
}, },
// 获取裁剪的图片数据 // 获取裁剪的图片数据
getCropImg(argument) { getCropImg(argument) {
...@@ -3235,5 +3235,10 @@ export default { ...@@ -3235,5 +3235,10 @@ export default {
.el-range-editor{ .el-range-editor{
width: 500px; width: 500px;
} }
.required-star::before{
content: "*";
color: #f56c6c;
margin-right: 4px;
}
} }
</style> </style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册