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({
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="25%"
label-align="center" label-align="center"
name="samplingNum" name="samplingNum"
v-model="formObj.samplingNum" v-model="formObj.samplingNum"
...@@ -13,15 +13,6 @@ ...@@ -13,15 +13,6 @@
:rules="[{ required: true, message: '请填写抽样单编号' }]" :rules="[{ required: true, message: '请填写抽样单编号' }]"
></van-field> ></van-field>
</table-col> </table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.taskNum"
label="No."
></van-field>
</table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
...@@ -42,7 +33,7 @@ ...@@ -42,7 +33,7 @@
<template #input> <template #input>
<van-radio-group v-model="formObj.taskType" direction="horizontal"> <van-radio-group v-model="formObj.taskType" direction="horizontal">
<van-radio :name="item" :key="item" shape="square" v-for="item in taskTypeList"> <van-radio :name="item" :key="item" shape="square" v-for="item in taskTypeList">
{{item}} {{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
...@@ -67,12 +58,29 @@ ...@@ -67,12 +58,29 @@
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
<van-field
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="区域类型">
<template #input>
<van-radio-group 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 <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"
v-model="areaObj" v-model="areaObj"
label="省市区" label="单位地址"
@click="showCityPicker=true" @click="showCityPicker=true"
:columns-placeholder="['请选择', '请选择', '请选择']" :columns-placeholder="['请选择', '请选择', '请选择']"
></van-field> ></van-field>
...@@ -82,82 +90,74 @@ ...@@ -82,82 +90,74 @@
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.address" v-model="nonNetTested.legalPerson"
label="单位地址" label="法人代表"
placeholder="如证照与许可证不一致,以许可证为准"
></van-field> ></van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="50%"
label-align="center" label-align="center"
label="区域类型"> v-model="nonNetTested.sales"
<template #input> label="年销售额(万元)"
<van-radio-group v-model="nonNetTested.areaType" direction="horizontal"> ></van-field>
<van-radio v-for="item in areaTypeList" :key="item" :name="item" shape="square"> </table-col>
{{item}} <table-col>
</van-radio> <van-field
</van-radio-group>
<div style="border-bottom: 1px solid #000">
<van-field :readonly="nonNetTested.areaType!=='其他'"
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.areaTypeRemark" v-model="nonNetTested.license"
label="营业执照号"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
<van-radio-group 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 <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.permitNum" v-model="nonNetTested.linkman"
label="联系人"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
<van-radio-group 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 <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.legalPerson" v-model="nonNetTested.permitNum"
label="法人代表"
></van-field> ></van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.linkman" v-model="nonNetTested.tel"
label="联系人" label="电话"
></van-field> ></van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.license" v-model="nonNetTested.fax"
label="营业执照号/社会信用代码" label="传真"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -165,8 +165,8 @@ ...@@ -165,8 +165,8 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.tel" v-model="nonNetTested.postalCode"
label="联系电话" label="邮编"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
...@@ -182,21 +182,13 @@ ...@@ -182,21 +182,13 @@
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap"> <div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center">生产环节:</div> <div style="align-self: center">生产环节:</div>
<van-radio v-for="item in proLinkList" :key="item" :name="1+','+item" shape="square"> <van-radio v-for="item in proLinkList" :key="item" :name="1+','+item" shape="square">
{{item}} {{ item }}
</van-radio> </van-radio>
<div style="border-bottom: 1px solid #000">
<van-field :readonly="placeRemark1Readonly"
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="placeRemark1"
></van-field>
</div>
</div> </div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap"> <div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center">流通环节:</div> <div style="align-self: center">流通环节:</div>
<van-radio v-for="item in flowLinkList" :key="item" :name="2+','+item" shape="square"> <van-radio v-for="item in flowLinkList" :key="item" :name="2+','+item" shape="square">
{{item}} {{ item }}
</van-radio> </van-radio>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field :readonly="placeRemark2Readonly" <van-field :readonly="placeRemark2Readonly"
...@@ -211,20 +203,20 @@ ...@@ -211,20 +203,20 @@
<div style="align-self: center;">餐饮环节:</div> <div style="align-self: center;">餐饮环节:</div>
<van-radio v-for="item in restLinkList1" :key="item.value" :name="3+','+item.value" <van-radio v-for="item in restLinkList1" :key="item.value" :name="3+','+item.value"
shape="square"> shape="square">
{{item.label}} {{ item.label }}
</van-radio> </van-radio>
</div> </div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap"> <div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;width:72px"></div> <div style="align-self: center;width:72px"></div>
<van-radio v-for="item in restLinkList2" :key="item.value" :name="3+','+item.value" <van-radio v-for="item in restLinkList2" :key="item.value" :name="3+','+item.value"
shape="square"> shape="square">
{{item.label}} {{ item.label }}
</van-radio> </van-radio>
</div> </div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap"> <div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;width:72px"></div> <div style="align-self: center;width:72px"></div>
<van-radio v-for="item in restLinkList3" :key="item.value" :name="3+','+item" <van-radio v-for="item in restLinkList3" :key="item.value" :name="3+','+item"
shape="square">{{item}} shape="square">{{ item }}
</van-radio> </van-radio>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field :readonly="placeRemark3Readonly" <van-field :readonly="placeRemark3Readonly"
...@@ -239,27 +231,6 @@ ...@@ -239,27 +231,6 @@
</van-radio-group> </van-radio-group>
</table-col> </table-col>
</table-row> </table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.samplingDate"
label="抽样日期"
@click="_selectDate('formObj.samplingDate')"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.testMembers"
label="抽样人员"
></van-field>
</table-col>
</table-row>
<table-row flex-none> <table-row flex-none>
<table-col> <table-col>
样品信息 样品信息
...@@ -269,63 +240,25 @@ ...@@ -269,63 +240,25 @@
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.name"
label="样品名称"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="sample.trademark"
label="商标"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="sample.qrcode"
label="条形码"
@blur="_getSample"
></van-field>
<!--<van-field-->
<!--label-class="cus-field-class"-->
<!--label-width="25%"-->
<!--label-align="center"-->
<!--v-model="sample.qrcode"-->
<!--label="条形码"-->
<!--right-icon="scan"-->
<!--@click-right-icon="_scan"-->
<!--&gt;</van-field>-->
</table-col>
</table-row>
<table-row>
<table-col>
<van-field
label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="sample.firstClass" label="样品来源">
label="大类" <template #input>
right-icon="add-o" <van-radio-group v-model="sample.source" direction="horizontal">
@click-right-icon="_classSelect('大类')" <van-radio :name="item" :key="item" shape="square" v-for="item in sourceList">
></van-field> {{ item }}
</table-col> </van-radio>
<table-col> </van-radio-group>
<van-field <div style="border-bottom: 1px solid #000">
<van-field :readonly="sample.source!=='其他'"
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="50%"
label-align="center" label-align="center"
v-model="sample.secondClass" v-model="sample.sourceRemark"
label="亚类"
right-icon="add-o"
@click-right-icon="_classSelect('亚类')"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> <table-row>
...@@ -334,22 +267,23 @@ ...@@ -334,22 +267,23 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="sample.thirdClass" label="样品属性">
label="次亚类" <template #input>
right-icon="add-o" <van-radio-group v-model="sample.properties" direction="horizontal">
@click-right-icon="_classSelect('次亚类')" <van-radio :name="item" :key="item" shape="square"
></van-field> v-for="item in propertiesList">{{ item }}
</table-col> </van-radio>
<table-col> </van-radio-group>
<van-field <div style="border-bottom: 1px solid #000">
<van-field :readonly="sample.properties!=='其他'"
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="50%"
label-align="center" label-align="center"
v-model="sample.fourthClass" v-model="sample.propertiesRemark"
label="细类"
right-icon="add-o"
@click-right-icon="_classSelect('细类')"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> <table-row>
...@@ -361,7 +295,7 @@ ...@@ -361,7 +295,7 @@
<template #input> <template #input>
<van-radio-group v-model="sample.type" direction="horizontal"> <van-radio-group v-model="sample.type" direction="horizontal">
<van-radio :name="item" :key="item" shape="square" v-for="item in sampleTypeList"> <van-radio :name="item" :key="item" shape="square" v-for="item in sampleTypeList">
{{item}} {{ item }}
</van-radio> </van-radio>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field :readonly="sample.type!=='其他'" <van-field :readonly="sample.type!=='其他'"
...@@ -381,53 +315,25 @@ ...@@ -381,53 +315,25 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
label="样品来源"> v-model="sample.name"
<template #input> label="样品名称"
<van-radio-group 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="sample.source!=='其他'"
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.sourceRemark"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
label="样品属性"> v-model="sample.trademark"
<template #input> label="商标"
<van-radio-group 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="sample.properties!=='其他'"
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.propertiesRemark"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
<van-radio-group v-model="sample.dateType" direction="horizontal"> <van-radio-group v-model="sample.dateType" direction="horizontal">
<van-radio v-for="item in dateTypeList" :key="item" :name="item" shape="square"> <van-radio v-for="item in dateTypeList" :key="item" :name="item" shape="square">
{{item}} {{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
</table-col> </table-col>
...@@ -442,17 +348,18 @@ ...@@ -442,17 +348,18 @@
@click="_selectDate('sample.sampleDate')" @click="_selectDate('sample.sampleDate')"
></van-field> ></van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field <van-field
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.standard" v-model="sample.specification"
label="执行标准/技术文档" label="规格型号"
></van-field> ></van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
...@@ -467,8 +374,8 @@ ...@@ -467,8 +374,8 @@
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.specification" v-model="sample.shelfLife"
label="规格型号" label="保质期"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
...@@ -478,17 +385,28 @@ ...@@ -478,17 +385,28 @@
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.standard"
label="执行标准/技术文档"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.qualityGrade" v-model="sample.qualityGrade"
label="质量等级" label="质量等级"
></van-field> ></van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field <van-field
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.shelfLife" v-model="formObj.proLicense"
label="保质期" label="生产许可编号"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -500,24 +418,30 @@ ...@@ -500,24 +418,30 @@
label="单价" label="单价"
></van-field> ></van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field <van-field
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.samplingBase" label="是否进口">
label="抽样基数" <template #input>
></van-field> <van-radio-group v-model="sample.inward" direction="horizontal">
<van-radio v-for="item in trueOrFalseList" :key="item.value" :name="item.value"
shape="square">{{ item.label }}
</van-radio>
</van-radio-group>
</template>
</van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field <van-field
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.quantity" v-model="sample.samplingBase"
label="抽样数量" label="抽样基数/批量"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -525,8 +449,8 @@ ...@@ -525,8 +449,8 @@
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.unit" v-model="sample.quantity"
label="抽样数量单位" label="抽样数量(含备样)"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -545,11 +469,11 @@ ...@@ -545,11 +469,11 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
label="抽样方式"> label="样品形态">
<template #input> <template #input>
<van-radio-group v-model="sample.samplingMethod" direction="horizontal"> <van-radio-group v-model="sample.shape" direction="horizontal">
<van-radio :name="item" v-for="item in samplingMethodList" :key="item" <van-radio v-for="item in shapeList" :name="item" :key="item"
shape="square">{{item}} shape="square">{{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
...@@ -558,67 +482,18 @@ ...@@ -558,67 +482,18 @@
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%"
label-align="center"
label="是否进口">
<template #input>
<van-radio-group v-model="sample.inward" direction="horizontal">
<van-radio v-for="item in trueOrFalseList" :key="item.value" :name="item.value"
shape="square">{{item.label}}
</van-radio>
</van-radio-group>
</template>
</van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.originPlace"
label="原产地"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field
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 v-model="sample.packClass" direction="horizontal"> <van-radio-group v-model="sample.packClass" direction="horizontal">
<van-radio v-for="item in packClassList" :name="item" :key="item" <van-radio v-for="item in packClassList" :name="item" :key="item"
shape="square">{{item}} shape="square">{{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
</table-col> </table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="储存条件">
<template #input>
<van-checkbox-group v-model="storageCondition" direction="horizontal">
<van-checkbox v-for="item in storageConditionList" :name="item" :key="item"
shape="square">{{item}}
</van-checkbox>
</van-checkbox-group>
<div style="border-bottom: 1px solid #000">
<van-field
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-row>
</table-col> </table-col>
</table-row> </table-row>
...@@ -631,19 +506,6 @@ ...@@ -631,19 +506,6 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="formObj.proName"
label="生产者名称"
right-icon="add-o"
@click-right-icon="_companySelect('formObj.proName')"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="formObj.proAddress" v-model="formObj.proAddress"
label="生产者地址" label="生产者地址"
></van-field> ></van-field>
...@@ -655,8 +517,10 @@ ...@@ -655,8 +517,10 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="formObj.proLicense" v-model="formObj.proName"
label="生产许可证号" label="生产者名称"
right-icon="add-o"
@click-right-icon="_companySelect('formObj.proName')"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -672,16 +536,43 @@ ...@@ -672,16 +536,43 @@
</table-col> </table-col>
</table-row> </table-row>
<table-row flex-none> <table-row flex-none>
<table-col>(标称)第三方企业信息</table-col> <table-col>(标称)样品储存条件</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width=""
label-align="center"
label="">
<template #input>
<div style="display: flex">
<van-checkbox-group v-model="storageCondition" direction="horizontal">
<van-checkbox v-for="item in storageConditionList" :name="item" :key="item"
shape="square">{{ item }}
</van-checkbox>
</van-checkbox-group>
<div style="border-bottom: 1px solid #000">
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.storageConditionRemark"
></van-field>
</div>
</div>
</template>
</van-field>
</table-col>
<table-col flex-none> <table-col flex-none>
<table-row> <table-row>
<table-col> <table-col>
<van-field <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="50%"
label-align="center" label-align="center"
v-model="formObj.thirdPartyName" v-model="sample.sandDeadline"
label="企业名称" label="寄送样品截止日期"
@click="_selectDate('sample.sandDeadline')"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
...@@ -689,32 +580,35 @@ ...@@ -689,32 +580,35 @@
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="50%"
label-align="center" label-align="center"
v-model="formObj.thirdPartyAddress" v-model="sample.sandAddress"
label="企业地址" label="寄送样品地址"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> </table-col>
</table-row>
<table-row flex-none>
<table-col>抽样样品包装</table-col>
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width=""
label-align="center" label-align="center"
label="企业性质"> label="">
<template #input> <template #input>
<van-radio-group v-model="formObj.thirdPartyNature" direction="horizontal"> <van-radio-group v-model="sample.pack" direction="horizontal">
<van-radio v-for="item in thirdPartyNatureList" :key="item" :name="item" <van-radio v-for="item in packList" :name="item" :key="item"
shape="square">{{item}} shape="square">{{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field :readonly="formObj.thirdPartyNature!=='其他'" <van-field
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.thirdPartyNatureRemark" v-model="sample.packRemark"
></van-field> ></van-field>
</div> </div>
</template> </template>
...@@ -723,22 +617,17 @@ ...@@ -723,22 +617,17 @@
<table-col> <table-col>
<van-field <van-field
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="50%"
label-align="center"
v-model="formObj.thirdPartyLicense"
label="企业许可证号"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="25%"
label-align="center" label-align="center"
v-model="formObj.thirdPartyTel" label="抽样方式">
label="联系电话" <template #input>
></van-field> <van-radio-group v-model="sample.samplingMethod" direction="horizontal">
</table-col> <van-radio :name="item" v-for="item in samplingMethodList" :key="item"
</table-row> shape="square">{{ item }}
</van-radio>
</van-radio-group>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row flex-none> <table-row flex-none>
...@@ -844,37 +733,31 @@ ...@@ -844,37 +733,31 @@
></van-area> ></van-area>
</van-popup> </van-popup>
<SelectClass ref="class" @on-result-change="_classResult"></SelectClass>
<SelectTester ref="tester" @on-result-change="_testerResult"></SelectTester> <SelectTester ref="tester" @on-result-change="_testerResult"></SelectTester>
<SelectProducter ref="producter" @on-result-change="_producterResult"></SelectProducter> <SelectProducter ref="producter" @on-result-change="_producterResult"></SelectProducter>
<SelectTested ref="tested" @on-result-change="_testedResult"></SelectTested> <SelectTested ref="tested" @on-result-change="_testedResult"></SelectTested>
<ScanBar ref="scan" @on-result-change="_scanResult"></ScanBar>
</div> </div>
</template> </template>
<script> <script>
import SamplingListAddTable from './components/SamplingListAddTable' import SamplingListAddTable from './components/SamplingListAddTable'
import TableRow from './components/TableRow' import TableRow from './components/TableRow'
import TableCol from './components/TableCol' import TableCol from './components/TableCol'
import {samplingSummary, samplingSample} from '../../api' import {samplingSummary, samplingSample} from '../../api'
import {default as areaList} from '../../lib/area' import {default as areaList} from '../../lib/area'
import SelectClass from './components/SelectClass' import SelectTester from './components/SelectTester'
import SelectTester from './components/SelectTester' import SelectProducter from './components/SelectProducter'
import SelectProducter from './components/SelectProducter' import SelectTested from './components/SelectTested'
import SelectTested from './components/SelectTested'
import ScanBar from './components/ScanBar'
export default { export default {
name: "SamplingListAdd", name: "SamplingListAdd",
components: { components: {
"add-table": SamplingListAddTable, "add-table": SamplingListAddTable,
"table-row": TableRow, "table-row": TableRow,
"table-col": TableCol, "table-col": TableCol,
SelectClass,
SelectTester, SelectTester,
SelectProducter, SelectProducter,
SelectTested, SelectTested,
ScanBar
}, },
data() { data() {
return { return {
...@@ -887,22 +770,12 @@ ...@@ -887,22 +770,12 @@
formObj: { formObj: {
samplingNum: '', samplingNum: '',
taskNum: '',
source: '', source: '',
taskType: '', taskType: '',
proName: '',
proAddress: '',
proLicense: '', proLicense: '',
proAddress: '',
proName: '',
proTel: '', proTel: '',
thirdPartyName: '',
thirdPartyAddress: '',
thirdPartyNature: '',
thirdPartyNatureRemark: '',
thirdPartyLicense: '',
thirdPartyTel: '',
testName: '', testName: '',
testAddress: '', testAddress: '',
testLinkman: '', testLinkman: '',
...@@ -910,88 +783,81 @@ ...@@ -910,88 +783,81 @@
testEmail: '', testEmail: '',
testFax: '', testFax: '',
remark: '', remark: '',
samplingDate: '',
testMembers: '',
}, },
nonNetTested: { nonNetTested: {
name: '', name: '',
areaType: '',
testedProvince: '', testedProvince: '',
testedCity: '', testedCity: '',
testedCountry: '', testedCountry: '',
address: '',
areaType: '',
areaTypeRemark: '',
permitType: '',
permitNum: '',
legalPerson: '', legalPerson: '',
linkman: '', sales: '',
license: '', license: '',
linkman: '',
permitType: '',
permitNum: '',
tel: '', tel: '',
fax: '',
postalCode: '',
placeLink: '',//保存时单独赋值 从place字段分离出 placeLink: '',//保存时单独赋值 从place字段分离出
place: '', //保存时单独赋值 从place字段分离出 place: '', //保存时单独赋值 从place字段分离出
placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemark placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemark
}, },
sample: { sample: {
name: '',
trademark: '',
qrcode: '',
firstClass: '',
secondClass: '',
thirdClass: '',
fourthClass: '',
type: '',
typeRemark: '',
source: '', source: '',
sourceRemark: '', sourceRemark: '',
properties: '', properties: '',
propertiesRemark: '', propertiesRemark: '',
type: '',
typeRemark: '',
name: '',
trademark: '',
dateType: '', dateType: '',
sampleDate: '', sampleDate: '',
standard: '',
batchNo: '',
specification: '', specification: '',
qualityGrade: '', batchNo: '',
shelfLife: '', shelfLife: '',
standard: '',
qualityGrade: '',
price: '', price: '',
inward: '',
samplingBase: '', samplingBase: '',
quantity: '', quantity: '',
unit: '',
backupQuanity: '', backupQuanity: '',
samplingMethod: '', shape: '',
inward: '', pack: '',
originPlace: '',
packClass: '', packClass: '',
storageCondition: '', storageCondition: '',
storageConditionRemark: '' storageConditionRemark: '',
sandDeadline: '',
sandAddress: '',
samplingMethod: '',
}, },
taskTypeList: ['监督抽检', '风险监测', '评价性抽检'], taskTypeList: ['监督抽检', '风险监测'],
areaTypeList: ['景点', '城市', '乡镇', '学校周边', '其他'], areaTypeList: ['城市', '乡村', '景点'],
permitTypeList: ['经营许可证号', '生产许可证号'], permitTypeList: ['经营许可证号', '生产许可证号'],
sampleTypeList: ['食用农产品', '工业加工食品', '餐饮加工食品', '食品添加剂', '食品相关产品', '其他',], sampleTypeList: ['食用农产品', '工业加工食品', '餐饮加工食品', '食品添加剂', '食品相关产品', '其他',],
sourceList: ['加工/自制', '委托生产', '外购', '其他'], sourceList: ['加工/自制', '委托生产', '外购', '其他'],
propertiesList: ['普通食品', '特殊食品', '节令食品', '重大活动保障食品', '其他',], propertiesList: ['普通食品', '特殊食品', '节令食品', '重大活动保障食品', '其他',],
dateTypeList: ['生产日期', '购进日期', '加工日期', '检疫日期'], dateTypeList: ['生产日', '加工日', '购进日'],
samplingMethodList: ['无菌抽样', '非无菌抽样'], samplingMethodList: ['无菌抽样', '非无菌抽样'],
trueOrFalseList: [{label: '是', value: 1}, {label: '否', value: 0}], trueOrFalseList: [{label: '是', value: 1}, {label: '否', value: 0}],
packClassList: ['预包装', '非定量包装', '无包装'], shapeList: ['固体', '半固体', '液体', '气体'],
storageConditionList: ['常温', '冷藏', '冷冻', '避光', '密闭', '阴凉', '通风', '干燥', '其他'], packClassList: ['散装', '预包装'],
storageConditionList: ['常温', '冷藏', '冷冻', '避光', '密闭', '其他'],
thirdPartyNatureList: ['委托', '代理', '经销', '进口', '其他'], thirdPartyNatureList: ['委托', '代理', '经销', '进口', '其他'],
packList: ['玻璃瓶', '塑料瓶', '塑料袋', '无菌袋', '其他'],
storageCondition: [], storageCondition: [],
place: '', //1生产环节2流通环节3餐饮环节 值为“环节,地点” place: '', //1生产环节2流通环节3餐饮环节 值为“环节,地点”
placeRemark1: '',
placeRemark2: '', placeRemark2: '',
placeRemark3: '', placeRemark3: '',
placeRemark1Readonly: true,
placeRemark2Readonly: true, placeRemark2Readonly: true,
placeRemark3Readonly: true, placeRemark3Readonly: true,
proLinkList: ['原辅料库', '生产线', '半成品库', '成品库待检区', '成品库已检区', '其他'], proLinkList: ['原辅料库', '生产线', '半成品库', '成品库待检区', '成品库已检区'],
flowLinkList: ['农贸市场', '菜市场', '批发市场', '商场', '超市', '小食杂店', '其他'], flowLinkList: ['农贸市场', '菜市场', '批发市场', '商场', '超市', '小食杂店', '网购', '其他'],
restLinkList1: [ restLinkList1: [
{label: '特大型餐馆', value: '餐馆(特大型餐馆)'}, {label: '特大型餐馆', value: '餐馆(特大型餐馆)'},
{label: '大型餐馆', value: '餐馆(大型餐馆)'}, {label: '大型餐馆', value: '餐馆(大型餐馆)'},
...@@ -1005,7 +871,7 @@ ...@@ -1005,7 +871,7 @@
{label: '企事业单位食堂', value: '食堂(企事业单位食堂)'}, {label: '企事业单位食堂', value: '食堂(企事业单位食堂)'},
{label: '建筑工地食堂', value: '食堂(建筑工地食堂)'}, {label: '建筑工地食堂', value: '食堂(建筑工地食堂)'},
], ],
restLinkList3: ['小吃店', '快餐店', '饮品店','集体用餐配送单位', '中央厨房', '其他'], restLinkList3: ['小吃店', '快餐店', '饮品店', '集体用餐配送单位', '中央厨房', '其他'],
id: '', id: '',
...@@ -1014,15 +880,14 @@ ...@@ -1014,15 +880,14 @@
} }
}, },
watch: { watch: {
//除储存条件 选其他以外的选项备注清空 'sample.type': function (val) {
'nonNetTested.areaType': function (val) {
if (val !== '' && val !== '其他') { if (val !== '' && val !== '其他') {
this.nonNetTested.areaTypeRemark = '' this.sample.typeRemark = ''
} }
}, },
'sample.type': function (val) { 'sample.pack': function (val) {
if (val !== '' && val !== '其他') { if (val !== '' && val !== '其他') {
this.sample.typeRemark = '' this.sample.packRemark = ''
} }
}, },
'sample.source': function (val) { 'sample.source': function (val) {
...@@ -1040,19 +905,17 @@ ...@@ -1040,19 +905,17 @@
this.formObj.thirdPartyNatureRemark = '' this.formObj.thirdPartyNatureRemark = ''
} }
}, },
storageCondition: function (val) {
if (val !== '' && val !== '其他') {
this.sample.storageConditionRemark = ''
}
},
//抽样地点特殊处理 //抽样地点特殊处理
place: function (val) { place: function (val) {
if (val !== '') { if (val !== '') {
let placeLink = val.split(',')[0] let placeLink = val.split(',')[0]
let place = val.split(',')[1] let place = val.split(',')[1]
if (placeLink === '1') { if (placeLink === '2') {
if (place === '其他') {
this.placeRemark1Readonly = false
} else {
this.placeRemark1 = ''
this.placeRemark1Readonly = true
}
} else if (placeLink === '2') {
if (place === '其他') { if (place === '其他') {
this.placeRemark2Readonly = false this.placeRemark2Readonly = false
} else { } else {
...@@ -1068,7 +931,6 @@ ...@@ -1068,7 +931,6 @@
} }
} }
} else { } else {
this.placeRemark1Readonly = true
this.placeRemark2Readonly = true this.placeRemark2Readonly = true
this.placeRemark3Readonly = true this.placeRemark3Readonly = true
} }
...@@ -1080,42 +942,16 @@ ...@@ -1080,42 +942,16 @@
} }
}, },
mounted() { mounted() {
// mui.init({
// beforeback: function () {
// localStorage.removeItem('summary')
// localStorage.removeItem('sample')
// return true
// }
// })
this._open() this._open()
}, },
// beforeDestroy(){
// localStorage.removeItem('summary')
// localStorage.removeItem('sample')
// },
methods: { methods: {
_open() { _open() {
if (this.$route.query.id) {//编辑 if (this.$route.query.id) {//编辑
this.id = this.$route.query.id this.id = this.$route.query.id
// if (localStorage.getItem('summary')) {
// this._initData(JSON.parse(localStorage.getItem('summary')))
// if (localStorage.getItem('sample')) {
// this._scanResult(JSON.parse(localStorage.getItem('sample')))
// }
// } else {
this._getData() this._getData()
// }
} else {//添加 } else {//添加
this.id = '' this.id = ''
// if (localStorage.getItem('summary')) {
// this._initData(JSON.parse(localStorage.getItem('summary')))
// if (localStorage.getItem('sample')) {
// this._scanResult(JSON.parse(localStorage.getItem('sample')))
// }
// } else {
this.formObj.testMembers = this.$global.getUserInfo().realname
this._getLastTester() this._getLastTester()
// }
} }
}, },
_companySelect(type) { _companySelect(type) {
...@@ -1159,76 +995,6 @@ ...@@ -1159,76 +995,6 @@
this.nonNetTested.license = res.license ? res.license : '' this.nonNetTested.license = res.license ? res.license : ''
this.nonNetTested.tel = res.tel ? res.tel : '' this.nonNetTested.tel = res.tel ? res.tel : ''
}, },
_scan() {
//将已经填写过的存起来
localStorage.setItem('summary', JSON.stringify(this._getSaveObj()))
// this.$refs.scan._open()
this.$router.push('/sampling_list/scan_bar')
},
_scanResult(result) {
for (let key in this.sample) {
if (result[key] !== '') {
if (key === 'sampleDate') {
this.sample[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} else if (key === 'storageCondition') {
this.storageCondition = result[key].split(',')
this.sample[key] = result[key]
} else {
this.sample[key] = result[key]
}
}
}
},
_classSelect(type) {
switch (type) {
case '大类':
this.$refs.class._open(0)
break
case '亚类':
if (this.sample.firstClass) {
this.$refs.class._open(1, this.sample.firstClass)
} else {
this.$toast('请先选择大类!')
}
break
case '次亚类':
if (this.sample.secondClass) {
this.$refs.class._open(2, this.sample.secondClass)
} else {
this.$toast('请先选择亚类!')
}
break
case '细类':
if (this.sample.thirdClass) {
this.$refs.class._open(3, this.sample.thirdClass)
} else {
this.$toast('请先选择次亚类!')
}
break
}
},
_classResult(res, level) {
switch (level) {
case 0:
this.sample.firstClass = res
this.sample.secondClass = ''
this.sample.thirdClass = ''
this.sample.fourthClass = ''
break
case 1:
this.sample.secondClass = res
this.sample.thirdClass = ''
this.sample.fourthClass = ''
break
case 2:
this.sample.thirdClass = res
this.sample.fourthClass = ''
break
case 3:
this.sample.fourthClass = res
break
}
},
//获取最近填写的抽样单位信息 //获取最近填写的抽样单位信息
_getLastTester: async function () { _getLastTester: async function () {
let result = await samplingSummary.lastTester() let result = await samplingSummary.lastTester()
...@@ -1250,7 +1016,7 @@ ...@@ -1250,7 +1016,7 @@
_initData(result) { _initData(result) {
for (let key in this.formObj) { for (let key in this.formObj) {
if (result[key] !== '') { if (result[key] !== '') {
if (key === 'samplingDate') { if (key === 'sandDeadline') {
this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : '' this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} else { } else {
this.formObj[key] = result[key] this.formObj[key] = result[key]
...@@ -1262,9 +1028,6 @@ ...@@ -1262,9 +1028,6 @@
if (key === 'placeLink') { if (key === 'placeLink') {
this.place = result.nonNetTested.placeLink + ',' + result.nonNetTested.place this.place = result.nonNetTested.placeLink + ',' + result.nonNetTested.place
switch (result.nonNetTested.placeLink) { switch (result.nonNetTested.placeLink) {
case '1':
this.placeRemark1 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break
case '2': case '2':
this.placeRemark2 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : '' this.placeRemark2 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break break
...@@ -1281,9 +1044,11 @@ ...@@ -1281,9 +1044,11 @@
if (result.sample[key] !== '') { if (result.sample[key] !== '') {
if (key === 'sampleDate') { if (key === 'sampleDate') {
this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : '' 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') { } else if (key === 'storageCondition') {
this.storageCondition = result.sample[key].split(',') this.storageCondition = result.sample[key] ? result.sample[key].split(',') : []
this.sample[key] = result.sample[key] this.sample[key] = result.sample[key] ? result.sample[key] : ''
} else { } else {
this.sample[key] = result.sample[key] this.sample[key] = result.sample[key]
} }
...@@ -1333,9 +1098,6 @@ ...@@ -1333,9 +1098,6 @@
data.nonNetTested.placeLink = this.place.split(',')[0] data.nonNetTested.placeLink = this.place.split(',')[0]
data.nonNetTested.place = this.place.split(',')[1] data.nonNetTested.place = this.place.split(',')[1]
switch (data.nonNetTested.placeLink) { switch (data.nonNetTested.placeLink) {
case '1':
data.nonNetTested.placeRemark = this.placeRemark1
break
case '2': case '2':
data.nonNetTested.placeRemark = this.placeRemark2 data.nonNetTested.placeRemark = this.placeRemark2
break break
...@@ -1376,8 +1138,8 @@ ...@@ -1376,8 +1138,8 @@
case 'sample.sampleDate': case 'sample.sampleDate':
this.sample.sampleDate = this.$dateformat(date, 'yyyy-mm-dd') this.sample.sampleDate = this.$dateformat(date, 'yyyy-mm-dd')
break break
case 'formObj.samplingDate': case 'sample.sandDeadline':
this.formObj.samplingDate = this.$dateformat(date, 'yyyy-mm-dd') this.sample.sandDeadline = this.$dateformat(date, 'yyyy-mm-dd')
break break
} }
this.showDatePicker = false this.showDatePicker = false
...@@ -1390,7 +1152,7 @@ ...@@ -1390,7 +1152,7 @@
}, },
_getSample: async function () { _getSample: async function () {
if (this.sample.qrcode&&this.id==='') { if (this.sample.qrcode && this.id === '') {
let res = await samplingSample.scanSample({qrcode: this.sample.qrcode}) let res = await samplingSample.scanSample({qrcode: this.sample.qrcode})
if (res) { if (res) {
this._scanResult(res) this._scanResult(res)
...@@ -1398,10 +1160,10 @@ ...@@ -1398,10 +1160,10 @@
} }
}, },
} }
} }
</script> </script>
<style lang="less"> <style lang="less">
@import "../../styles/sampling-list-add.less"; @import "../../styles/sampling-list-add.less";
</style> </style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<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"
name="samplingNum" name="samplingNum"
v-model="formObj.samplingNum" v-model="formObj.samplingNum"
...@@ -13,15 +13,6 @@ ...@@ -13,15 +13,6 @@
:rules="[{ required: true, message: '请填写抽样单编号' }]" :rules="[{ required: true, message: '请填写抽样单编号' }]"
></van-field> ></van-field>
</table-col> </table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.taskNum"
label="No."
></van-field>
</table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
...@@ -42,7 +33,7 @@ ...@@ -42,7 +33,7 @@
<template #input> <template #input>
<van-radio-group disabled v-model="formObj.taskType" direction="horizontal"> <van-radio-group disabled v-model="formObj.taskType" direction="horizontal">
<van-radio :name="item" :key="item" shape="square" v-for="item in taskTypeList"> <van-radio :name="item" :key="item" shape="square" v-for="item in taskTypeList">
{{item}} {{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
...@@ -62,6 +53,8 @@ ...@@ -62,6 +53,8 @@
label-align="center" label-align="center"
v-model="nonNetTested.name" v-model="nonNetTested.name"
label="单位名称" label="单位名称"
right-icon="add-o"
@click-right-icon="_companySelect('nonNetTested.name')"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -69,9 +62,15 @@ ...@@ -69,9 +62,15 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="areaObj" label="区域类型">
label="省市区" <template #input>
></van-field> <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-col>
</table-row> </table-row>
<table-row> <table-row>
...@@ -80,9 +79,10 @@ ...@@ -80,9 +79,10 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="nonNetTested.address" v-model="areaObj"
label="单位地址" label="单位地址"
placeholder="如证照与许可证不一致,以许可证为准" @click="showCityPicker=true"
:columns-placeholder="['请选择', '请选择', '请选择']"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
...@@ -90,59 +90,54 @@ ...@@ -90,59 +90,54 @@
<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="50%"
label-align="center" label-align="center"
label="区域类型"> v-model="nonNetTested.legalPerson"
<template #input> label="法人代表"
<van-radio-group disabled v-model="nonNetTested.areaType" direction="horizontal"> ></van-field>
<van-radio v-for="item in areaTypeList" :key="item" :name="item" shape="square"> </table-col>
{{item}} <table-col>
</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="nonNetTested.areaTypeRemark" v-model="nonNetTested.sales"
label="年销售额(万元)"
></van-field> ></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>
<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="nonNetTested.permitNum" v-model="nonNetTested.license"
label="营业执照号"
></van-field> ></van-field>
</table-col> </table-col>
</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="nonNetTested.legalPerson" v-model="nonNetTested.linkman"
label="法人代表" label="联系人"
></van-field> ></van-field>
</table-col> </table-col>
<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 <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="nonNetTested.linkman" v-model="nonNetTested.permitNum"
label="联系人"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
...@@ -152,8 +147,8 @@ ...@@ -152,8 +147,8 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.license" v-model="nonNetTested.tel"
label="营业执照号/社会信用代码" label="电话"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -161,8 +156,17 @@ ...@@ -161,8 +156,17 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
v-model="nonNetTested.tel" v-model="nonNetTested.fax"
label="联系电话" 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> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
...@@ -178,21 +182,13 @@ ...@@ -178,21 +182,13 @@
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap"> <div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center">生产环节:</div> <div style="align-self: center">生产环节:</div>
<van-radio v-for="item in proLinkList" :key="item" :name="1+','+item" shape="square"> <van-radio v-for="item in proLinkList" :key="item" :name="1+','+item" shape="square">
{{item}} {{ item }}
</van-radio> </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>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap"> <div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center">流通环节:</div> <div style="align-self: center">流通环节:</div>
<van-radio v-for="item in flowLinkList" :key="item" :name="2+','+item" shape="square"> <van-radio v-for="item in flowLinkList" :key="item" :name="2+','+item" shape="square">
{{item}} {{ item }}
</van-radio> </van-radio>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field readonly <van-field readonly
...@@ -207,20 +203,20 @@ ...@@ -207,20 +203,20 @@
<div style="align-self: center;">餐饮环节:</div> <div style="align-self: center;">餐饮环节:</div>
<van-radio v-for="item in restLinkList1" :key="item.value" :name="3+','+item.value" <van-radio v-for="item in restLinkList1" :key="item.value" :name="3+','+item.value"
shape="square"> shape="square">
{{item.label}} {{ item.label }}
</van-radio> </van-radio>
</div> </div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap"> <div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;width:72px"></div> <div style="align-self: center;width:72px"></div>
<van-radio v-for="item in restLinkList2" :key="item.value" :name="3+','+item.value" <van-radio v-for="item in restLinkList2" :key="item.value" :name="3+','+item.value"
shape="square"> shape="square">
{{item.label}} {{ item.label }}
</van-radio> </van-radio>
</div> </div>
<div style="display: flex;padding: 5px 10px;flex-wrap: wrap"> <div style="display: flex;padding: 5px 10px;flex-wrap: wrap">
<div style="align-self: center;width:72px"></div> <div style="align-self: center;width:72px"></div>
<van-radio v-for="item in restLinkList3" :key="item.value" :name="3+','+item" <van-radio v-for="item in restLinkList3" :key="item.value" :name="3+','+item"
shape="square">{{item}} shape="square">{{ item }}
</van-radio> </van-radio>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field readonly <van-field readonly
...@@ -233,27 +229,6 @@ ...@@ -233,27 +229,6 @@
</div> </div>
</div> </div>
</van-radio-group> </van-radio-group>
</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.samplingDate"
label="抽样日期"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="formObj.testMembers"
label="抽样人员"
></van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row flex-none> <table-row flex-none>
...@@ -265,49 +240,25 @@ ...@@ -265,49 +240,25 @@
<table-col> <table-col>
<van-field readonly <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.name"
label="样品名称"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.trademark"
label="商标"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.qrcode"
label="条形码"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="sample.firstClass" label="样品来源">
label="大类" <template #input>
></van-field> <van-radio-group disabled v-model="sample.source" direction="horizontal">
</table-col> <van-radio :name="item" :key="item" shape="square" v-for="item in sourceList">
<table-col> {{ 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="25%" label-width="50%"
label-align="center" label-align="center"
v-model="sample.secondClass" v-model="sample.sourceRemark"
label="亚类"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> <table-row>
...@@ -316,18 +267,23 @@ ...@@ -316,18 +267,23 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="sample.thirdClass" label="样品属性">
label="次亚类" <template #input>
></van-field> <van-radio-group disabled v-model="sample.properties" direction="horizontal">
</table-col> <van-radio :name="item" :key="item" shape="square"
<table-col> 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="25%" label-width="50%"
label-align="center" label-align="center"
v-model="sample.fourthClass" v-model="sample.propertiesRemark"
label="细类"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> <table-row>
...@@ -339,7 +295,7 @@ ...@@ -339,7 +295,7 @@
<template #input> <template #input>
<van-radio-group disabled v-model="sample.type" direction="horizontal"> <van-radio-group disabled v-model="sample.type" direction="horizontal">
<van-radio :name="item" :key="item" shape="square" v-for="item in sampleTypeList"> <van-radio :name="item" :key="item" shape="square" v-for="item in sampleTypeList">
{{item}} {{ item }}
</van-radio> </van-radio>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
<van-field readonly <van-field readonly
...@@ -359,59 +315,30 @@ ...@@ -359,59 +315,30 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
label="样品来源"> v-model="sample.name"
<template #input> label="样品名称"
<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
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.sourceRemark"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
<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="样品属性"> v-model="sample.trademark"
<template #input> label="商标"
<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
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.propertiesRemark"
></van-field> ></van-field>
</div>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
<van-radio-group disabled v-model="sample.dateType" direction="horizontal"> <van-radio-group disabled v-model="sample.dateType" direction="horizontal">
<van-radio v-for="item in dateTypeList" :key="item" :name="item" shape="square"> <van-radio v-for="item in dateTypeList" :key="item" :name="item" shape="square">
{{item}} {{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
</table-col> </table-col>
<table-col> <table-col>
<van-field <van-field readonly
readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
...@@ -419,17 +346,18 @@ ...@@ -419,17 +346,18 @@
label="" label=""
></van-field> ></van-field>
</table-col> </table-col>
</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.standard" v-model="sample.specification"
label="执行标准/技术文档" label="规格型号"
></van-field> ></van-field>
</table-col> </table-col>
</table-row>
<table-row>
<table-col> <table-col>
<van-field readonly <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
...@@ -444,8 +372,8 @@ ...@@ -444,8 +372,8 @@
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.specification" v-model="sample.shelfLife"
label="规格型号" label="保质期"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
...@@ -455,17 +383,28 @@ ...@@ -455,17 +383,28 @@
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.standard"
label="执行标准/技术文档"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.qualityGrade" v-model="sample.qualityGrade"
label="质量等级" label="质量等级"
></van-field> ></van-field>
</table-col> </table-col>
</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.shelfLife" v-model="formObj.proLicense"
label="保质期" label="生产许可编号"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -477,24 +416,30 @@ ...@@ -477,24 +416,30 @@
label="单价" label="单价"
></van-field> ></van-field>
</table-col> </table-col>
</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.samplingBase" label="是否进口">
label="抽样基数" <template #input>
></van-field> <van-radio-group disabled v-model="sample.inward" direction="horizontal">
<van-radio v-for="item in trueOrFalseList" :key="item.value" :name="item.value"
shape="square">{{ item.label }}
</van-radio>
</van-radio-group>
</template>
</van-field>
</table-col> </table-col>
</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.quantity" v-model="sample.samplingBase"
label="抽样数量" label="抽样基数/批量"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -502,8 +447,8 @@ ...@@ -502,8 +447,8 @@
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.unit" v-model="sample.quantity"
label="抽样数量单位" label="抽样数量(含备样)"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -522,26 +467,11 @@ ...@@ -522,26 +467,11 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%" label-width="50%"
label-align="center" label-align="center"
label="抽样方式"> label="样品形态">
<template #input>
<van-radio-group disabled v-model="sample.samplingMethod" direction="horizontal">
<van-radio :name="item" v-for="item in samplingMethodList" :key="item"
shape="square">{{item}}
</van-radio>
</van-radio-group>
</template>
</van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
label="是否进口">
<template #input> <template #input>
<van-radio-group disabled v-model="sample.inward" direction="horizontal"> <van-radio-group disabled v-model="sample.shape" direction="horizontal">
<van-radio v-for="item in trueOrFalseList" :key="item.value" :name="item.value" <van-radio v-for="item in shapeList" :name="item" :key="item"
shape="square">{{item.label}} shape="square">{{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
...@@ -550,52 +480,18 @@ ...@@ -550,52 +480,18 @@
<table-col> <table-col>
<van-field readonly <van-field readonly
label-class="cus-field-class" label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.originPlace"
label="原产地"
></van-field>
</table-col>
</table-row>
<table-row>
<table-col>
<van-field readonly
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.packClass" direction="horizontal">
<van-radio v-for="item in packClassList" :name="item" :key="item" <van-radio v-for="item in packClassList" :name="item" :key="item"
shape="square">{{item}} shape="square">{{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
</table-col> </table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
label="储存条件">
<template #input>
<van-checkbox-group disabled v-model="storageCondition" direction="horizontal">
<van-checkbox v-for="item in storageConditionList" :name="item" :key="item"
shape="square">{{item}}
</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-row>
</table-col> </table-col>
</table-row> </table-row>
...@@ -608,17 +504,6 @@ ...@@ -608,17 +504,6 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" 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" v-model="formObj.proAddress"
label="生产者地址" label="生产者地址"
></van-field> ></van-field>
...@@ -630,8 +515,10 @@ ...@@ -630,8 +515,10 @@
label-class="cus-field-class" label-class="cus-field-class"
label-width="25%" label-width="25%"
label-align="center" label-align="center"
v-model="formObj.proLicense" v-model="formObj.proName"
label="生产许可证号" label="生产者名称"
right-icon="add-o"
@click-right-icon="_companySelect('formObj.proName')"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -647,16 +534,41 @@ ...@@ -647,16 +534,41 @@
</table-col> </table-col>
</table-row> </table-row>
<table-row flex-none> <table-row flex-none>
<table-col>(标称)第三方企业信息</table-col> <table-col>(标称)样品储存条件</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width=""
label-align="center"
label="">
<template #input>
<div style="display: flex">
<van-checkbox-group disabled v-model="storageCondition" direction="horizontal">
<van-checkbox v-for="item in storageConditionList" :name="item" :key="item"
shape="square">{{ item }}
</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>
</div>
</template>
</van-field>
</table-col>
<table-col flex-none> <table-col flex-none>
<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="25%" label-width="50%"
label-align="center" label-align="center"
v-model="formObj.thirdPartyName" v-model="sample.sandDeadline"
label="企业名称" label="寄送样品截止日期"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
...@@ -664,24 +576,27 @@ ...@@ -664,24 +576,27 @@
<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="50%"
label-align="center" label-align="center"
v-model="formObj.thirdPartyAddress" v-model="sample.sandAddress"
label="企业地址" label="寄送样品地址"
></van-field> ></van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row> </table-col>
</table-row>
<table-row flex-none>
<table-col>抽样样品包装</table-col>
<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=""
label-align="center" label-align="center"
label="企业性质"> label="">
<template #input> <template #input>
<van-radio-group disabled v-model="formObj.thirdPartyNature" direction="horizontal"> <van-radio-group disabled v-model="sample.pack" direction="horizontal">
<van-radio v-for="item in thirdPartyNatureList" :key="item" :name="item" <van-radio v-for="item in packList" :name="item" :key="item"
shape="square">{{item}} shape="square">{{ item }}
</van-radio> </van-radio>
</van-radio-group> </van-radio-group>
<div style="border-bottom: 1px solid #000"> <div style="border-bottom: 1px solid #000">
...@@ -689,7 +604,7 @@ ...@@ -689,7 +604,7 @@
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.thirdPartyNatureRemark" v-model="sample.packRemark"
></van-field> ></van-field>
</div> </div>
</template> </template>
...@@ -698,22 +613,17 @@ ...@@ -698,22 +613,17 @@
<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="50%"
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" label-align="center"
v-model="formObj.thirdPartyTel" label="抽样方式">
label="联系电话" <template #input>
></van-field> <van-radio-group disabled v-model="sample.samplingMethod" direction="horizontal">
</table-col> <van-radio :name="item" v-for="item in samplingMethodList" :key="item"
</table-row> shape="square">{{ item }}
</van-radio>
</van-radio-group>
</template>
</van-field>
</table-col> </table-col>
</table-row> </table-row>
<table-row flex-none> <table-row flex-none>
...@@ -727,6 +637,8 @@ ...@@ -727,6 +637,8 @@
label-align="center" label-align="center"
v-model="formObj.testName" v-model="formObj.testName"
label="单位名称" label="单位名称"
right-icon="add-o"
@click-right-icon="_companySelect('formObj.testName')"
></van-field> ></van-field>
</table-col> </table-col>
<table-col> <table-col>
...@@ -796,126 +708,152 @@ ...@@ -796,126 +708,152 @@
<div class="bottom-btn"> <div class="bottom-btn">
<van-button block type="info" @click="_goto">返回</van-button> <van-button block type="info" @click="_goto">返回</van-button>
</div> </div>
<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>
<van-popup v-model="showCityPicker" position="bottom"
:safe-area-inset-bottom="true"
:close-on-popstate="true">
<van-area title="省市区"
:area-list="areaList"
@confirm="_areaConfirm"
@cancel="showCityPicker=false"
></van-area>
</van-popup>
<SelectTester ref="tester" @on-result-change="_testerResult"></SelectTester>
<SelectProducter ref="producter" @on-result-change="_producterResult"></SelectProducter>
<SelectTested ref="tested" @on-result-change="_testedResult"></SelectTested>
</div> </div>
</template> </template>
<script> <script>
import SamplingListAddTable from './components/SamplingListAddTable' import SamplingListAddTable from './components/SamplingListAddTable'
import TableRow from './components/TableRow' import TableRow from './components/TableRow'
import TableCol from './components/TableCol' import TableCol from './components/TableCol'
import {samplingSummary} from '../../api' import {samplingSummary, samplingSample} from '../../api'
import {default as areaList} from '../../lib/area'
import SelectTester from './components/SelectTester'
import SelectProducter from './components/SelectProducter'
import SelectTested from './components/SelectTested'
export default { export default {
name: "SamplingListAdd", name: "SamplingListAdd",
components: { components: {
"add-table": SamplingListAddTable, "add-table": SamplingListAddTable,
"table-row": TableRow, "table-row": TableRow,
"table-col": TableCol "table-col": TableCol,
SelectTester,
SelectProducter,
SelectTested,
}, },
data() { data() {
return { return {
showDatePicker: false,
currentDate: new Date(),
selectDateType: '',
showCityPicker: false,
areaList: areaList,
formObj: { formObj: {
samplingNum: '', samplingNum: '',
taskNum: '',
source: '', source: '',
taskType: '', taskType: '',
proName: '',
proAddress: '',
proLicense: '', proLicense: '',
proAddress: '',
proName: '',
proTel: '', proTel: '',
thirdPartyName: '',
thirdPartyAddress: '',
thirdPartyNature: '',
thirdPartyNatureRemark: '',
thirdPartyLicense: '',
thirdPartyTel: '',
testName: '', testName: '',
testAddress: '', testAddress: '',
testLinkman: '', testLinkman: '',
testTel: '', testTel: '',
testEmail: '',
testFax: '', testFax: '',
remark: '', remark: '',
samplingDate:'',
testMembers:'',
testEmail:'',
}, },
nonNetTested: { nonNetTested: {
name: '', name: '',
testedProvince:'',
testedCity:'',
testedCountry:'',
address: '',
areaType: '', areaType: '',
areaTypeRemark: '', testedProvince: '',
permitType: '', testedCity: '',
permitNum: '', testedCountry: '',
legalPerson: '', legalPerson: '',
linkman: '', sales: '',
license: '', license: '',
linkman: '',
permitType: '',
permitNum: '',
tel: '', tel: '',
fax: '',
postalCode: '',
placeLink: '',//保存时单独赋值 从place字段分离出 placeLink: '',//保存时单独赋值 从place字段分离出
place: '', //保存时单独赋值 从place字段分离出 place: '', //保存时单独赋值 从place字段分离出
placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemarkN placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemark
}, },
sample: { sample: {
name:'',
trademark: '',
qrcode: '',
firstClass:'',
secondClass:'',
thirdClass:'',
fourthClass:'',
type: '',
typeRemark: '',
source: '', source: '',
sourceRemark: '', sourceRemark: '',
properties: '', properties: '',
propertiesRemark: '', propertiesRemark: '',
type: '',
typeRemark: '',
name: '',
trademark: '',
dateType: '', dateType: '',
sampleDate:'', sampleDate: '',
standard: '',
batchNo: '',
specification: '', specification: '',
qualityGrade: '', batchNo: '',
shelfLife: '', shelfLife: '',
standard: '',
qualityGrade: '',
price: '', price: '',
inward: '',
samplingBase: '', samplingBase: '',
quantity: '', quantity: '',
unit:'',
backupQuanity: '', backupQuanity: '',
samplingMethod: '', shape: '',
inward: '', pack: '',
originPlace: '',
packClass: '', packClass: '',
storageCondition: [], storageCondition: '',
storageConditionRemark: '' storageConditionRemark: '',
sandDeadline: '',
sandAddress: '',
samplingMethod: '',
}, },
taskTypeList: ['监督抽检', '风险监测', '评价性抽检'], taskTypeList: ['监督抽检', '风险监测'],
areaTypeList: ['景点', '城市', '乡镇', '学校周边', '其他'], areaTypeList: ['城市', '乡村', '景点'],
permitTypeList: ['经营许可证号', '生产许可证号'], permitTypeList: ['经营许可证号', '生产许可证号'],
sampleTypeList: ['食用农产品', '工业加工食品', '餐饮加工食品', '食品添加剂', '食品相关产品', '其他',], sampleTypeList: ['食用农产品', '工业加工食品', '餐饮加工食品', '食品添加剂', '食品相关产品', '其他',],
sourceList: ['加工/自制', '委托生产', '外购', '其他'], sourceList: ['加工/自制', '委托生产', '外购', '其他'],
propertiesList: ['普通食品', '特殊食品', '节令食品', '重大活动保障食品', '其他',], propertiesList: ['普通食品', '特殊食品', '节令食品', '重大活动保障食品', '其他',],
dateTypeList: ['生产日期', '购进日期', '加工日期', '检疫日期'], dateTypeList: ['生产日', '加工日', '购进日'],
samplingMethodList: ['无菌抽样', '非无菌抽样'], samplingMethodList: ['无菌抽样', '非无菌抽样'],
trueOrFalseList: [{label: '是', value: 1}, {label: '否', value: 0}], trueOrFalseList: [{label: '是', value: 1}, {label: '否', value: 0}],
packClassList: ['预包装', '非定量包装', '无包装'], shapeList: ['固体', '半固体', '液体', '气体'],
storageConditionList: ['常温', '冷藏', '冷冻', '避光', '密闭', '阴凉', '通风', '干燥', '其他'], packClassList: ['散装', '预包装'],
storageConditionList: ['常温', '冷藏', '冷冻', '避光', '密闭', '其他'],
thirdPartyNatureList: ['委托', '代理', '经销', '进口', '其他'], thirdPartyNatureList: ['委托', '代理', '经销', '进口', '其他'],
packList: ['玻璃瓶', '塑料瓶', '塑料袋', '无菌袋', '其他'],
storageCondition: [],
storageCondition:[],
place: '', //1生产环节2流通环节3餐饮环节 值为“环节,地点” place: '', //1生产环节2流通环节3餐饮环节 值为“环节,地点”
placeRemark1: '',
placeRemark2: '', placeRemark2: '',
placeRemark3: '', placeRemark3: '',
proLinkList: ['原辅料库', '生产线', '半成品库', '成品库待检区', '成品库已检区', '其他'],
flowLinkList: ['农贸市场', '菜市场', '批发市场', '商场', '超市', '小食杂店', '其他'], placeRemark2Readonly: true,
placeRemark3Readonly: true,
proLinkList: ['原辅料库', '生产线', '半成品库', '成品库待检区', '成品库已检区'],
flowLinkList: ['农贸市场', '菜市场', '批发市场', '商场', '超市', '小食杂店', '网购', '其他'],
restLinkList1: [ restLinkList1: [
{label: '特大型餐馆', value: '餐馆(特大型餐馆)'}, {label: '特大型餐馆', value: '餐馆(特大型餐馆)'},
{label: '大型餐馆', value: '餐馆(大型餐馆)'}, {label: '大型餐馆', value: '餐馆(大型餐馆)'},
...@@ -929,15 +867,74 @@ ...@@ -929,15 +867,74 @@
{label: '企事业单位食堂', value: '食堂(企事业单位食堂)'}, {label: '企事业单位食堂', value: '食堂(企事业单位食堂)'},
{label: '建筑工地食堂', value: '食堂(建筑工地食堂)'}, {label: '建筑工地食堂', value: '食堂(建筑工地食堂)'},
], ],
restLinkList3: ['小吃店', '快餐店', '饮品店','集体用餐配送单位', '中央厨房', '其他'], restLinkList3: ['小吃店', '快餐店', '饮品店', '集体用餐配送单位', '中央厨房', '其他'],
id: '', id: '',
testedType: this.$route.query.testedType,
shelfId: this.$route.query.shelfId
}
},
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: { computed: {
areaObj:function(){ areaObj: function () {
return this.nonNetTested.testedProvince+this.nonNetTested.testedCity+this.nonNetTested.testedCountry return this.nonNetTested.testedProvince + this.nonNetTested.testedCity + this.nonNetTested.testedCountry
} }
}, },
mounted() { mounted() {
...@@ -945,31 +942,88 @@ ...@@ -945,31 +942,88 @@
}, },
methods: { methods: {
_open() { _open() {
if (this.$route.query.id) {//编辑
this.id = this.$route.query.id this.id = this.$route.query.id
this._getData() 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 () { _getData: async function () {
let result = await samplingSummary.getById(this.id) let result = await samplingSummary.getById(this.id)
if (result) { if (result) {
this._initData(result)
}
},
_initData(result) {
for (let key in this.formObj) { for (let key in this.formObj) {
if (result[key]!=='') { if (result[key] !== '') {
if (key === 'samplingDate') { if (key === 'sandDeadline') {
this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : '' this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} else { } else {
this.formObj[key] = result[key] this.formObj[key] = result[key]
} }
} }
} }
for(let key in this.nonNetTested){ for (let key in this.nonNetTested) {
if(result.nonNetTested[key]!==''){ if (result.nonNetTested[key] !== '') {
if (key === 'placeLink') { if (key === 'placeLink') {
this.place = result.nonNetTested.placeLink + ',' + result.nonNetTested.place this.place = result.nonNetTested.placeLink + ',' + result.nonNetTested.place
switch (result.nonNetTested.placeLink) { switch (result.nonNetTested.placeLink) {
case '1':
this.placeRemark1 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break
case '2': case '2':
this.placeRemark2 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : '' this.placeRemark2 = result.nonNetTested.placeRemark ? result.nonNetTested.placeRemark : ''
break break
...@@ -982,13 +1036,15 @@ ...@@ -982,13 +1036,15 @@
} }
} }
} }
for(let key in this.sample){ for (let key in this.sample) {
if(result.sample[key]!==''){ if (result.sample[key] !== '') {
if (key === 'sampleDate') { if (key === 'sampleDate') {
this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : '' this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : ''
}else if(key==='storageCondition'){ } else if (key === 'sandDeadline') {
this.storageCondition = result.sample[key].split(',') this.sample[key] = result.sample[key] ? this.$dateformat(result.sample[key], 'yyyy-mm-dd') : ''
this.sample[key] = result.sample[key] } else if (key === 'storageCondition') {
this.storageCondition = result.sample[key] ? result.sample[key].split(',') : []
this.sample[key] = result.sample[key] ? result.sample[key] : ''
} else { } else {
this.sample[key] = result.sample[key] this.sample[key] = result.sample[key]
} }
...@@ -996,16 +1052,68 @@ ...@@ -996,16 +1052,68 @@
} }
this.testedType = result.testedType this.testedType = result.testedType
this.shelfId = result.shelfId 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(){ _goto() {
this.$router.go(-1) 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 () {
if (this.sample.qrcode && this.id === '') {
let res = await samplingSample.scanSample({qrcode: this.sample.qrcode})
if (res) {
this._scanResult(res)
} }
} }
},
} }
}
</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