提交 acfd1215 编写于 作者: qian.jie's avatar qian.jie

Merge branch 'testing/finance' of...

Merge branch 'testing/finance' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into feature/jq
此差异已折叠。
...@@ -142,5 +142,24 @@ export const getBusinessCategory = () => { ...@@ -142,5 +142,24 @@ export const getBusinessCategory = () => {
}); });
}; };
export const getContractList = (projectId) => {
return fetch({
headers,
url: getBaseUrl(`store/contract/options/queryByProjectId/${projectId}`),
method: "get",
description: "查询合同",
});
};
export const getCooperationProjectList = () => {
return fetch({
headers,
url: getBaseUrl(
`store/cooperation/project/options/query`
),
method: "get",
description: "查询合作项目",
});
};
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</el-progress> </el-progress>
<el-button class="dl-video" icon="el-icon-delete" circle @click="deleteVideo" v-if="videoList.length == 1"></el-button> <el-button class="dl-video" icon="el-icon-delete" circle @click="deleteVideo" v-if="videoList.length == 1"></el-button>
</el-form-item> </el-form-item>
<el-form-item label="业务类型" prop="businessCategoryId"> <!-- <el-form-item label="业务类型" prop="businessCategoryId">
<el-select <el-select
v-model="formData3.businessCategoryId" v-model="formData3.businessCategoryId"
placeholder="请选择业务类型" placeholder="请选择业务类型"
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
:value="item.id" :value="item.id"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
<el-form-item label="商品类型" prop="goodsType"> <el-form-item label="商品类型" prop="goodsType">
<el-select <el-select
v-model="formData3.goodsType" v-model="formData3.goodsType"
...@@ -140,7 +140,37 @@ ...@@ -140,7 +140,37 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 新增项目合同名称 -->
<el-form-item label="项目-合同名称" prop="cooperationProjectId">
<el-select
v-model="formData3.cooperationProjectId"
placeholder="请选择"
size="small"
:disabled="isEdit && isProject"
@change="getContract"
clearable
filterable>
<el-option
v-for="(item,index) in cooperationProjectList"
:key="item.projectName+'-'+index"
:label="item.projectName"
:value="item.cooperationProjectId"
></el-option>
</el-select>
<el-select
v-model="formData3.contractId"
placeholder="请选择"
size="small"
clearable
:disabled="isEdit && isContract">
<el-option
v-for="(item,index) in contractList"
:key="item.contractName+'-'+index"
:label="item.contractName"
:value="item.contractId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否支持售后" prop="expressLimitFlag" v-if="storeType < 3"> <el-form-item label="是否支持售后" prop="expressLimitFlag" v-if="storeType < 3">
<el-radio-group v-model="formData3.expressLimitFlag" :disabled="!hasRepoFlag"> <el-radio-group v-model="formData3.expressLimitFlag" :disabled="!hasRepoFlag">
...@@ -930,7 +960,7 @@ ...@@ -930,7 +960,7 @@
import { openLoading, closeLoading, signFigures } from "../../utils/utils"; import { openLoading, closeLoading, signFigures } from "../../utils/utils";
import { isEmptyUtils } from "@/utils/index"; import { isEmptyUtils } from "@/utils/index";
import { doUpload, getFilePath, createFilePath } from "../../utils/qiniu-util"; import { doUpload, getFilePath, createFilePath } from "../../utils/qiniu-util";
import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList, getTypeCodeList,getBusinessCategory } from '@/utils/goods'; import { updateGoods ,updateStock,dosageAll,getDeparts,getGoodsList, getGoodDetails, updateGoodsV2, getHospitalInfoByStoreId, getCheckPackageIdList, getTypeCodeList,getContractList, getCooperationProjectList} from '@/utils/goods';
import { getStoreAdressRepot } from "@/utils/shop"; import { getStoreAdressRepot } from "@/utils/shop";
import Cropper from '@/components/common/cropper.vue' import Cropper from '@/components/common/cropper.vue'
import { originRules1, originRules2, originRules, originRules3 } from './rules'; import { originRules1, originRules2, originRules, originRules3 } from './rules';
...@@ -1071,9 +1101,13 @@ ...@@ -1071,9 +1101,13 @@
videoModel:{ videoModel:{
videoFullPath: '' videoFullPath: ''
}, },
businessCategoryList:[], // businessCategoryList:[],
sumFile: 0, sumFile: 0,
uploadProgress:0, // 上传视频进度条 uploadProgress:0, // 上传视频进度条
cooperationProjectList: [], // 合作项目
contractList: [], // 合同
isProject: false, // 是否选择合作项目
isContract: false, // 是否选择合同
} }
}, },
computed: { computed: {
...@@ -1105,8 +1139,9 @@ ...@@ -1105,8 +1139,9 @@
this.curmbThird = this.title; this.curmbThird = this.title;
this.formData.storeId = Number(storeId) || ''; this.formData.storeId = Number(storeId) || '';
this.getTypeCodeList(); this.getTypeCodeList();
this.getBusinessCategory(); // this.getBusinessCategory();
this.getLever(0,1) this.getLever(0,1)
this.getCooperationProjectList();
dosageAll().then((res)=>{ dosageAll().then((res)=>{
this.doseAll = res.data this.doseAll = res.data
if (!this.doseAll) { if (!this.doseAll) {
...@@ -1138,14 +1173,33 @@ ...@@ -1138,14 +1173,33 @@
} }
}, },
methods: { methods: {
// 获取业务类型 // 获取合同
getBusinessCategory(){ getContractList(projectId) {
getBusinessCategory().then((res) => { getContractList(projectId || 0).then(res => {
if (res.code == '000000') { if(res.code == '000000') {
this.businessCategoryList=res.data this.contractList = res.data;
} }
}).catch((err)=>{}) })
},
// 获取合作项目
getCooperationProjectList() {
getCooperationProjectList().then(res => {
if(res.code == '000000') {
this.cooperationProjectList = res.data;
}
})
}, },
getContract(projectId) {
this.getContractList(projectId);
},
// 获取业务类型
// getBusinessCategory(){
// getBusinessCategory().then((res) => {
// if (res.code == '000000') {
// this.businessCategoryList=res.data
// }
// }).catch((err)=>{})
// },
// 判断imgurl是否有效 // 判断imgurl是否有效
checkImgExists(imgurl) { checkImgExists(imgurl) {
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
...@@ -1195,12 +1249,13 @@ ...@@ -1195,12 +1249,13 @@
}; };
const { goodsInfo, medicalService, buyLimitDtoList, hasRepoFlag} = res.data; const { goodsInfo, medicalService, buyLimitDtoList, hasRepoFlag} = res.data;
const { goodsName, goodsDescription, goodsType,businessCategoryId, expressLimitFlag,goodsHeaderImages=[], goodsVideoList=[] } = goodsInfo; const { goodsName, goodsDescription, goodsType, expressLimitFlag,goodsHeaderImages=[], goodsVideoList=[], contractId, cooperationProjectId } = goodsInfo;
this.isProject = cooperationProjectId;
this.isContract = contractId;
this.formData = {...this.formData, ...goodsInfo}; this.formData = {...this.formData, ...goodsInfo};
this.formData2 = medicalService; this.formData2 = medicalService;
this.formData = { ...this.formData, ...this.formData2 }; this.formData = { ...this.formData, ...this.formData2 };
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType,businessCategoryId, expressLimitFlag }; this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType, expressLimitFlag, cooperationProjectId, contractId };
this.buyLimitDtoList = buyLimitDtoList; this.buyLimitDtoList = buyLimitDtoList;
this.hasRepoFlag = hasRepoFlag; this.hasRepoFlag = hasRepoFlag;
this.$set(this.formData2, 'suitableArr', this.formData.suitable.split(',')); this.$set(this.formData2, 'suitableArr', this.formData.suitable.split(','));
...@@ -1252,12 +1307,14 @@ ...@@ -1252,12 +1307,14 @@
}); });
} }
const {goodsList, hasRepoFlag } = res.data; const {goodsList, hasRepoFlag } = res.data;
const { goodsName, goodsDescription, goodsType, businessCategoryId,expressLimitFlag, goodsHeaderImages=[], goodsVideoList=[] } = goodsList[0]; const { goodsName, goodsDescription, goodsType,expressLimitFlag, goodsHeaderImages=[], goodsVideoList=[],contractId, cooperationProjectId } = goodsList[0];
const goodDet = goodsList[0]; const goodDet = goodsList[0];
goodDet.otc1 = goodDet.otc ? '1' : '0'; goodDet.otc1 = goodDet.otc ? '1' : '0';
this.isProject = cooperationProjectId;
this.isContract = contractId;
this.formData1 = goodDet; this.formData1 = goodDet;
this.formData = goodDet; this.formData = goodDet;
this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType,businessCategoryId, expressLimitFlag }; this.formData3 = { goodsName, goodsDescription, goodsHeaderImages, goodsVideoList, goodsType, expressLimitFlag,contractId, cooperationProjectId };
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;
...@@ -1554,6 +1611,13 @@ ...@@ -1554,6 +1611,13 @@
this.formData.specificationImages = this.fileIntrList; this.formData.specificationImages = this.fileIntrList;
this.formData.buyLimitDtoList = this.buyLimitDtoList; this.formData.buyLimitDtoList = this.buyLimitDtoList;
this.isgoodsImages = this.formData.goodsImages.length == 0 ? false :true; this.isgoodsImages = this.formData.goodsImages.length == 0 ? false :true;
const {cooperationProjectId, contractId} = this.formData3;
if ((cooperationProjectId && !contractId) || (!cooperationProjectId && contractId)) {
return this.$message({
message: '请选择项目-合同名称',
type: 'warning'
});
}
// 如果是【药品】类型的商品 // 如果是【药品】类型的商品
// if(this.isMedic){ // if(this.isMedic){
......
...@@ -76,8 +76,10 @@ const form3 = { ...@@ -76,8 +76,10 @@ const form3 = {
goodsHeaderImages: [], goodsHeaderImages: [],
goodsVideoList: [], goodsVideoList: [],
goodsType: "", goodsType: "",
businessCategoryId:"", // businessCategoryId: "",
expressLimitFlag: 0, //是否支持退货退款 expressLimitFlag: 0, //是否支持退货退款
cooperationProjectId: '', // 合作项目id
contractId: '', // 合同id
}; };
......
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册