Commit 53b0f40f by zhuxiaomei

添加界面合成一个

parent ca670964
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
} else if (testedType === 0) { } else if (testedType === 0) {
this.$router.push({ this.$router.push({
path: '/sampling_list/sampling_list_add', path: '/sampling_list/sampling_list_add',
query: {testedType, shelfId, title: '抽样单添加-非网络'} query: {testedType, shelfId, title: '抽样单添加'}
}) })
} else { } else {
this.$router.push({ this.$router.push({
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<template> <template>
<div> <div>
<add-table> <add-table>
<table-row> <table-row>
<table-col> <table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
name="samplingNum"
v-model="formObj.samplingNum"
label="抽样单编号"
:rules="[{ required: true, message: '请填写抽样单编号' }]"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.source"
label="任务来源"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
label="任务类别">
<template #input>
<van-radio-group disabled v-model="formObj.taskType" direction="horizontal">
<van-radio :name="item" :key="item" shape="square" v-for="item in taskTypeList">
{{ item }}
</van-radio>
</van-radio-group>
</template>
</van-field>
</table-col>
</table-row>
<table-row flex-none>
<table-col>
被抽样单位信息
</table-col>
<table-col flex-none>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="nonNetTested.name"
label="单位名称"
right-icon="add-o"
@click-right-icon="_companySelect('nonNetTested.name')"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="区域类型">
<template #input>
<van-radio-group disabled v-model="nonNetTested.areaType" direction="horizontal">
<van-radio v-for="item in areaTypeList" :key="item" :name="item" shape="square">
{{ item }}
</van-radio>
</van-radio-group>
</template>
</van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="areaObj"
label="单位地址"
@click="showCityPicker=true"
:columns-placeholder="['请选择', '请选择', '请选择']"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.legalPerson"
label="法人代表"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.sales"
label="年销售额(万元)"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.license"
label="营业执照号"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.linkman"
label="联系人"
></van-field>
</table-col>
<table-col>
<van-radio-group disabled v-model="nonNetTested.permitType" direction="horizontal">
<van-radio v-for="item in permitTypeList" :key="item" :name="item" shape="square">
{{ item }}
</van-radio>
</van-radio-group>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.permitNum"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.tel"
label="电话"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.fax"
label="传真"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.postalCode"
label="邮编"
></van-field>
</table-col>
</table-row>
</table-col>
</table-row>
<table-row flex-none>
<table-col>
抽样地点
</table-col>
<table-col>
<van-radio-group disabled v-model="place" direction="horizontal">
<div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center">生产环节:</div>
<van-radio v-for="item in proLinkList" :key="item" :name="1+','+item" shape="square">
{{ item }}
</van-radio>
</div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center">流通环节:</div>
<van-radio v-for="item in flowLinkList" :key="item" :name="2+','+item" shape="square">
{{ item }}
</van-radio>
<div style="border-bottom: 1px solid #000">
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="placeRemark2"
></van-field>
</div>
</div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;">餐饮环节:</div>
<van-radio v-for="item in restLinkList1" :key="item.value" :name="3+','+item.value"
shape="square">
{{ item.label }}
</van-radio>
</div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;width:72px"></div>
<van-radio v-for="item in restLinkList2" :key="item.value" :name="3+','+item.value"
shape="square">
{{ item.label }}
</van-radio>
</div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;width:72px"></div>
<van-radio v-for="item in restLinkList3" :key="item.value" :name="3+','+item"
shape="square">{{ item }}
</van-radio>
<div style="border-bottom: 1px solid #000">
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="placeRemark3"
></van-field>
</div>
</div>
</div>
</van-radio-group>
</table-col>
</table-row>
<table-row flex-none>
<table-col>
样品信息
</table-col>
<table-col flex-none>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="样品来源">
<template #input>
<van-radio-group disabled v-model="sample.source" direction="horizontal">
<van-radio :name="item" :key="item" shape="square" v-for="item in sourceList">
{{ item }}
</van-radio>
</van-radio-group>
<div style="border-bottom: 1px solid #000">
<van-field readonly <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
name="samplingNum" v-model="sample.sourceRemark"
v-model="formObj.samplingNum"
label="抽样单编号"
:rules="[{ required: true, message: '请填写抽样单编号' }]"
></van-field> ></van-field>
</table-col> </div>
<table-col> </template>
</van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="样品属性">
<template #input>
<van-radio-group disabled v-model="sample.properties" direction="horizontal">
<van-radio :name="item" :key="item" shape="square"
v-for="item in propertiesList">{{ item }}
</van-radio>
</van-radio-group>
<div style="border-bottom: 1px solid #000">
<van-field readonly <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="formObj.taskNum" v-model="sample.propertiesRemark"
label="No."
></van-field> ></van-field>
</table-col> </div>
</table-row> </template>
<table-row> </van-field>
<table-col> </table-col>
</table-row>
<table-row>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="样品类型">
<template #input>
<van-radio-group disabled v-model="sample.type" direction="horizontal">
<van-radio :name="item" :key="item" shape="square" v-for="item in sampleTypeList">
{{ item }}
</van-radio>
<div style="border-bottom: 1px solid #000">
<van-field readonly <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="formObj.source" v-model="sample.typeRemark"
label="任务来源"
></van-field> ></van-field>
</table-col> </div>
<table-col> </van-radio-group>
<van-field readonly </template>
label-class="cus-field-class" </van-field>
label-width="50%" </table-row>
label-align="center" <table-row>
label="任务类别"> <table-col>
<template #input> <van-field readonly
<van-radio-group disabled v-model="formObj.taskType" direction="horizontal"> label-class="cus-field-class"
<van-radio :name="item" :key="item" shape="square" v-for="item in taskTypeList"> label-width="25%"
{{item}} label-align="center"
</van-radio> v-model="sample.name"
</van-radio-group> label="样品名称"
</template> ></van-field>
</van-field> </table-col>
</table-col> <table-col>
</table-row> <van-field readonly
<table-row flex-none> label-class="cus-field-class"
<table-col> label-width="25%"
被抽样单位信息 label-align="center"
</table-col> v-model="sample.trademark"
<table-col flex-none> label="商标"
<table-row> ></van-field>
<table-col> </table-col>
<van-field readonly </table-row>
label-class="cus-field-class" <table-row>
label-width="25%" <table-col>
label-align="center" <van-radio-group disabled v-model="sample.dateType" direction="horizontal">
v-model="nonNetTested.name" <van-radio v-for="item in dateTypeList" :key="item" :name="item" shape="square">
label="单位名称" {{ item }}
></van-field> </van-radio>
</table-col> </van-radio-group>
<table-col> </table-col>
<van-field readonly <table-col>
label-class="cus-field-class" <van-field readonly
label-width="25%" label-class="cus-field-class"
label-align="center" label-width="50%"
v-model="areaObj" label-align="center"
label="省市区" v-model="sample.sampleDate"
></van-field> label=""
</table-col> ></van-field>
</table-row> </table-col>
<table-row> <table-col>
<table-col> <van-field readonly
<van-field readonly label-class="cus-field-class"
label-class="cus-field-class" label-width="50%"
label-width="25%" label-align="center"
label-align="center" v-model="sample.specification"
v-model="nonNetTested.address" label="规格型号"
label="单位地址" ></van-field>
placeholder="如证照与许可证不一致,以许可证为准" </table-col>
></van-field> </table-row>
</table-col> <table-row>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="区域类型">
<template #input>
<van-radio-group disabled v-model="nonNetTested.areaType" direction="horizontal">
<van-radio v-for="item in areaTypeList" :key="item" :name="item" shape="square">
{{item}}
</van-radio>
</van-radio-group>
<div style="border-bottom: 1px solid #000">
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.areaTypeRemark"
></van-field>
</div>
</template>
</van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-radio-group disabled v-model="nonNetTested.permitType" direction="horizontal">
<van-radio v-for="item in permitTypeList" :key="item" :name="item" shape="square">
{{item}}
</van-radio>
</van-radio-group>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.permitNum"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.legalPerson"
label="法人代表"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.linkman"
label="联系人"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.license"
label="营业执照号/社会信用代码"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="nonNetTested.tel"
label="联系电话"
></van-field>
</table-col>
</table-row>
</table-col>
</table-row>
<table-row flex-none>
<table-col>
抽样地点
</table-col>
<table-col>
<van-radio-group disabled v-model="place" direction="horizontal">
<div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center">生产环节:</div>
<van-radio v-for="item in proLinkList" :key="item" :name="1+','+item" shape="square">
{{item}}
</van-radio>
<div style="border-bottom: 1px solid #000">
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="placeRemark1"
></van-field>
</div>
</div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center">流通环节:</div>
<van-radio v-for="item in flowLinkList" :key="item" :name="2+','+item" shape="square">
{{item}}
</van-radio>
<div style="border-bottom: 1px solid #000">
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="placeRemark2"
></van-field>
</div>
</div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;">餐饮环节:</div>
<van-radio v-for="item in restLinkList1" :key="item.value" :name="3+','+item.value"
shape="square">
{{item.label}}
</van-radio>
</div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;width:72px"></div>
<van-radio v-for="item in restLinkList2" :key="item.value" :name="3+','+item.value"
shape="square">
{{item.label}}
</van-radio>
</div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;width:72px"></div>
<van-radio v-for="item in restLinkList3" :key="item.value" :name="3+','+item"
shape="square">{{item}}
</van-radio>
<div style="border-bottom: 1px solid #000">
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="placeRemark3"
></van-field>
</div>
</div>
</div>
</van-radio-group>
</table-col> <table-col>
</table-row> <van-field readonly
<table-row> label-class="cus-field-class"
<table-col> label-width="50%"
<van-field readonly label-align="center"
label-class="cus-field-class" v-model="sample.batchNo"
label-width="50%" label="样品批号"
label-align="center" ></van-field>
v-model="formObj.samplingDate" </table-col>
label="抽样日期" <table-col>
></van-field> <van-field readonly
</table-col> label-class="cus-field-class"
<table-col> label-width="50%"
<van-field readonly label-align="center"
label-class="cus-field-class" v-model="sample.shelfLife"
label-width="50%" label="保质期"
label-align="center" ></van-field>
v-model="formObj.testMembers" </table-col>
label="抽样人员" </table-row>
></van-field> <table-row>
</table-col> <table-col>
</table-row> <van-field readonly
<table-row flex-none> label-class="cus-field-class"
<table-col> label-width="50%"
样品信息 label-align="center"
</table-col> v-model="sample.standard"
<table-col flex-none> label="执行标准/技术文档"
<table-row> ></van-field>
<table-col> </table-col>
<van-field readonly <table-col>
label-class="cus-field-class" <van-field readonly
label-width="50%" label-class="cus-field-class"
label-align="center" label-width="50%"
v-model="sample.name" label-align="center"
label="样品名称" v-model="sample.qualityGrade"
></van-field> label="质量等级"
</table-col> ></van-field>
<table-col> </table-col>
<van-field readonly </table-row>
label-class="cus-field-class" <table-row>
label-width="50%" <table-col>
label-align="center" <van-field readonly
v-model="sample.trademark" label-class="cus-field-class"
label="商标" label-width="50%"
></van-field> label-align="center"
</table-col> v-model="formObj.proLicense"
<table-col> label="生产许可编号"
<van-field readonly ></van-field>
label-class="cus-field-class" </table-col>
label-width="50%" <table-col>
label-align="center" <van-field readonly
v-model="sample.qrcode" label-class="cus-field-class"
label="条形码" label-width="50%"
></van-field> label-align="center"
</table-col> v-model="sample.price"
</table-row> label="单价"
<table-row> ></van-field>
<table-col> </table-col>
<van-field readonly <table-col>
label-class="cus-field-class" <van-field readonly
label-width="25%" label-class="cus-field-class"
label-align="center" label-width="50%"
v-model="sample.firstClass" label-align="center"
label="大类" label="是否进口">
></van-field> <template #input>
</table-col> <van-radio-group disabled v-model="sample.inward" direction="horizontal">
<table-col> <van-radio v-for="item in trueOrFalseList" :key="item.value" :name="item.value"
<van-field readonly shape="square">{{ item.label }}
label-class="cus-field-class" </van-radio>
label-width="25%" </van-radio-group>
label-align="center" </template>
v-model="sample.secondClass" </van-field>
label="亚类" </table-col>
></van-field> </table-row>
</table-col> <table-row>
</table-row> <table-col>
<table-row> <van-field readonly
<table-col> label-class="cus-field-class"
<van-field readonly label-width="50%"
label-class="cus-field-class" label-align="center"
label-width="25%" v-model="sample.samplingBase"
label-align="center" label="抽样基数/批量"
v-model="sample.thirdClass" ></van-field>
label="次亚类" </table-col>
></van-field> <table-col>
</table-col> <van-field readonly
<table-col> label-class="cus-field-class"
<van-field readonly label-width="50%"
label-class="cus-field-class" label-align="center"
label-width="25%" v-model="sample.quantity"
label-align="center" label="抽样数量(含备样)"
v-model="sample.fourthClass" ></van-field>
label="细类" </table-col>
></van-field> <table-col>
</table-col> <van-field readonly
</table-row> label-class="cus-field-class"
<table-row> label-width="50%"
<van-field readonly label-align="center"
label-class="cus-field-class" v-model="sample.backupQuanity"
label-width="25%" label="备样数量"
label-align="center" ></van-field>
label="样品类型"> </table-col>
<template #input> </table-row>
<van-radio-group disabled v-model="sample.type" direction="horizontal"> <table-row>
<van-radio :name="item" :key="item" shape="square" v-for="item in sampleTypeList"> <table-col>
{{item}} <van-field readonly
</van-radio> label-class="cus-field-class"
<div style="border-bottom: 1px solid #000"> label-width="50%"
<van-field readonly label-align="center"
label-class="cus-field-class" label="样品形态">
label-width="50%" <template #input>
label-align="center" <van-radio-group disabled v-model="sample.shape" direction="horizontal">
v-model="sample.typeRemark" <van-radio v-for="item in shapeList" :name="item" :key="item"
></van-field> shape="square">{{ item }}
</div> </van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
</table-row> </table-col>
<table-row> <table-col>
<table-col> <van-field readonly
<van-field readonly label-class="cus-field-class"
label-class="cus-field-class" label-width="25%"
label-width="25%" label-align="center"
label-align="center" label="包装分类">
label="样品来源"> <template #input>
<template #input> <van-radio-group disabled v-model="sample.packClass" direction="horizontal">
<van-radio-group disabled v-model="sample.source" direction="horizontal"> <van-radio v-for="item in packClassList" :name="item" :key="item"
<van-radio :name="item" :key="item" shape="square" v-for="item in sourceList"> shape="square">{{ item }}
{{item}} </van-radio>
</van-radio> </van-radio-group>
</van-radio-group> </template>
<div style="border-bottom: 1px solid #000"> </van-field>
<van-field readonly </table-col>
label-class="cus-field-class" </table-row>
label-width="50%" </table-col>
label-align="center" </table-row>
v-model="sample.sourceRemark" <table-row flex-none>
></van-field> <table-col>(标称)生产者信息</table-col>
</div> <table-col flex-none>
</template> <table-row>
</van-field> <table-col>
</table-col> <van-field readonly
<table-col> label-class="cus-field-class"
<van-field readonly label-width="25%"
label-class="cus-field-class" label-align="center"
label-width="25%" v-model="formObj.proAddress"
label-align="center" label="生产者地址"
label="样品属性"> ></van-field>
<template #input> </table-col>
<van-radio-group disabled v-model="sample.properties" direction="horizontal"> </table-row>
<van-radio :name="item" :key="item" shape="square" <table-row>
v-for="item in propertiesList">{{item}} <table-col>
</van-radio> <van-field readonly
</van-radio-group> label-class="cus-field-class"
<div style="border-bottom: 1px solid #000"> label-width="25%"
<van-field readonly label-align="center"
label-class="cus-field-class" v-model="formObj.proName"
label-width="50%" label="生产者名称"
label-align="center" right-icon="add-o"
v-model="sample.propertiesRemark" @click-right-icon="_companySelect('formObj.proName')"
></van-field> ></van-field>
</div> </table-col>
</template> <table-col>
</van-field> <van-field readonly
</table-col> label-class="cus-field-class"
</table-row> label-width="25%"
<table-row> label-align="center"
<table-col> v-model="formObj.proTel"
<van-radio-group disabled v-model="sample.dateType" direction="horizontal"> label="联系电话"
<van-radio v-for="item in dateTypeList" :key="item" :name="item" shape="square"> ></van-field>
{{item}} </table-col>
</van-radio> </table-row>
</van-radio-group> </table-col>
</table-col> </table-row>
<table-col> <table-row flex-none>
<van-field <table-col>(标称)样品储存条件</table-col>
readonly <table-col>
label-class="cus-field-class" <van-field readonly
label-width="50%" label-class="cus-field-class"
label-align="center" label-width=""
v-model="sample.sampleDate" label-align="center"
label="" label="">
></van-field> <template #input>
</table-col> <div style="display: flex">
</table-row> <van-checkbox-group disabled v-model="storageCondition" direction="horizontal">
<table-row> <van-checkbox v-for="item in storageConditionList" :name="item" :key="item"
<table-col> shape="square">{{ item }}
<van-field readonly </van-checkbox>
label-class="cus-field-class" </van-checkbox-group>
label-width="50%" <div style="border-bottom: 1px solid #000">
label-align="center" <van-field readonly
v-model="sample.standard" label-class="cus-field-class"
label="执行标准/技术文档" label-width="50%"
></van-field> label-align="center"
</table-col> v-model="sample.storageConditionRemark"
<table-col> ></van-field>
<van-field readonly </div>
label-class="cus-field-class" </div>
label-width="50%" </template>
label-align="center" </van-field>
v-model="sample.batchNo" </table-col>
label="样品批号" <table-col flex-none>
></van-field> <table-row>
</table-col> <table-col>
<table-col> <van-field readonly
<van-field readonly label-class="cus-field-class"
label-class="cus-field-class" label-width="50%"
label-width="50%" label-align="center"
label-align="center" v-model="sample.sandDeadline"
v-model="sample.specification" label="寄送样品截止日期"
label="规格型号" ></van-field>
></van-field> </table-col>
</table-col> </table-row>
</table-row> <table-row>
<table-row> <table-col>
<table-col> <van-field readonly
<van-field readonly label-class="cus-field-class"
label-class="cus-field-class" label-width="50%"
label-width="50%" label-align="center"
label-align="center" v-model="sample.sandAddress"
v-model="sample.qualityGrade" label="寄送样品地址"
label="质量等级" ></van-field>
></van-field> </table-col>
</table-col> </table-row>
<table-col> </table-col>
<van-field readonly </table-row>
label-class="cus-field-class" <table-row flex-none>
label-width="50%" <table-col>抽样样品包装</table-col>
label-align="center" <table-col>
v-model="sample.shelfLife" <van-field readonly
label="保质期" label-class="cus-field-class"
></van-field> label-width=""
</table-col> label-align="center"
<table-col> label="">
<van-field readonly <template #input>
label-class="cus-field-class" <van-radio-group disabled v-model="sample.pack" direction="horizontal">
label-width="50%" <van-radio v-for="item in packList" :name="item" :key="item"
label-align="center" shape="square">{{ item }}
v-model="sample.price" </van-radio>
label="单价" </van-radio-group>
></van-field> <div style="border-bottom: 1px solid #000">
</table-col> <van-field readonly
</table-row> label-class="cus-field-class"
<table-row> label-width="50%"
<table-col> label-align="center"
<van-field readonly v-model="sample.packRemark"
label-class="cus-field-class" ></van-field>
label-width="50%" </div>
label-align="center" </template>
v-model="sample.samplingBase" </van-field>
label="抽样基数" </table-col>
></van-field> <table-col>
</table-col> <van-field readonly
<table-col> label-class="cus-field-class"
<van-field readonly label-width="50%"
label-class="cus-field-class" label-align="center"
label-width="50%" label="抽样方式">
label-align="center" <template #input>
v-model="sample.quantity" <van-radio-group disabled v-model="sample.samplingMethod" direction="horizontal">
label="抽样数量" <van-radio :name="item" v-for="item in samplingMethodList" :key="item"
></van-field> shape="square">{{ item }}
</table-col> </van-radio>
<table-col> </van-radio-group>
<van-field readonly </template>
label-class="cus-field-class" </van-field>
label-width="50%" </table-col>
label-align="center" </table-row>
v-model="sample.unit" <table-row flex-none>
label="抽样数量单位" <table-col>抽样单位信息</table-col>
></van-field> <table-col flex-none>
</table-col> <table-row>
<table-col> <table-col>
<van-field readonly <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="sample.backupQuanity" v-model="formObj.testName"
label="备样数量" label="单位名称"
></van-field> right-icon="add-o"
</table-col> @click-right-icon="_companySelect('formObj.testName')"
</table-row> ></van-field>
<table-row> </table-col>
<table-col> <table-col>
<van-field readonly <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
label="抽样方式"> v-model="formObj.testAddress"
<template #input> label="地址"
<van-radio-group disabled v-model="sample.samplingMethod" direction="horizontal"> ></van-field>
<van-radio :name="item" v-for="item in samplingMethodList" :key="item" </table-col>
shape="square">{{item}} </table-row>
</van-radio> <table-row>
</van-radio-group> <table-col>
</template> <van-field readonly
</van-field> label-class="cus-field-class"
</table-col> label-width="50%"
<table-col> label-align="center"
<van-field readonly v-model="formObj.testLinkman"
label-class="cus-field-class" label="联系人"
label-width="50%" ></van-field>
label-align="center" </table-col>
label="是否进口"> <table-col>
<template #input> <van-field readonly
<van-radio-group disabled v-model="sample.inward" direction="horizontal"> label-class="cus-field-class"
<van-radio v-for="item in trueOrFalseList" :key="item.value" :name="item.value" label-width="50%"
shape="square">{{item.label}} label-align="center"
</van-radio> v-model="formObj.testTel"
</van-radio-group> label="电话"
</template> ></van-field>
</van-field> </table-col>
</table-col> </table-row>
<table-col> <table-row>
<van-field readonly <table-col>
label-class="cus-field-class" <van-field readonly
label-width="50%" label-class="cus-field-class"
label-align="center" label-width="50%"
v-model="sample.originPlace" label-align="center"
label="原产地" v-model="formObj.testEmail"
></van-field> label="邮箱"
</table-col> ></van-field>
</table-row> </table-col>
<table-row> <table-col>
<table-col> <van-field readonly
<van-field readonly label-class="cus-field-class"
label-class="cus-field-class" label-width="50%"
label-width="25%" label-align="center"
label-align="center" v-model="formObj.testFax"
label="包装分类"> label="传真"
<template #input> ></van-field>
<van-radio-group disabled v-model="sample.packClass" direction="horizontal"> </table-col>
<van-radio v-for="item in packClassList" :name="item" :key="item" </table-row>
shape="square">{{item}} </table-col>
</van-radio> </table-row>
</van-radio-group> <table-row>
</template> <table-col>
</van-field> <van-field readonly
</table-col> label-class="cus-field-class"
<table-col> label-width="100px"
<van-field readonly label-align="center"
label-class="cus-field-class" v-model="formObj.remark"
label-width="25%" label="备注"
label-align="center" ></van-field>
label="储存条件"> </table-col>
<template #input> </table-row>
<van-checkbox-group disabled v-model="storageCondition" direction="horizontal"> </add-table>
<van-checkbox v-for="item in storageConditionList" :name="item" :key="item" <div class="bottom-btn">
shape="square">{{item}} <van-button block type="info" @click="_goto">返回</van-button>
</van-checkbox>
</van-checkbox-group>
<div style="border-bottom: 1px solid #000">
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.storageConditionRemark"
></van-field>
</div>
</template>
</van-field>
</table-col>
</table-row>
</table-col>
</table-row>
<table-row flex-none>
<table-col>(标称)生产者信息</table-col>
<table-col flex-none>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.proName"
label="生产者名称"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.proAddress"
label="生产者地址"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.proLicense"
label="生产许可证号"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.proTel"
label="联系电话"
></van-field>
</table-col>
</table-row>
</table-col>
</table-row>
<table-row flex-none>
<table-col>(标称)第三方企业信息</table-col>
<table-col flex-none>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.thirdPartyName"
label="企业名称"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.thirdPartyAddress"
label="企业地址"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="企业性质">
<template #input>
<van-radio-group disabled v-model="formObj.thirdPartyNature" direction="horizontal">
<van-radio v-for="item in thirdPartyNatureList" :key="item" :name="item"
shape="square">{{item}}
</van-radio>
</van-radio-group>
<div style="border-bottom: 1px solid #000">
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.thirdPartyNatureRemark"
></van-field>
</div>
</template>
</van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.thirdPartyLicense"
label="企业许可证号"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.thirdPartyTel"
label="联系电话"
></van-field>
</table-col>
</table-row>
</table-col>
</table-row>
<table-row flex-none>
<table-col>抽样单位信息</table-col>
<table-col flex-none>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.testName"
label="单位名称"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.testAddress"
label="地址"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.testLinkman"
label="联系人"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.testTel"
label="电话"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.testEmail"
label="邮箱"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.testFax"
label="传真"
></van-field>
</table-col>
</table-row>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="100px"
label-align="center"
v-model="formObj.remark"
label="备注"
></van-field>
</table-col>
</table-row>
</add-table>
<div class="bottom-btn">
<van-button block type="info" @click="_goto">返回</van-button>
</div>
</div> </div>
</template> <van-popup v-model="showDatePicker" position="bottom"
:safe-area-inset-bottom="true"
:close-on-popstate="true">
<van-datetime-picker
type="date"
v-model="currentDate"
@confirm="_dateConfirm"
@cancel="showDatePicker = false"
></van-datetime-picker>
</van-popup>
<script> <van-popup v-model="showCityPicker" position="bottom"
import SamplingListAddTable from './components/SamplingListAddTable' :safe-area-inset-bottom="true"
import TableRow from './components/TableRow' :close-on-popstate="true">
import TableCol from './components/TableCol' <van-area title="省市区"
import {samplingSummary} from '../../api' :area-list="areaList"
@confirm="_areaConfirm"
@cancel="showCityPicker=false"
></van-area>
</van-popup>
export default { <SelectTester ref="tester" @on-result-change="_testerResult"></SelectTester>
name: "SamplingListAdd", <SelectProducter ref="producter" @on-result-change="_producterResult"></SelectProducter>
components: { <SelectTested ref="tested" @on-result-change="_testedResult"></SelectTested>
"add-table": SamplingListAddTable, </div>
"table-row": TableRow, </template>
"table-col": TableCol
},
data() {
return {
formObj: {
samplingNum: '',
taskNum: '',
source: '', <script>
taskType: '', import SamplingListAddTable from './components/SamplingListAddTable'
proName: '', import TableRow from './components/TableRow'
proAddress: '', import TableCol from './components/TableCol'
proLicense: '', import {samplingSummary, samplingSample} from '../../api'
proTel: '', import {default as areaList} from '../../lib/area'
import SelectTester from './components/SelectTester'
import SelectProducter from './components/SelectProducter'
import SelectTested from './components/SelectTested'
thirdPartyName: '', export default {
thirdPartyAddress: '', name: "SamplingListAdd",
thirdPartyNature: '', components: {
thirdPartyNatureRemark: '', "add-table": SamplingListAddTable,
thirdPartyLicense: '', "table-row": TableRow,
thirdPartyTel: '', "table-col": TableCol,
SelectTester,
SelectProducter,
SelectTested,
},
data() {
return {
showDatePicker: false,
currentDate: new Date(),
selectDateType: '',
testName: '', showCityPicker: false,
testAddress: '', areaList: areaList,
testLinkman: '',
testTel: '',
testFax: '',
remark: '',
samplingDate:'', formObj: {
testMembers:'', samplingNum: '',
testEmail:'', source: '',
}, taskType: '',
nonNetTested: { proLicense: '',
name: '', proAddress: '',
testedProvince:'', proName: '',
testedCity:'', proTel: '',
testedCountry:'', testName: '',
address: '', testAddress: '',
areaType: '', testLinkman: '',
areaTypeRemark: '', testTel: '',
permitType: '', testEmail: '',
permitNum: '', testFax: '',
legalPerson: '', remark: '',
linkman: '', },
license: '', nonNetTested: {
tel: '', name: '',
areaType: '',
testedProvince: '',
testedCity: '',
testedCountry: '',
legalPerson: '',
sales: '',
license: '',
linkman: '',
permitType: '',
permitNum: '',
tel: '',
fax: '',
postalCode: '',
placeLink: '',//保存时单独赋值 从place字段分离出
place: '', //保存时单独赋值 从place字段分离出
placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemark
},
sample: {
source: '',
sourceRemark: '',
properties: '',
propertiesRemark: '',
type: '',
typeRemark: '',
name: '',
trademark: '',
dateType: '',
sampleDate: '',
specification: '',
batchNo: '',
shelfLife: '',
standard: '',
qualityGrade: '',
price: '',
inward: '',
samplingBase: '',
quantity: '',
backupQuanity: '',
shape: '',
pack: '',
packClass: '',
storageCondition: '',
storageConditionRemark: '',
sandDeadline: '',
sandAddress: '',
samplingMethod: '',
},
taskTypeList: ['监督抽检', '风险监测'],
areaTypeList: ['城市', '乡村', '景点'],
permitTypeList: ['经营许可证号', '生产许可证号'],
sampleTypeList: ['食用农产品', '工业加工食品', '餐饮加工食品', '食品添加剂', '食品相关产品', '其他',],
sourceList: ['加工/自制', '委托生产', '外购', '其他'],
propertiesList: ['普通食品', '特殊食品', '节令食品', '重大活动保障食品', '其他',],
dateTypeList: ['生产日', '加工日', '购进日'],
samplingMethodList: ['无菌抽样', '非无菌抽样'],
trueOrFalseList: [{label: '是', value: 1}, {label: '否', value: 0}],
shapeList: ['固体', '半固体', '液体', '气体'],
packClassList: ['散装', '预包装'],
storageConditionList: ['常温', '冷藏', '冷冻', '避光', '密闭', '其他'],
thirdPartyNatureList: ['委托', '代理', '经销', '进口', '其他'],
packList: ['玻璃瓶', '塑料瓶', '塑料袋', '无菌袋', '其他'],
placeLink: '',//保存时单独赋值 从place字段分离出 storageCondition: [],
place: '', //保存时单独赋值 从place字段分离出 place: '', //1生产环节2流通环节3餐饮环节 值为“环节,地点”
placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemarkN placeRemark2: '',
}, placeRemark3: '',
sample: {
name:'',
trademark: '',
qrcode: '',
firstClass:'',
secondClass:'',
thirdClass:'',
fourthClass:'',
type: '',
typeRemark: '',
source: '',
sourceRemark: '',
properties: '',
propertiesRemark: '',
dateType: '',
sampleDate:'',
standard: '',
batchNo: '',
specification: '',
qualityGrade: '',
shelfLife: '',
price: '',
samplingBase: '',
quantity: '',
unit:'',
backupQuanity: '',
samplingMethod: '',
inward: '',
originPlace: '',
packClass: '',
storageCondition: [],
storageConditionRemark: ''
},
taskTypeList: ['监督抽检', '风险监测', '评价性抽检'],
areaTypeList: ['景点', '城市', '乡镇', '学校周边', '其他'],
permitTypeList: ['经营许可证号', '生产许可证号'],
sampleTypeList: ['食用农产品', '工业加工食品', '餐饮加工食品', '食品添加剂', '食品相关产品', '其他',],
sourceList: ['加工/自制', '委托生产', '外购', '其他'],
propertiesList: ['普通食品', '特殊食品', '节令食品', '重大活动保障食品', '其他',],
dateTypeList: ['生产日期', '购进日期', '加工日期', '检疫日期'],
samplingMethodList: ['无菌抽样', '非无菌抽样'],
trueOrFalseList: [{label: '是', value: 1}, {label: '否', value: 0}],
packClassList: ['预包装', '非定量包装', '无包装'],
storageConditionList: ['常温', '冷藏', '冷冻', '避光', '密闭', '阴凉', '通风', '干燥', '其他'],
thirdPartyNatureList: ['委托', '代理', '经销', '进口', '其他'],
placeRemark2Readonly: true,
placeRemark3Readonly: true,
storageCondition:[], proLinkList: ['原辅料库', '生产线', '半成品库', '成品库待检区', '成品库已检区'],
place: '', //1生产环节2流通环节3餐饮环节 值为“环节,地点” flowLinkList: ['农贸市场', '菜市场', '批发市场', '商场', '超市', '小食杂店', '网购', '其他'],
placeRemark1: '', restLinkList1: [
placeRemark2: '', {label: '特大型餐馆', value: '餐馆(特大型餐馆)'},
placeRemark3: '', {label: '大型餐馆', value: '餐馆(大型餐馆)'},
proLinkList: ['原辅料库', '生产线', '半成品库', '成品库待检区', '成品库已检区', '其他'], {label: '中型餐馆', value: '餐馆(中型餐馆)'},
flowLinkList: ['农贸市场', '菜市场', '批发市场', '商场', '超市', '小食杂店', '其他'], {label: '小型餐馆', value: '餐馆(小型餐馆)'},
restLinkList1: [
{label: '特大型餐馆', value: '餐馆(特大型餐馆)'},
{label: '大型餐馆', value: '餐馆(大型餐馆)'},
{label: '中型餐馆', value: '餐馆(中型餐馆)'},
{label: '小型餐馆', value: '餐馆(小型餐馆)'},
], ],
restLinkList2: [ restLinkList2: [
{label: '机关食堂', value: '食堂(机关食堂)'}, {label: '机关食堂', value: '食堂(机关食堂)'},
{label: '学校/托幼食堂', value: '食堂(学校/托幼食堂)'}, {label: '学校/托幼食堂', value: '食堂(学校/托幼食堂)'},
{label: '企事业单位食堂', value: '食堂(企事业单位食堂)'}, {label: '企事业单位食堂', value: '食堂(企事业单位食堂)'},
{label: '建筑工地食堂', value: '食堂(建筑工地食堂)'}, {label: '建筑工地食堂', value: '食堂(建筑工地食堂)'},
], ],
restLinkList3: ['小吃店', '快餐店', '饮品店','集体用餐配送单位', '中央厨房', '其他'], restLinkList3: ['小吃店', '快餐店', '饮品店', '集体用餐配送单位', '中央厨房', '其他'],
id: '', id: '',
} testedType: this.$route.query.testedType,
}, shelfId: this.$route.query.shelfId
computed: { }
areaObj:function(){ },
return this.nonNetTested.testedProvince+this.nonNetTested.testedCity+this.nonNetTested.testedCountry watch: {
'sample.type': function (val) {
if (val !== '' && val !== '其他') {
this.sample.typeRemark = ''
}
},
'sample.pack': function (val) {
if (val !== '' && val !== '其他') {
this.sample.packRemark = ''
}
},
'sample.source': function (val) {
if (val !== '' && val !== '其他') {
this.sample.sourceRemark = ''
}
},
'sample.properties': function (val) {
if (val !== '' && val !== '其他') {
this.sample.propertiesRemark = ''
}
},
'formObj.thirdPartyNature': function (val) {
if (val !== '' && val !== '其他') {
this.formObj.thirdPartyNatureRemark = ''
}
},
storageCondition: function (val) {
if (val !== '' && val !== '其他') {
this.sample.storageConditionRemark = ''
}
},
//抽样地点特殊处理
place: function (val) {
if (val !== '') {
let placeLink = val.split(',')[0]
let place = val.split(',')[1]
if (placeLink === '2') {
if (place === '其他') {
this.placeRemark2Readonly = false
} else {
this.placeRemark2 = ''
this.placeRemark2Readonly = true
}
} else if (placeLink === '3') {
if (place === '其他') {
this.placeRemark3Readonly = false
} else {
this.placeRemark3 = ''
this.placeRemark3Readonly = true
}
}
} else {
this.placeRemark2Readonly = true
this.placeRemark3Readonly = true
}
},
},
computed: {
areaObj: function () {
return this.nonNetTested.testedProvince + this.nonNetTested.testedCity + this.nonNetTested.testedCountry
}
},
mounted() {
this._open()
},
methods: {
_open() {
if (this.$route.query.id) {//编辑
this.id = this.$route.query.id
this._getData()
} else {//添加
this.id = ''
this._getLastTester()
}
},
_companySelect(type) {
switch (type) {
case 'nonNetTested.name':
this.$refs.tested._open()
break
case 'formObj.proName':
this.$refs.producter._open()
break
case 'formObj.testName':
this.$refs.tester._open()
break
}
},
_testerResult(res) {
this.formObj.testName = res.testName ? res.testName : ''
this.formObj.testAddress = res.testAddress ? res.testAddress : ''
this.formObj.testLinkman = res.testLinkman ? res.testLinkman : ''
this.formObj.testTel = res.testTel ? res.testTel : ''
this.formObj.testEmail = res.testEmail ? res.testEmail : ''
this.formObj.testFax = res.testFax ? res.testFax : ''
},
_producterResult(res) {
this.formObj.proName = res.proName ? res.proName : ''
this.formObj.proAddress = res.proAddress ? res.proAddress : ''
this.formObj.proLicense = res.proLicense ? res.proLicense : ''
this.formObj.proTel = res.proTel ? res.proTel : ''
},
_testedResult(res) {
this.nonNetTested.name = res.name ? res.name : ''
this.nonNetTested.testedProvince = res.testedProvince ? res.testedProvince : ''
this.nonNetTested.testedCity = res.testedCity ? res.testedCity : ''
this.nonNetTested.testedCountry = res.testedCountry ? res.testedCountry : ''
this.nonNetTested.address = res.address ? res.address : ''
this.nonNetTested.areaType = res.areaType ? res.areaType : ''
this.nonNetTested.permitType = res.permitType ? res.permitType : ''
this.nonNetTested.permitNum = res.permitNum ? res.permitNum : ''
this.nonNetTested.legalPerson = res.legalPerson ? res.legalPerson : ''
this.nonNetTested.linkman = res.linkman ? res.linkman : ''
this.nonNetTested.license = res.license ? res.license : ''
this.nonNetTested.tel = res.tel ? res.tel : ''
},
//获取最近填写的抽样单位信息
_getLastTester: async function () {
let result = await samplingSummary.lastTester()
if (result) {
this.formObj.testName = result.testName ? result.testName : ''
this.formObj.testAddress = result.testAddress ? result.testAddress : ''
this.formObj.testLinkman = result.testLinkman ? result.testLinkman : ''
this.formObj.testTel = result.testTel ? result.testTel : ''
this.formObj.testEmail = result.testEmail ? result.testEmail : ''
this.formObj.testFax = result.testFax ? result.testFax : ''
}
},
_getData: async function () {
let result = await samplingSummary.getById(this.id)
if (result) {
this._initData(result)
}
},
_initData(result) {
for (let key in this.formObj) {
if (result[key] !== '') {
if (key === 'sandDeadline') {
this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} else {
this.formObj[key] = result[key]
}
}
}
for (let key in this.nonNetTested) {
if (result.nonNetTested[key] !== '') {
if (key === 'placeLink') {
this.place = result.nonNetTested.placeLink + ',' + result.nonNetTested.place
switch (result.nonNetTested.placeLink) {
case '2':
this.placeRemark2 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break
case '3':
this.placeRemark3 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break
} }
}, } else {
mounted() { this.nonNetTested[key] = result.nonNetTested[key]
this._open() }
}, }
methods: { }
_open() { for (let key in this.sample) {
if (result.sample[key] !== '') {
this.id = this.$route.query.id if (key === 'sampleDate') {
this._getData() this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : ''
} else if (key === 'sandDeadline') {
this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : ''
} else if (key === 'storageCondition') {
this.storageCondition = result.sample[key] ? result.sample[key].split(',') : []
this.sample[key] = result.sample[key] ? result.sample[key] : ''
} else {
this.sample[key] = result.sample[key]
}
}
}
this.testedType = result.testedType
this.shelfId = result.shelfId
},
_valParams() {
if (this.formObj.samplingNum === '') {
this.$toast('请输入抽样单编号')
return true
}
if (this.sample.firstClass === '') {
this.$toast('请输入大类')
return true
}
if (this.sample.secondClass === '') {
this.$toast('请输入大亚类')
return true
}
if (this.sample.thirdClass === '') {
this.$toast('请输入次亚类')
return true
}
if (this.sample.fourthClass === '') {
this.$toast('请输入细类')
return true
}
return false
},
_goto() {
this.$router.go(-1)
},
_selectDate(type) {
this.selectDateType = type
this.showDatePicker = true
},
_dateConfirm(date) {
switch (this.selectDateType) {
case 'sample.sampleDate':
this.sample.sampleDate = this.$dateformat(date, 'yyyy-mm-dd')
break
case 'sample.sandDeadline':
this.sample.sandDeadline = this.$dateformat(date, 'yyyy-mm-dd')
break
}
this.showDatePicker = false
},
_areaConfirm(value) {
this.nonNetTested.testedProvince = value[0].name
this.nonNetTested.testedCity = value[1].name
this.nonNetTested.testedCountry = value[2].name
this.showCityPicker = false
},
}, _getSample: async function () {
_getData: async function () { if (this.sample.qrcode && this.id === '') {
let result = await samplingSummary.getById(this.id) let res = await samplingSample.scanSample({qrcode: this.sample.qrcode})
if (result) { if (res) {
for (let key in this.formObj) { this._scanResult(res)
if (result[key]!=='') {
if (key === 'samplingDate') {
this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} else {
this.formObj[key] = result[key]
}
}
}
for(let key in this.nonNetTested){
if(result.nonNetTested[key]!==''){
if (key === 'placeLink') {
this.place = result.nonNetTested.placeLink + ',' + result.nonNetTested.place
switch (result.nonNetTested.placeLink) {
case '1':
this.placeRemark1 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break
case '2':
this.placeRemark2 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break
case '3':
this.placeRemark3 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break
}
} else {
this.nonNetTested[key] = result.nonNetTested[key]
}
}
}
for(let key in this.sample){
if(result.sample[key]!==''){
if (key === 'sampleDate') {
this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : ''
}else if(key==='storageCondition'){
this.storageCondition = result.sample[key].split(',')
this.sample[key] = result.sample[key]
} else {
this.sample[key] = result.sample[key]
}
}
}
this.testedType = result.testedType
this.shelfId = result.shelfId
}
},
_goto(){
this.$router.go(-1)
}
} }
} }
},
}
}
</script> </script>
<style lang="less"> <style lang="less">
@import "../../styles/sampling-list-add.less"; @import "../../styles/sampling-list-add.less";
</style> </style>
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
:close-on-popstate="true" :close-on-popstate="true"
:style="{ height: '70%' }"> :style="{ height: '70%' }">
<div class="popup-cont-btn popup-shelves"> <div class="popup-cont-btn popup-shelves">
<div> <!-- <div>-->
<p>抽样单类型</p> <!-- <p>抽样单类型</p>-->
<van-radio-group v-model="radio" direction="horizontal"> <!-- <van-radio-group v-model="radio" direction="horizontal">-->
<van-radio :name="1">网络</van-radio> <!-- <van-radio :name="1">网络</van-radio>-->
<van-radio :name="0">非网络</van-radio> <!-- <van-radio :name="0">非网络</van-radio>-->
<van-radio :name="2">农产品</van-radio> <!-- <van-radio :name="2">农产品</van-radio>-->
</van-radio-group> <!-- </van-radio-group>-->
</div> <!-- </div>-->
<div> <div>
<p>所属货架</p> <p>所属货架</p>
<van-tree-select <van-tree-select
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
data() { data() {
return { return {
showPopup: false, showPopup: false,
radio: -1, radio: 0,
places: [ places: [
{ {
text: '地点1', text: '地点1',
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
methods: { methods: {
_open(planId) { _open(planId) {
this.showPopup = true this.showPopup = true
this.radio = -1 this.radio = 0
this.activeId = '' this.activeId = ''
this.planId = planId this.planId = planId
this._getShelves() this._getShelves()
......
...@@ -98,6 +98,11 @@ export default { ...@@ -98,6 +98,11 @@ export default {
}, },
_create: async function () { _create: async function () {
if (this.count) { if (this.count) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId}) let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId})
if (result) { if (result) {
this.$toast('生成成功!') this.$toast('生成成功!')
...@@ -142,6 +147,11 @@ export default { ...@@ -142,6 +147,11 @@ export default {
}, },
_locCreate: async function () { _locCreate: async function () {
if (this.locCount) { if (this.locCount) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId}) let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId})
if (result) { if (result) {
this.$toast('生成成功!') this.$toast('生成成功!')
......
...@@ -94,8 +94,14 @@ export default { ...@@ -94,8 +94,14 @@ export default {
}, },
_create: async function () { _create: async function () {
if (this.count) { if (this.count) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId}) let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId})
if (result) { if (result) {
// this.$toast.clear();
this.$toast('生成成功!') this.$toast('生成成功!')
this.userList = result this.userList = result
} }
...@@ -138,8 +144,14 @@ export default { ...@@ -138,8 +144,14 @@ export default {
}, },
_locCreate: async function () { _locCreate: async function () {
if (this.locCount) { if (this.locCount) {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
forbidClick: true,
});
let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId}) let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId})
if (result) { if (result) {
// this.$toast.clear();
this.$toast('生成成功!') this.$toast('生成成功!')
this.locList = result this.locList = result
} }
......
...@@ -17,7 +17,7 @@ export default [ ...@@ -17,7 +17,7 @@ export default [
{path: 'sampling_list_add', component: SamplingListAdd, meta: {customerNavBarTitle: true}}, {path: 'sampling_list_add', component: SamplingListAdd, meta: {customerNavBarTitle: true}},
{path: 'sampling_list_add_agriculture', component: SamplingListAddAgriculture, meta: {customerNavBarTitle: true}}, {path: 'sampling_list_add_agriculture', component: SamplingListAddAgriculture, meta: {customerNavBarTitle: true}},
{path: 'sampling_list_add_net', component: SamplingListAddNet, meta: {customerNavBarTitle: true}}, {path: 'sampling_list_add_net', component: SamplingListAddNet, meta: {customerNavBarTitle: true}},
{path: 'sampling_list_detail', component: SamplingListDetail, meta: {title: '抽样单详情-非网络'}}, {path: 'sampling_list_detail', component: SamplingListDetail, meta: {title: '抽样单详情'}},
{path: 'sampling_list_detail_agriculture', component: SamplingListDetailAgriculture, meta: {title: '抽样单详情-农产品'}}, {path: 'sampling_list_detail_agriculture', component: SamplingListDetailAgriculture, meta: {title: '抽样单详情-农产品'}},
{path: 'sampling_list_detail_net', component: SamplingListDetailNet, meta: {title: '抽样单详情-网络'}}, {path: 'sampling_list_detail_net', component: SamplingListDetailNet, meta: {title: '抽样单详情-网络'}},
{path: 'file', component: File, meta: {title: '附件'}}, {path: 'file', component: File, meta: {title: '附件'}},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment