|
@@ -275,6 +275,27 @@
|
|
|
</view>
|
|
|
</u-form-item>
|
|
|
</view>
|
|
|
+ <u-form-item
|
|
|
+ v-if="item.inputType == 4"
|
|
|
+ :key="index"
|
|
|
+ :label="item.fieldName"
|
|
|
+ :required="item.required"
|
|
|
+ :label-width="auto"
|
|
|
+ :prop="item.required ? item.fieldKey : ''"
|
|
|
+ label-position="top"
|
|
|
+ >
|
|
|
+ <text style="color: #007AFF;position: absolute;top: 20rpx;left: 180rpx;text-decoration: underline;" @click="downDocx(item.url)">点击下载</text>
|
|
|
+ <view class="dis_stys"><text style="color: #999999;">下载承诺书进行填写并签名盖章后上传(≤2M)</text></view>
|
|
|
+ <image v-if="!form[item.fieldKey]" style="width: 169rpx; height: 169rpx;" @click="getChast" src="@/static/info_4.png"></image>
|
|
|
+ <view class="quzw" v-if="form[item.fieldKey]">
|
|
|
+ <view v-if="form[item.fieldKey].split('.').splice(-1)[0] == 'docx' || form[item.fieldKey].split('.').splice(-1)[0] == 'doc'" class="borsrs">
|
|
|
+ <image src="@/static/icon/jy_icon.png" style="width: 168rpx; height: 168rpx;"></image>
|
|
|
+ <text>{{ titleName }}</text>
|
|
|
+ </view>
|
|
|
+ <image v-else :src="form[item.fieldKey]" style="width: 100%; height: 100%;" mode="aspectFit" @click="seePhotos(form[item.fieldKey])"></image>
|
|
|
+ <u-icon name="close-circle-fill" color="red" size="44" class="optionsAbs" @click="clearWord"></u-icon>
|
|
|
+ </view>
|
|
|
+ </u-form-item>
|
|
|
</template>
|
|
|
</u-form>
|
|
|
</view>
|
|
@@ -301,6 +322,8 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+
|
|
|
+ <u-action-sheet :list="list" v-model="showTableDown" @click="clickIndex"></u-action-sheet>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -311,6 +334,15 @@ import Handwriting from '@/common/signature.js';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ list: [
|
|
|
+ {
|
|
|
+ text: '上传图片'
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // text: '上传文件'
|
|
|
+ // }
|
|
|
+ ],
|
|
|
+ showTableDown: false,
|
|
|
gradeId:0,
|
|
|
errorType: ['message'],
|
|
|
agreementModal:true,
|
|
@@ -339,13 +371,15 @@ export default {
|
|
|
recent_photos: '',
|
|
|
idcard_face_photo: '',
|
|
|
idcard_national_photo: '',
|
|
|
- commitment_electr_signature: ''
|
|
|
+ commitment_electr_signature: '',
|
|
|
+ commitment_seal: ''
|
|
|
},
|
|
|
lineColor: 'black',
|
|
|
slideValue: 50,
|
|
|
handwriting: '',
|
|
|
goodsId: null,
|
|
|
listData: [], //页面数据
|
|
|
+ ast:[],
|
|
|
fileList1: [], //个人近照
|
|
|
fileList2: [], //人像
|
|
|
fileList3: [], //国徽
|
|
@@ -506,6 +540,13 @@ export default {
|
|
|
message: '请签写承诺书电子签',
|
|
|
trigger: ['change', 'blur']
|
|
|
}
|
|
|
+ ],
|
|
|
+ commitment_seal: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请上传承诺书盖章',
|
|
|
+ trigger: ['change', 'blur']
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
apply_post_disabled:false,
|
|
@@ -554,6 +595,103 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ clickIndex(inds){
|
|
|
+ if(inds === 0){
|
|
|
+ this.uploadImgs()
|
|
|
+ }
|
|
|
+ if(inds === 1){
|
|
|
+ this.uploadFieds()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getChast(){
|
|
|
+ this.showTableDown = true;
|
|
|
+ },
|
|
|
+ seePhotos(url) {
|
|
|
+ uni.previewImage({
|
|
|
+ urls: [url]
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async downDocx(url) {
|
|
|
+ let self = this;
|
|
|
+ let data = JSON.parse(JSON.stringify(this.form));
|
|
|
+ var ast = this.listData.some(item => {
|
|
|
+ return item.fieldKey === 'commitment_electr_signature';
|
|
|
+ });
|
|
|
+ if (ast) {
|
|
|
+ await this.subCanvas();
|
|
|
+ }
|
|
|
+ if (data['commitment_electr_signature']) {
|
|
|
+ data.commitment_electr_signature = await this.$method.uploadFile(data.commitment_electr_signature, 0);
|
|
|
+ }
|
|
|
+ console.log(444)
|
|
|
+ let arsty = {};
|
|
|
+ for (let k in data) {
|
|
|
+ for (let j in self.copyData) {
|
|
|
+ if (k === j) {
|
|
|
+ if (self.copyData[j].value === data[k]) {
|
|
|
+ arsty[k] = {
|
|
|
+ fieldKey: k,
|
|
|
+ value: data[k],
|
|
|
+ fieldName: (function() {
|
|
|
+ for (let i = 0; i < self.listData.length; i++) {
|
|
|
+ if (self.listData[i].fieldKey == k) {
|
|
|
+ return self.listData[i].fieldName;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })(),
|
|
|
+ status: 0
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ arsty[k] = {
|
|
|
+ fieldKey: k,
|
|
|
+ value: data[k],
|
|
|
+ fieldName: (function() {
|
|
|
+ for (let i = 0; i < self.listData.length; i++) {
|
|
|
+ if (self.listData[i].fieldKey == k) {
|
|
|
+ return self.listData[i].fieldName;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })(),
|
|
|
+ status: 1
|
|
|
+ };
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ this.$api.baseProfileStampV2AddWord({ goodsId: this.goodsId,keyValue:JSON.stringify(arsty) }).then(res => {
|
|
|
+ uni.downloadFile({
|
|
|
+ url: this.$method.splitImgHost(res.data.msg),
|
|
|
+ success: result => {
|
|
|
+ if (result.statusCode === 200) {
|
|
|
+ const filePath = result.tempFilePath
|
|
|
+ console.log(this.$method.splitImgHost(res.data.msg));
|
|
|
+ this.$method.showToast('下载成功');
|
|
|
+ uni.saveImageToPhotosAlbum({
|
|
|
+ filePath: filePath,
|
|
|
+ success: function (errMsg) {
|
|
|
+ uni.showToast({
|
|
|
+ mask: true,
|
|
|
+ title: '保存成功'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ fail:(errMsg)=>{
|
|
|
+ uni.showToast({
|
|
|
+ mask: true,
|
|
|
+ title: '保存失败'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ complete:(errMsg)=>{
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
getGoodsDetail() {
|
|
|
return new Promise(resolve => {
|
|
|
|
|
@@ -571,6 +709,54 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ uploadImgs(){
|
|
|
+ var self = this
|
|
|
+ uni.chooseImage({
|
|
|
+ count: 1, //默认9
|
|
|
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
+ success: function (res) {
|
|
|
+ if (res.tempFiles[0].size > 2097152) {
|
|
|
+ self.$method.showToast('上传图片不得大于2M');
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ var type = res.tempFiles[0].path.split('.').splice(-1);
|
|
|
+ if (type[0] != 'jpg' && type[0] != 'png' && type[0] != 'jpeg') {
|
|
|
+ self.$method.showToast('请上传图片格式');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ self.$set(self.form, 'commitment_seal', res.tempFiles[0].path);
|
|
|
+ self.$nextTick(function() {
|
|
|
+ this.resultForm();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ uploadFieds() {
|
|
|
+ var self = this;
|
|
|
+ wx.chooseMessageFile({
|
|
|
+ count: 1,
|
|
|
+ size: 2097152,
|
|
|
+ type: 'file',
|
|
|
+ success(res) {
|
|
|
+ if (res.tempFiles[0].size > 2097152) {
|
|
|
+ self.$method.showToast('上传文件不得大于2M');
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ var type = res.tempFiles[0].path.split('.').splice(-1);
|
|
|
+ if (type[0] != 'jpg' && type[0] != 'png' && type[0] != 'jpeg' && type[0] != 'docx' && type[0] != 'doc') {
|
|
|
+ self.$method.showToast('请上传word文档或图片');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ self.titleName = res.tempFiles[0].name;
|
|
|
+ self.$set(self.form, 'commitment_seal', res.tempFiles[0].path);
|
|
|
+ self.$nextTick(function() {
|
|
|
+ this.resultForm();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
agree() {
|
|
|
this.agreementModal = false;
|
|
|
setTimeout(() => {
|
|
@@ -618,17 +804,17 @@ export default {
|
|
|
this.veryIdCard = resData.data.data.IdNum
|
|
|
this.veryIdName = resData.data.data.IdName
|
|
|
|
|
|
- if(this.form.idcard) {
|
|
|
- if(this.form.idcard != this.veryIdCard) {
|
|
|
- uni.showModal({
|
|
|
- title:'提示',
|
|
|
- content:'输入的身份证号和身份证人像面照片身份证号不匹配',
|
|
|
- showCancel:false,
|
|
|
- })
|
|
|
- this.isUploading = false;
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
+ // if(this.form.idcard) {
|
|
|
+ // if(this.form.idcard != this.veryIdCard) {
|
|
|
+ // uni.showModal({
|
|
|
+ // title:'提示',
|
|
|
+ // content:'输入的身份证号和身份证人像面照片身份证号不匹配',
|
|
|
+ // showCancel:false,
|
|
|
+ // })
|
|
|
+ // this.isUploading = false;
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
uni.downloadFile({
|
|
|
url: this.$method.splitImgHost(this.form.recent_photos),
|
|
@@ -904,6 +1090,9 @@ export default {
|
|
|
if (data['commitment_electr_signature']) {
|
|
|
data.commitment_electr_signature = await this.$method.uploadFile(data.commitment_electr_signature, 0);
|
|
|
}
|
|
|
+ if (data['commitment_seal']) {
|
|
|
+ data.commitment_seal = await this.$method.uploadFile(data.commitment_seal, 0);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
this.uploadDatas(data);
|
|
@@ -1125,8 +1314,9 @@ export default {
|
|
|
var self = this;
|
|
|
this.$api.getbaseprofiletpId(this.goodsId).then(res => {
|
|
|
self.listData = JSON.parse(res.data.data.keyValue);
|
|
|
-
|
|
|
-
|
|
|
+ var ast = JSON.parse(res.data.data.keyValue2);
|
|
|
+ self.listData = [...self.listData,...ast]
|
|
|
+ console.log(self.listData,'listData')
|
|
|
self.listData.forEach(item => {
|
|
|
if(item.fieldKey == "idcard") {
|
|
|
this.form.idcard = this.userInfo.idCard;
|
|
@@ -1201,7 +1391,9 @@ export default {
|
|
|
self.remark = result.data.data.text;
|
|
|
self.remarkStatus = true;
|
|
|
self.id = result.data.data.id;
|
|
|
+ console.log(result.data.data,'result.data.data')
|
|
|
var arrays = JSON.parse(result.data.data.keyValue);
|
|
|
+ // var arrays1 = JSON.parse(result.data.data.keyValue2);
|
|
|
self.copyData = JSON.parse(JSON.stringify(arrays));
|
|
|
for (let k in arrays) {
|
|
|
if (k === 'sex') {
|