Commit aafc7fed by zhuxiaomei

添加的新字段

parent 62b63137
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// 对外暴露全局常量及函数 // 对外暴露全局常量及函数
export default { export default {
//localStorage //localStorage
setLogin: function (user) { setUserInfo: function (user) {
localStorage.setItem('fLoginUser', JSON.stringify(user)); localStorage.setItem('fLoginUser', JSON.stringify(user));
}, },
//clear //clear
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
localStorage.removeItem('fLoginUser'); localStorage.removeItem('fLoginUser');
localStorage.removeItem('accessToken'); localStorage.removeItem('accessToken');
}, },
getLogin: function () { getUserInfo: function () {
return JSON.parse(localStorage.getItem('fLoginUser')); return JSON.parse(localStorage.getItem('fLoginUser'));
}, },
//token //token
......
<template>
<div>
<van-field
readonly
v-model="dateValue"
label="省市区"
placeholder="点击选择省市区"
@click="showPicker = true"
></van-field>
<van-field
readonly
clickable
label="城市"
:value="value"
placeholder="选择城市"
@click="showPicker = true"
></van-field>
<van-popup v-model="showPicker" round position="bottom">
<van-picker
show-toolbar
:columns="columns"
@cancel="showPicker = false"
@confirm="onConfirm"
></van-picker>
</van-popup>
</div>
</template>
<script>
/**
* 该组件不可用 请自行修改
*/
export default {
name: "CascadeCity"
}
</script>
<style scoped>
</style>
<template>
<div class="field-box">
<div class="label">
<span>抽样单编号</span>
</div>
<div class="value">
<input class="van-field__control cus-input-class">
</div>
</div>
</template>
<script>
/**
*自定义 Field
*/
export default {
name: "FieldCustomer"
}
</script>
<style lang="less" scoped>
.field-box {
width: 100%;
height: 100%;
display: flex;
.label {
width: 50%;
display: flex;
vertical-align: middle;
align-items: center;
justify-content: center;
}
.value {
flex: 1;
vertical-align: middle;
}
.cus-input-class {
height: 100%;
padding-left: 12px;
}
}
</style>
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
/** /**
* 全局的配置 * 全局的配置
* @type {{getLogin, logout, baseURL, setToken, setLogin, getToken, version}} * @type
*/ */
Vue.prototype.$global = global Vue.prototype.$global = global
}, },
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
console.log('_getUserInfo') console.log('_getUserInfo')
let user = await sysUser.getUserInfo(); let user = await sysUser.getUserInfo();
if (user) { if (user) {
this.$global.setLogin(user); this.$global.setUserInfo(user);
this.$router.replace('/home'); this.$router.replace('/home');
//todo 清空路由 报错问题 需要降低vue-router版本 //todo 清空路由 报错问题 需要降低vue-router版本
// this.$navigation.cleanRoutes(); // this.$navigation.cleanRoutes();
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
//重新获取用户信息 //重新获取用户信息
let user = await sysUser.getUserInfo(); let user = await sysUser.getUserInfo();
if (user) { if (user) {
this.$global.setLogin(user); this.$global.setUserInfo(user);
this.userInfo = user; this.userInfo = user;
this.id = user.id; this.id = user.id;
} }
......
...@@ -64,6 +64,16 @@ ...@@ -64,6 +64,16 @@
label="单位名称" label="单位名称"
></van-field> ></van-field>
</table-col> </table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="areaObj"
label="省市区"
@click="showCityPicker=true"
></van-field>
</table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
...@@ -224,7 +234,27 @@ ...@@ -224,7 +234,27 @@
</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="抽样日期"
@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-col>
</table-row> </table-row>
<table-row flex-none> <table-row flex-none>
...@@ -474,6 +504,15 @@ ...@@ -474,6 +504,15 @@
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"
label="抽样数量单位"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.backupQuanity" v-model="sample.backupQuanity"
label="备样数量" label="备样数量"
></van-field> ></van-field>
...@@ -706,7 +745,7 @@ ...@@ -706,7 +745,7 @@
<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.testLinkman" v-model="formObj.testLinkman"
label="联系人" label="联系人"
...@@ -715,16 +754,27 @@ ...@@ -715,16 +754,27 @@
<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.testTel" v-model="formObj.testTel"
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="25%" label-width="50%"
label-align="center"
v-model="formObj.testEmail"
label="邮箱"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center" label-align="center"
v-model="formObj.testFax" v-model="formObj.testFax"
label="传真" label="传真"
...@@ -748,16 +798,26 @@ ...@@ -748,16 +798,26 @@
<div class="bottom-btn"> <div class="bottom-btn">
<van-button block type="info" @click="_ok">保存</van-button> <van-button block type="info" @click="_ok">保存</van-button>
</div> </div>
<van-popup v-model="showPicker" position="bottom" <van-popup v-model="showDatePicker" position="bottom"
:safe-area-inset-bottom="true" :safe-area-inset-bottom="true"
:close-on-popstate="true"> :close-on-popstate="true">
<van-datetime-picker <van-datetime-picker
type="date" type="date"
v-model="currentDate" v-model="currentDate"
@confirm="_dateOnConfirm" @confirm="_dateConfirm"
@cancel="showPicker = false" @cancel="showDatePicker = false"
></van-datetime-picker> ></van-datetime-picker>
</van-popup> </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>
</div> </div>
</template> </template>
...@@ -766,6 +826,7 @@ ...@@ -766,6 +826,7 @@
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} from '../../api'
import {default as areaList} from '../../lib/area'
export default { export default {
name: "SamplingListAdd", name: "SamplingListAdd",
...@@ -776,9 +837,13 @@ ...@@ -776,9 +837,13 @@
}, },
data() { data() {
return { return {
showPicker: false, showDatePicker: false,
currentDate: new Date(), currentDate: new Date(),
selectDateType: '', selectDateType: '',
showCityPicker: false,
areaList:areaList,
formObj: { formObj: {
samplingNum: '', samplingNum: '',
taskNum: '', taskNum: '',
...@@ -802,10 +867,17 @@ ...@@ -802,10 +867,17 @@
testLinkman: '', testLinkman: '',
testTel: '', testTel: '',
testFax: '', testFax: '',
remark: '' remark: '',
samplingDate: '',
testMembers: '',
testEmail: '',
}, },
nonNetTested: { nonNetTested: {
name: '', name: '',
testedProvince: '',
testedCity: '',
testedCountry: '',
address: '', address: '',
areaType: '', areaType: '',
areaTypeRemark: '', areaTypeRemark: '',
...@@ -818,7 +890,7 @@ ...@@ -818,7 +890,7 @@
placeLink: '',//保存时单独赋值 从place字段分离出 placeLink: '',//保存时单独赋值 从place字段分离出
place: '', //保存时单独赋值 从place字段分离出 place: '', //保存时单独赋值 从place字段分离出
placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemarkN placeRemark: '' //保存时单独赋值 根据环节取对应的placeRemark
}, },
sample: { sample: {
name: '', name: '',
...@@ -844,6 +916,7 @@ ...@@ -844,6 +916,7 @@
price: '', price: '',
samplingBase: '', samplingBase: '',
quantity: '', quantity: '',
unit: '',
backupQuanity: '', backupQuanity: '',
samplingMethod: '', samplingMethod: '',
inward: '', inward: '',
...@@ -894,17 +967,22 @@ ...@@ -894,17 +967,22 @@
shelfId: this.$route.query.shelfId shelfId: this.$route.query.shelfId
} }
}, },
computed: {
areaObj:function(){
return this.nonNetTested.testedProvince+this.nonNetTested.testedCity+this.nonNetTested.testedCountry
}
},
mounted() { mounted() {
this._open() this._open()
}, },
methods: { methods: {
_open() { _open() {
console.log(this.$route.query.id, 'this.$route.query.id')
if (this.$route.query.id) { if (this.$route.query.id) {
this.id = this.$route.query.id this.id = this.$route.query.id
this._getData() this._getData()
} else { } else {
this.id = '' this.id = ''
this.formObj.testMembers = this.$global.getUserInfo().realname
} }
}, },
_getData: async function () { _getData: async function () {
...@@ -912,9 +990,13 @@ ...@@ -912,9 +990,13 @@
if (result) { if (result) {
for (let key in this.formObj) { for (let key in this.formObj) {
if (result[key]) { if (result[key]) {
if (key === 'samplingDate') {
this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} 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]) {
this.nonNetTested[key] = result.nonNetTested[key] this.nonNetTested[key] = result.nonNetTested[key]
...@@ -924,7 +1006,7 @@ ...@@ -924,7 +1006,7 @@
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 === 'storageCondition') {
this.storageCondition = result.sample[key].split(',') this.storageCondition = result.sample[key].split(',')
this.sample[key] = result.sample[key] this.sample[key] = result.sample[key]
} else { } else {
...@@ -1006,12 +1088,25 @@ ...@@ -1006,12 +1088,25 @@
}, },
_selectDate(type) { _selectDate(type) {
this.selectDateType = type this.selectDateType = type
this.showPicker = true this.showDatePicker = true
}, },
_dateOnConfirm(date) { _dateConfirm(date) {
switch (this.selectDateType) {
case 'sample.sampleDate':
this.sample.sampleDate = this.$dateformat(date, 'yyyy-mm-dd') this.sample.sampleDate = this.$dateformat(date, 'yyyy-mm-dd')
this.showPicker = false break
case 'formObj.samplingDate':
this.formObj.samplingDate = 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
},
} }
} }
</script> </script>
......
...@@ -130,6 +130,16 @@ ...@@ -130,6 +130,16 @@
label="单位名称" label="单位名称"
></van-field> ></van-field>
</table-col> </table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="areaObj"
label="省市区"
@click="showCityPicker=true"
></van-field>
</table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
...@@ -223,6 +233,27 @@ ...@@ -223,6 +233,27 @@
</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>
样品信息 样品信息
...@@ -449,6 +480,15 @@ ...@@ -449,6 +480,15 @@
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"
label="抽样数量单位"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.backupQuanity" v-model="sample.backupQuanity"
label="备样数量" label="备样数量"
></van-field> ></van-field>
...@@ -701,7 +741,7 @@ ...@@ -701,7 +741,7 @@
<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.testLinkman" v-model="formObj.testLinkman"
label="联系人" label="联系人"
...@@ -710,16 +750,27 @@ ...@@ -710,16 +750,27 @@
<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.testTel" v-model="formObj.testTel"
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="25%" label-width="50%"
label-align="center"
v-model="formObj.testEmail"
label="邮箱"
></van-field>
</table-col>
<table-col>
<van-field
label-class="cus-field-class"
label-width="50%"
label-align="center" label-align="center"
v-model="formObj.testFax" v-model="formObj.testFax"
label="传真" label="传真"
...@@ -744,16 +795,27 @@ ...@@ -744,16 +795,27 @@
<van-button block type="info" @click="_ok">保存</van-button> <van-button block type="info" @click="_ok">保存</van-button>
</div> </div>
<van-popup v-model="showPicker" position="bottom" <van-popup v-model="showDatePicker" position="bottom"
:safe-area-inset-bottom="true" :safe-area-inset-bottom="true"
:close-on-popstate="true"> :close-on-popstate="true">
<van-datetime-picker <van-datetime-picker
type="date" type="date"
v-model="currentDate" v-model="currentDate"
@confirm="_dateOnConfirm" @confirm="_dateConfirm"
@cancel="showPicker = false" @cancel="showDatePicker = false"
></van-datetime-picker> ></van-datetime-picker>
</van-popup> </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>
</div> </div>
</template> </template>
...@@ -761,8 +823,8 @@ ...@@ -761,8 +823,8 @@
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} from '../../api'
import {default as areaList} from '../../lib/area'
export default { export default {
name: "SamplingListAddNet", name: "SamplingListAddNet",
...@@ -773,9 +835,13 @@ ...@@ -773,9 +835,13 @@
}, },
data() { data() {
return { return {
showPicker: false, showDatePicker: false,
currentDate: new Date(), currentDate: new Date(),
selectDateType: '', selectDateType: '',
showCityPicker: false,
areaList:areaList,
formObj: { formObj: {
samplingNum: '', samplingNum: '',
taskNum: '', taskNum: '',
...@@ -799,7 +865,12 @@ ...@@ -799,7 +865,12 @@
testLinkman: '', testLinkman: '',
testTel: '', testTel: '',
testFax: '', testFax: '',
remark: '' remark: '',
samplingDate: '',
testMembers: '',
testEmail: '',
}, },
netTested: { netTested: {
plantformName: '', plantformName: '',
...@@ -809,6 +880,9 @@ ...@@ -809,6 +880,9 @@
plantformAddress: '', plantformAddress: '',
legalPerson: '', legalPerson: '',
name: '', name: '',
testedProvince: '',
testedCity: '',
testedCountry: '',
address: '', address: '',
estore: '', estore: '',
sampleSite: '', sampleSite: '',
...@@ -843,6 +917,7 @@ ...@@ -843,6 +917,7 @@
qualityGrade: '', qualityGrade: '',
specification: '', specification: '',
quantity: '', quantity: '',
unit: '',
backupQuanity: '', backupQuanity: '',
samplingMethod: '', samplingMethod: '',
qrcode: '', qrcode: '',
...@@ -873,6 +948,11 @@ ...@@ -873,6 +948,11 @@
shelfId: this.$route.query.shelfId shelfId: this.$route.query.shelfId
} }
}, },
computed: {
areaObj:function(){
return this.netTested.testedProvince+this.netTested.testedCity+this.netTested.testedCountry
}
},
mounted() { mounted() {
this._open() this._open()
}, },
...@@ -883,6 +963,7 @@ ...@@ -883,6 +963,7 @@
this._getData() this._getData()
} else { } else {
this.id = '' this.id = ''
this.formObj.testMembers = this.$global.getUserInfo().realname
} }
}, },
_getData: async function () { _getData: async function () {
...@@ -890,9 +971,13 @@ ...@@ -890,9 +971,13 @@
if (result) { if (result) {
for (let key in this.formObj) { for (let key in this.formObj) {
if (result[key]) { if (result[key]) {
if (key === 'samplingDate') {
this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} else {
this.formObj[key] = result[key] this.formObj[key] = result[key]
} }
} }
}
for (let key in this.netTested) { for (let key in this.netTested) {
if (result.netTested[key]) { if (result.netTested[key]) {
this.netTested[key] = result.netTested[key] this.netTested[key] = result.netTested[key]
...@@ -902,7 +987,7 @@ ...@@ -902,7 +987,7 @@
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 === 'storageCondition') {
this.storageCondition = result.sample[key].split(',') this.storageCondition = result.sample[key].split(',')
this.sample[key] = result.sample[key] this.sample[key] = result.sample[key]
} else { } else {
...@@ -973,16 +1058,25 @@ ...@@ -973,16 +1058,25 @@
_selectDate(type) { _selectDate(type) {
console.log(type, 'type') console.log(type, 'type')
this.selectDateType = type this.selectDateType = type
this.showPicker = true this.showDatePicker = true
}, },
_dateOnConfirm(date) { _dateConfirm(date) {
switch (this.selectDateType) { switch (this.selectDateType) {
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':
this.formObj.samplingDate = this.$dateformat(date, 'yyyy-mm-dd')
break
} }
this.showPicker = false this.showDatePicker = false
} },
_areaConfirm(value) {
this.netTested.testedProvince = value[0].name
this.netTested.testedCity = value[1].name
this.netTested.testedCountry = value[2].name
this.showCityPicker = false
},
} }
} }
</script> </script>
......
...@@ -64,6 +64,15 @@ ...@@ -64,6 +64,15 @@
label="单位名称" label="单位名称"
></van-field> ></van-field>
</table-col> </table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="areaObj"
label="省市区"
></van-field>
</table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
...@@ -227,6 +236,26 @@ ...@@ -227,6 +236,26 @@
</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="抽样日期"
></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-row>
<table-row flex-none> <table-row flex-none>
<table-col> <table-col>
样品信息 样品信息
...@@ -473,6 +502,15 @@ ...@@ -473,6 +502,15 @@
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"
label="抽样数量单位"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.backupQuanity" v-model="sample.backupQuanity"
label="备样数量" label="备样数量"
></van-field> ></van-field>
...@@ -705,7 +743,7 @@ ...@@ -705,7 +743,7 @@
<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.testLinkman" v-model="formObj.testLinkman"
label="联系人" label="联系人"
...@@ -714,16 +752,27 @@ ...@@ -714,16 +752,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.testTel" v-model="formObj.testTel"
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="25%" 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" label-align="center"
v-model="formObj.testFax" v-model="formObj.testFax"
label="传真" label="传真"
...@@ -788,10 +837,17 @@ ...@@ -788,10 +837,17 @@
testLinkman: '', testLinkman: '',
testTel: '', testTel: '',
testFax: '', testFax: '',
remark: '' remark: '',
samplingDate:'',
testMembers:'',
testEmail:'',
}, },
nonNetTested: { nonNetTested: {
name: '', name: '',
testedProvince:'',
testedCity:'',
testedCountry:'',
address: '', address: '',
areaType: '', areaType: '',
areaTypeRemark: '', areaTypeRemark: '',
...@@ -830,6 +886,7 @@ ...@@ -830,6 +886,7 @@
price: '', price: '',
samplingBase: '', samplingBase: '',
quantity: '', quantity: '',
unit:'',
backupQuanity: '', backupQuanity: '',
samplingMethod: '', samplingMethod: '',
inward: '', inward: '',
...@@ -878,6 +935,11 @@ ...@@ -878,6 +935,11 @@
id: '', id: '',
} }
}, },
computed: {
areaObj:function(){
return this.nonNetTested.testedProvince+this.nonNetTested.testedCity+this.nonNetTested.testedCountry
}
},
mounted() { mounted() {
this._open() this._open()
}, },
...@@ -893,12 +955,16 @@ ...@@ -893,12 +955,16 @@
if (result) { if (result) {
for (let key in this.formObj) { for (let key in this.formObj) {
if (result[key]) { if (result[key]) {
if (key === 'samplingDate') {
this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} else {
this.formObj[key] = result[key] this.formObj[key] = result[key]
} }
} }
for(let key in this.netTested){ }
if(result.netTested[key]){ for(let key in this.nonNetTested){
this.netTested[key] = result.netTested[key] if(result.nonNetTested[key]){
this.nonNetTested[key] = result.nonNetTested[key]
} }
} }
for(let key in this.sample){ for(let key in this.sample){
......
...@@ -130,6 +130,15 @@ ...@@ -130,6 +130,15 @@
label="单位名称" label="单位名称"
></van-field> ></van-field>
</table-col> </table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="25%"
label-align="center"
v-model="areaObj"
label="省市区"
></van-field>
</table-col>
</table-row> </table-row>
<table-row> <table-row>
<table-col> <table-col>
...@@ -223,6 +232,26 @@ ...@@ -223,6 +232,26 @@
</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="抽样日期"
></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-row>
<table-row flex-none> <table-row flex-none>
<table-col> <table-col>
样品信息 样品信息
...@@ -448,6 +477,15 @@ ...@@ -448,6 +477,15 @@
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"
label="抽样数量单位"
></van-field>
</table-col>
<table-col>
<van-field readonly
label-class="cus-field-class"
label-width="50%"
label-align="center"
v-model="sample.backupQuanity" v-model="sample.backupQuanity"
label="备样数量" label="备样数量"
></van-field> ></van-field>
...@@ -700,7 +738,7 @@ ...@@ -700,7 +738,7 @@
<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.testLinkman" v-model="formObj.testLinkman"
label="联系人" label="联系人"
...@@ -709,16 +747,29 @@ ...@@ -709,16 +747,29 @@
<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.testTel" v-model="formObj.testTel"
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="25%" 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" label-align="center"
v-model="formObj.testFax" v-model="formObj.testFax"
label="传真" label="传真"
...@@ -784,7 +835,11 @@ ...@@ -784,7 +835,11 @@
testLinkman: '', testLinkman: '',
testTel: '', testTel: '',
testFax: '', testFax: '',
remark: '' remark: '',
samplingDate:'',
testMembers:'',
testEmail:'',
}, },
netTested: { netTested: {
plantformName: '', plantformName: '',
...@@ -794,6 +849,9 @@ ...@@ -794,6 +849,9 @@
plantformAddress: '', plantformAddress: '',
legalPerson: '', legalPerson: '',
name: '', name: '',
testedProvince:'',
testedCity:'',
testedCountry:'',
address: '', address: '',
estore: '', estore: '',
sampleSite: '', sampleSite: '',
...@@ -828,6 +886,7 @@ ...@@ -828,6 +886,7 @@
qualityGrade: '', qualityGrade: '',
specification: '', specification: '',
quantity: '', quantity: '',
unit:'',
backupQuanity: '', backupQuanity: '',
samplingMethod: '', samplingMethod: '',
qrcode: '', qrcode: '',
...@@ -856,6 +915,11 @@ ...@@ -856,6 +915,11 @@
id: '', id: '',
} }
}, },
computed: {
areaObj:function(){
return this.netTested.testedProvince+this.netTested.testedCity+this.netTested.testedCountry
}
},
mounted() { mounted() {
this._open() this._open()
}, },
...@@ -869,9 +933,13 @@ ...@@ -869,9 +933,13 @@
if (result) { if (result) {
for (let key in this.formObj) { for (let key in this.formObj) {
if (result[key]) { if (result[key]) {
if (key === 'samplingDate') {
this.formObj[key] = result[key] ? this.$dateformat(result[key], 'yyyy-mm-dd') : ''
} else {
this.formObj[key] = result[key] this.formObj[key] = result[key]
} }
} }
}
for (let key in this.netTested) { for (let key in this.netTested) {
if (result.netTested[key]) { if (result.netTested[key]) {
this.netTested[key] = result.netTested[key] this.netTested[key] = result.netTested[key]
......
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