|
@@ -57,7 +57,8 @@
|
|
|
<input
|
|
|
type="text"
|
|
|
placeholder="请选择"
|
|
|
- readonly
|
|
|
+ @click="takeshow"
|
|
|
+ disabled
|
|
|
v-model="company.zcsj"
|
|
|
/>
|
|
|
</li>
|
|
@@ -175,13 +176,12 @@
|
|
|
</li>
|
|
|
<li class="titleLi titleLiUploader">
|
|
|
<van-uploader
|
|
|
- v-model="fileList"
|
|
|
- multiple
|
|
|
- max-count="1"
|
|
|
- :after-read="afterRead"
|
|
|
- :before-delete="beforeDelete"
|
|
|
- >
|
|
|
- </van-uploader>
|
|
|
+ :max-count="1"
|
|
|
+ @delete="beforeDelete"
|
|
|
+ :file-list="fileList"
|
|
|
+ @after-read="afterRead"
|
|
|
+ :show-upload="true"
|
|
|
+ />
|
|
|
</li>
|
|
|
<li class="titleLi titleLiLast">
|
|
|
荣誉信息(限6张):
|
|
@@ -197,12 +197,19 @@
|
|
|
/>
|
|
|
</li>
|
|
|
<li class="titleLi titleLiUploader2">
|
|
|
+<!-- <van-uploader-->
|
|
|
+<!-- v-model="fileList2"-->
|
|
|
+<!-- multiple-->
|
|
|
+<!-- max-count="6"-->
|
|
|
+<!-- :after-read="afterRead2"-->
|
|
|
+<!-- :before-delete="beforeDelete2"-->
|
|
|
+<!-- />-->
|
|
|
<van-uploader
|
|
|
- v-model="fileList2"
|
|
|
- multiple
|
|
|
- max-count="6"
|
|
|
- :after-read="afterRead2"
|
|
|
- :before-delete="beforeDelete2"
|
|
|
+ :max-count="6"
|
|
|
+ @delete="beforeDelete2"
|
|
|
+ :file-list="fileList2"
|
|
|
+ @after-read="afterRead2"
|
|
|
+ :show-upload="true"
|
|
|
/>
|
|
|
</li>
|
|
|
<li class="titleLi titleLiLast">
|
|
@@ -211,20 +218,20 @@
|
|
|
<li class="titleLi titleLiLast titleLiUploader">
|
|
|
<div>
|
|
|
<van-uploader
|
|
|
- v-model="fileList3"
|
|
|
- multiple
|
|
|
+ :file-list="fileList3"
|
|
|
max-count="1"
|
|
|
- :after-read="afterRead3"
|
|
|
- :before-delete="beforeDelete3"
|
|
|
+ @after-read="afterRead3"
|
|
|
+ @delete="beforeDelete3"
|
|
|
+ :show-upload="true"
|
|
|
>
|
|
|
<img src="https://www.idea-co-sf.com/gardenProduct/image/zm.png" class="sfzImg">
|
|
|
</van-uploader>
|
|
|
<van-uploader
|
|
|
- v-model="fileList4"
|
|
|
- multiple
|
|
|
+ :file-list="fileList4"
|
|
|
max-count="1"
|
|
|
- :after-read="afterRead4"
|
|
|
- :before-delete="beforeDelete4"
|
|
|
+ @after-read="afterRead4"
|
|
|
+ @delete="beforeDelete4"
|
|
|
+ :show-upload="true"
|
|
|
>
|
|
|
<img src="https://www.idea-co-sf.com/gardenProduct/image/fm.png" class="sfzImg">
|
|
|
</van-uploader>
|
|
@@ -242,26 +249,18 @@
|
|
|
入库审核中......
|
|
|
</div>
|
|
|
<!-- 时间弹框 -->
|
|
|
- <van-popup v-model="show" position="bottom" :style="{ height: '50%' }">
|
|
|
+ <van-popup :show="show" position="bottom" :style="{ height: '50%' }">
|
|
|
<van-datetime-picker
|
|
|
- v-model="currentDate"
|
|
|
- type="date"
|
|
|
title="选择年月日"
|
|
|
- :min-date="minDate"
|
|
|
- :max-date="maxDate"
|
|
|
- @cancel="show = false"
|
|
|
- @confirm="selectTime"
|
|
|
- /></van-popup>
|
|
|
- <van-popup v-model="show2" position="bottom" :style="{ height: '50%' }">
|
|
|
- <van-datetime-picker
|
|
|
- v-model="currentDate"
|
|
|
type="date"
|
|
|
- title="选择年月日"
|
|
|
+ :value="currentDate"
|
|
|
+ @cancel="cancel"
|
|
|
+ @confirm="selectTime"
|
|
|
:min-date="minDate"
|
|
|
:max-date="maxDate"
|
|
|
- @cancel="show2 = false"
|
|
|
- @confirm="selectTime2"
|
|
|
- /></van-popup>
|
|
|
+ :formatter="formatter"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -284,13 +283,25 @@ export default {
|
|
|
frsfzzm: '',
|
|
|
frsfzfm: '',
|
|
|
selectTag: 0,
|
|
|
+ formatter(type, value) {
|
|
|
+ if (type === 'year') {
|
|
|
+ return `${value}年`;
|
|
|
+ }
|
|
|
+ if (type === 'month') {
|
|
|
+ return `${value}月`;
|
|
|
+ }
|
|
|
+ if (type === 'day') {
|
|
|
+ return `${value}日`;
|
|
|
+ }
|
|
|
+ return value;
|
|
|
+ },
|
|
|
tagList: [
|
|
|
],
|
|
|
checkBoxList: [
|
|
|
],
|
|
|
company: {
|
|
|
- id: '',
|
|
|
- qymc: '',
|
|
|
+ id: getUserLocalStorageInfo().userId,
|
|
|
+ qymc: getUserLocalStorageInfo().username,
|
|
|
shxydm: '',
|
|
|
zcsj: '',
|
|
|
zczj: '',
|
|
@@ -319,35 +330,26 @@ export default {
|
|
|
qybq: ''
|
|
|
},
|
|
|
show: false,
|
|
|
- show2: false,
|
|
|
- minDate: new Date(1980, 0, 1),
|
|
|
- maxDate: new Date(2025, 10, 1),
|
|
|
- currentDate: new Date(),
|
|
|
+ minDate: new Date(1980, 0, 1).getTime(),
|
|
|
+ maxDate: new Date(2025, 10, 1).getTime(),
|
|
|
+ currentDate: new Date().getTime(),
|
|
|
selectTagId: '',
|
|
|
btnShow: true,
|
|
|
qybqList: []
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- // this.getCommit()
|
|
|
+ this.getCommit()
|
|
|
},
|
|
|
methods: {
|
|
|
takeshow() {
|
|
|
if (this.isnew) {
|
|
|
+ console.log(222)
|
|
|
this.show = true
|
|
|
}
|
|
|
},
|
|
|
- takeshow2() {
|
|
|
- if (this.isnew) {
|
|
|
- // console.log(123)
|
|
|
- this.show2 = true
|
|
|
- }
|
|
|
- },
|
|
|
- turnOff() {
|
|
|
- this.$router.push('/home/home')
|
|
|
- },
|
|
|
getInfo() {
|
|
|
- getById({ id: auth.currUser().id }).then(res => {
|
|
|
+ getById({ id: getUserLocalStorageInfo().userId }).then(res => {
|
|
|
console.log('res', res)
|
|
|
if (res && res.key == 200) {
|
|
|
this.company = res.data
|
|
@@ -406,16 +408,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else if (res.key == 426) {
|
|
|
- Toast(res.msg)
|
|
|
+ this.$showToast(res.msg)
|
|
|
this.$router.push('/login')
|
|
|
} else {
|
|
|
- Toast(res.msg)
|
|
|
+ this.$showToast(res.msg)
|
|
|
}
|
|
|
if (this.company.shxydm && this.company.rzsj) {
|
|
|
this.isnew = false
|
|
|
}
|
|
|
}).then(() => {
|
|
|
- isFinishComInfo({ comId: auth.currUser().id }).then(res => {
|
|
|
+ isFinishComInfo({ comId: getUserLocalStorageInfo().userId }).then(res => {
|
|
|
if (res.errno === 0) {
|
|
|
this.btnShow = false
|
|
|
} else if (res.errno === -1) {
|
|
@@ -424,52 +426,11 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- // 获取企业标签信息
|
|
|
- // getTagList() {
|
|
|
- // getTagInfo().then(res => {
|
|
|
- // this.tagList = res.data
|
|
|
- // this.checkBoxList = res.data[0].children
|
|
|
- // this.checkBoxList.forEach(item => {
|
|
|
- // if (this.qybqList.findIndex(e => e == item.id) !== -1) {
|
|
|
- // item.checked = true
|
|
|
- // }
|
|
|
- // })
|
|
|
- // })
|
|
|
- // },
|
|
|
- // clickTag(item, index) {
|
|
|
- // this.selectTag = index
|
|
|
- // this.selectTagId = item.id
|
|
|
- // this.tagList.forEach(item => {
|
|
|
- // if (this.selectTagId == item.id) {
|
|
|
- // this.checkBoxList = item.children
|
|
|
- // }
|
|
|
- // })
|
|
|
- // this.checkBoxList.forEach(item => {
|
|
|
- // if (this.company.qybq.split(',').findIndex(e => e == item.id) !== -1) {
|
|
|
- // item.checked = true
|
|
|
- // }
|
|
|
- // })
|
|
|
- // },
|
|
|
- // changeCheck(item) {
|
|
|
- // console.log(this.qybqList)
|
|
|
- // if (item.checked == true) {
|
|
|
- // if (this.qybqList.findIndex(e => e == item.id) == -1) {
|
|
|
- // this.qybqList.push(item.id)
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // const i = this.qybqList.findIndex(e => e == item.id)
|
|
|
- // if (i !== -1) {
|
|
|
- // this.qybqList.splice(i, 1)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.company.qybq = this.qybqList.toString()
|
|
|
- // console.log(this.company.qybq)
|
|
|
- // })
|
|
|
- // },
|
|
|
getCommit() {
|
|
|
- const local = localStorage.getItem('company' + auth.currUser().id)
|
|
|
+ const local = uni.getStorageSync('company' + getUserLocalStorageInfo().userId)
|
|
|
+ console.log(local)
|
|
|
if (local) {
|
|
|
+ console.log('hasLocal')
|
|
|
this.company = JSON.parse(local)
|
|
|
this.qybqList = this.company.qybq.split(',')
|
|
|
// this.getTagList()
|
|
@@ -537,16 +498,16 @@ export default {
|
|
|
} else {
|
|
|
this.company.frsfzh = null
|
|
|
}
|
|
|
- this.company.czrid = auth.currUser().id
|
|
|
- this.company.czr = auth.currUser().qymc
|
|
|
+ this.company.czrid = getUserLocalStorageInfo().userId
|
|
|
+ this.company.czr = getUserLocalStorageInfo().username
|
|
|
this.$delete(this.company, 'czsj')
|
|
|
- localStorage.setItem('company' + auth.currUser().id, JSON.stringify(this.company))
|
|
|
+ uni.setStorageSync('company' + getUserLocalStorageInfo().userId, JSON.stringify(this.company))
|
|
|
this.$nextTick(() => {
|
|
|
- const local = localStorage.getItem('company' + auth.currUser().id)
|
|
|
+ const local = uni.getStorage('company' + getUserLocalStorageInfo().userId)
|
|
|
if (local) {
|
|
|
- Toast('暂存成功')
|
|
|
+ this.$showToast('暂存成功')
|
|
|
} else {
|
|
|
- Toast('暂存失败')
|
|
|
+ this.$showToast('暂存失败')
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -554,257 +515,354 @@ export default {
|
|
|
submit() {
|
|
|
// console.log(this.company.frsfzh)
|
|
|
if (!this.company.shxydm) {
|
|
|
- Toast('请填写统一社会信用代码')
|
|
|
+ this.$showToast('请填写统一社会信用代码')
|
|
|
} else if (!this.company.zczj) {
|
|
|
- Toast('请填写注册资金')
|
|
|
+ this.$showToast('请填写注册资金')
|
|
|
} else if (!this.company.zcsj) {
|
|
|
- Toast('请填写注册时间')
|
|
|
+ this.$showToast('请填写注册时间')
|
|
|
} else if (!this.company.fddbr) {
|
|
|
- Toast('请填写法定代表人')
|
|
|
+ this.$showToast('请填写法定代表人')
|
|
|
} else if (!this.company.qylxr) {
|
|
|
- Toast('请填写企业联系人')
|
|
|
+ this.$showToast('请填写企业联系人')
|
|
|
} else if (!this.company.lxdh) {
|
|
|
- Toast('请填写手机号')
|
|
|
+ this.$showToast('请填写手机号')
|
|
|
} else if (!this.company.email) {
|
|
|
- Toast('请填写联系人邮箱')
|
|
|
+ this.$showToast('请填写联系人邮箱')
|
|
|
} else if (!this.company.cwfzr) {
|
|
|
- Toast('请填写财务负责人')
|
|
|
+ this.$showToast('请填写财务负责人')
|
|
|
} else if (!this.company.cwfzrdh) {
|
|
|
- Toast('请填写财务负责人电话')
|
|
|
+ this.$showToast('请填写财务负责人电话')
|
|
|
} else if (!this.company.zcdz) {
|
|
|
- Toast('请填写注册地址')
|
|
|
+ this.$showToast('请填写注册地址')
|
|
|
} else if (!this.company.jydz) {
|
|
|
- Toast('请填写经营地址')
|
|
|
+ this.$showToast('请填写经营地址')
|
|
|
} else if (this.fileList.length == 0) {
|
|
|
- Toast('请上传营业执照副本')
|
|
|
+ this.$showToast('请上传营业执照副本')
|
|
|
} else if (!this.frsfzzm) {
|
|
|
- Toast('请上传法人身份证正面')
|
|
|
+ this.$showToast('请上传法人身份证正面')
|
|
|
} else if (!this.frsfzfm) {
|
|
|
- Toast('请上传法人身份证反面')
|
|
|
+ this.$showToast('请上传法人身份证反面')
|
|
|
} else {
|
|
|
this.company.frsfzh = this.frsfzzm + ',' + this.frsfzfm
|
|
|
- this.company.czrid = auth.currUser().id
|
|
|
- this.company.czr = auth.currUser().qymc
|
|
|
+ this.company.czrid = getUserLocalStorageInfo().userId
|
|
|
+ this.company.czr = getUserLocalStorageInfo().username
|
|
|
this.$delete(this.company, 'czsj')
|
|
|
this.$delete(this.company, 'gxsj')
|
|
|
- add(this.company).then(res => {
|
|
|
+ addCompanyExamine(this.company).then(res => {
|
|
|
if (res.key == 200) {
|
|
|
- Toast('提交成功')
|
|
|
+ this.$showToast('提交成功')
|
|
|
this.btnShow = false
|
|
|
- localStorage.removeItem('company' + auth.currUser().id)
|
|
|
+ uni.removeStorageSync('company' + getUserLocalStorageInfo().userId)
|
|
|
} else {
|
|
|
- Toast(res.msg)
|
|
|
+ this.$showToast(res.msg)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- selectTime(e) {
|
|
|
- const dayjs = require('dayjs')
|
|
|
- this.company.zcsj = dayjs(e).format('YYYY-MM-DD')
|
|
|
+ cancel(){
|
|
|
this.show = false
|
|
|
},
|
|
|
- selectTime2(e) {
|
|
|
+ selectTime(e) {
|
|
|
const dayjs = require('dayjs')
|
|
|
- this.company.rzsj = dayjs(e).format('YYYY-MM-DD')
|
|
|
- this.show2 = false
|
|
|
- },
|
|
|
- afterRead(file) {
|
|
|
- Toast.loading({
|
|
|
- message: '上传中...',
|
|
|
- forbidClick: true,
|
|
|
- duration: 0
|
|
|
- })
|
|
|
- if (file instanceof Array) {
|
|
|
- file.map(v => {
|
|
|
- this.uploadImg(v)
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.uploadImg(file)
|
|
|
- }
|
|
|
- },
|
|
|
- afterRead2(file) {
|
|
|
- Toast.loading({
|
|
|
- message: '上传中...',
|
|
|
- forbidClick: true,
|
|
|
- duration: 0
|
|
|
- })
|
|
|
- if (file instanceof Array) {
|
|
|
- file.map(v => {
|
|
|
- this.uploadImg2(v)
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.uploadImg2(file)
|
|
|
- }
|
|
|
- },
|
|
|
- afterRead3(file) {
|
|
|
- Toast.loading({
|
|
|
- message: '上传中...',
|
|
|
- forbidClick: true,
|
|
|
- duration: 0
|
|
|
- })
|
|
|
- if (file instanceof Array) {
|
|
|
- file.map(v => {
|
|
|
- this.uploadImg3(v)
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.uploadImg3(file)
|
|
|
- }
|
|
|
+ this.company.zcsj = dayjs(e.detail).format('YYYY-MM-DD')
|
|
|
+ this.show = false
|
|
|
},
|
|
|
- afterRead4(file) {
|
|
|
- Toast.loading({
|
|
|
- message: '上传中...',
|
|
|
- forbidClick: true,
|
|
|
- duration: 0
|
|
|
- })
|
|
|
- if (file instanceof Array) {
|
|
|
- file.map(v => {
|
|
|
- this.uploadImg4(v)
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.uploadImg4(file)
|
|
|
- }
|
|
|
+ afterRead(event) {
|
|
|
+ console.log(event)
|
|
|
+ let that = this;
|
|
|
+ const { file } = event.detail;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: that.$constant.BASE_URI + "/wx/fileController/upload",
|
|
|
+ filePath: file.url,
|
|
|
+ name: "file",
|
|
|
+ formData: { user: "test" },
|
|
|
+ success(res) {
|
|
|
+ // 上传完成需要更新 fileList
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ that.fileList.push({
|
|
|
+ imgUrl: "/FileController/download/" + data.data[0],
|
|
|
+ id: data.data[0],
|
|
|
+ url:
|
|
|
+ that.$constant.BASE_URI +
|
|
|
+ "/FileController/download/" +
|
|
|
+ data.data[0],
|
|
|
+ isImage: true,
|
|
|
+ });
|
|
|
+ that.company.yyzzfbzp = data.data[0]
|
|
|
+ console.log('list',that.fileList)
|
|
|
+ },
|
|
|
+ fail(res) {},
|
|
|
+ });
|
|
|
},
|
|
|
- beforeDelete(file, detail) {
|
|
|
- const vm = this
|
|
|
- // name.index代表图片的索引
|
|
|
- vm.company.yyzzfbzp = ''
|
|
|
- this.fileList = []
|
|
|
+ afterRead2(event) {
|
|
|
+ console.log(event)
|
|
|
+ let that = this;
|
|
|
+ const { file } = event.detail;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: that.$constant.BASE_URI + "/wx/fileController/upload",
|
|
|
+ filePath: file.url,
|
|
|
+ name: "file",
|
|
|
+ formData: { user: "test" },
|
|
|
+ success(res) {
|
|
|
+ // 上传完成需要更新 fileList
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ that.fileIdList2.push(data.data[0])
|
|
|
+ that.fileList2.push({
|
|
|
+ imgUrl: "/FileController/download/" + data.data[0],
|
|
|
+ id: data.data[0],
|
|
|
+ url:
|
|
|
+ that.$constant.BASE_URI +
|
|
|
+ "/FileController/download/" +
|
|
|
+ data.data[0],
|
|
|
+ isImage: true,
|
|
|
+ });
|
|
|
+ that.company.ryxxzp = that.fileIdList2.toString()
|
|
|
+ console.log('list',that.fileList)
|
|
|
+ },
|
|
|
+ fail(res) {},
|
|
|
+ });
|
|
|
},
|
|
|
- beforeDelete2(file, detail) {
|
|
|
- const vm = this
|
|
|
- // name.index代表图片的索引
|
|
|
- vm.fileIdList2.splice(detail.index, 1)
|
|
|
- vm.company.ryxxzp = vm.fileIdList2.toString()
|
|
|
- console.log(vm.company.ryxxzp)
|
|
|
- return (file, name) => {
|
|
|
- const fileIndex = name.index
|
|
|
- vm.fileIdList2[detail.index].splice(fileIndex, 1)
|
|
|
- }
|
|
|
+ afterRead3(event) {
|
|
|
+ console.log(event)
|
|
|
+ let that = this;
|
|
|
+ const { file } = event.detail;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: that.$constant.BASE_URI + "/wx/fileController/upload",
|
|
|
+ filePath: file.url,
|
|
|
+ name: "file",
|
|
|
+ formData: { user: "test" },
|
|
|
+ success(res) {
|
|
|
+ // 上传完成需要更新 fileList
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ that.fileList3.push({
|
|
|
+ imgUrl: "/FileController/download/" + data.data[0],
|
|
|
+ id: data.data[0],
|
|
|
+ url:
|
|
|
+ that.$constant.BASE_URI +
|
|
|
+ "/FileController/download/" +
|
|
|
+ data.data[0],
|
|
|
+ isImage: true,
|
|
|
+ });
|
|
|
+ that.frsfzzm = data.data[0]
|
|
|
+ console.log('list',that.fileList)
|
|
|
+ },
|
|
|
+ fail(res) {},
|
|
|
+ });
|
|
|
},
|
|
|
- beforeDelete3(file, detail) {
|
|
|
- const vm = this
|
|
|
- // name.index代表图片的索引
|
|
|
- vm.frsfzzm = ''
|
|
|
- this.fileList3 = []
|
|
|
- this.fileIdList3 = []
|
|
|
+ afterRead4(event) {
|
|
|
+ console.log(event)
|
|
|
+ let that = this;
|
|
|
+ const { file } = event.detail;
|
|
|
+ uni.uploadFile({
|
|
|
+ url: that.$constant.BASE_URI + "/wx/fileController/upload",
|
|
|
+ filePath: file.url,
|
|
|
+ name: "file",
|
|
|
+ formData: { user: "test" },
|
|
|
+ success(res) {
|
|
|
+ // 上传完成需要更新 fileList
|
|
|
+ let data = JSON.parse(res.data);
|
|
|
+ that.fileList4.push({
|
|
|
+ imgUrl: "/FileController/download/" + data.data[0],
|
|
|
+ id: data.data[0],
|
|
|
+ url:
|
|
|
+ that.$constant.BASE_URI +
|
|
|
+ "/FileController/download/" +
|
|
|
+ data.data[0],
|
|
|
+ isImage: true,
|
|
|
+ });
|
|
|
+ that.frsfzfm = data.data[0]
|
|
|
+ console.log('list',that.fileList)
|
|
|
+ },
|
|
|
+ fail(res) {},
|
|
|
+ });
|
|
|
},
|
|
|
- beforeDelete4(file, detail) {
|
|
|
- const vm = this
|
|
|
- // name.index代表图片的索引
|
|
|
- vm.frsfzfm = ''
|
|
|
- this.fileList4 = []
|
|
|
- this.fileIdList4 = []
|
|
|
+ // afterRead2(file) {
|
|
|
+ // this.$showToast.loading({
|
|
|
+ // message: '上传中...',
|
|
|
+ // forbidClick: true,
|
|
|
+ // duration: 0
|
|
|
+ // })
|
|
|
+ // if (file instanceof Array) {
|
|
|
+ // file.map(v => {
|
|
|
+ // this.uploadImg2(v)
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // this.uploadImg2(file)
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // afterRead3(file) {
|
|
|
+ // this.$showToast.loading({
|
|
|
+ // message: '上传中...',
|
|
|
+ // forbidClick: true,
|
|
|
+ // duration: 0
|
|
|
+ // })
|
|
|
+ // if (file instanceof Array) {
|
|
|
+ // file.map(v => {
|
|
|
+ // this.uploadImg3(v)
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // this.uploadImg3(file)
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // afterRead4(file) {
|
|
|
+ // this.$showToast.loading({
|
|
|
+ // message: '上传中...',
|
|
|
+ // forbidClick: true,
|
|
|
+ // duration: 0
|
|
|
+ // })
|
|
|
+ // if (file instanceof Array) {
|
|
|
+ // file.map(v => {
|
|
|
+ // this.uploadImg4(v)
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // this.uploadImg4(file)
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ beforeDelete(event) {
|
|
|
+ this.fileList.splice(event.detail.index, 1);
|
|
|
+ this.company.yyzzfbzp = ''
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
|
- uploadImg(file) {
|
|
|
- const _this = this
|
|
|
- const formParam = new FormData() // 创建form对象
|
|
|
- formParam.append('file', file.file) // 通过append向form对象添加数据
|
|
|
- const config = {
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'multipart/form-data',
|
|
|
- 'MVVM-Key': String(new Date().getTime()),
|
|
|
- xx: 'anything'
|
|
|
- } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
|
|
|
- } // 添加请求头
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
|
|
|
- upload(formParam, config)
|
|
|
- .then(response => {
|
|
|
- if (response.data.length) {
|
|
|
- _this.company.yyzzfbzp = response.data[0]
|
|
|
- }
|
|
|
- Toast.clear()
|
|
|
- })
|
|
|
- .catch((err, x) => {
|
|
|
- reject(err, x)
|
|
|
- })
|
|
|
- })
|
|
|
+ beforeDelete2(event) {
|
|
|
+ this.fileList2.splice(event.detail.index, 1);
|
|
|
+ this.company.ryxxzp = this.fileIdList2.toString()
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
|
- uploadImg2(file) {
|
|
|
- const _this = this
|
|
|
- const formParam = new FormData() // 创建form对象
|
|
|
- formParam.append('file', file.file) // 通过append向form对象添加数据
|
|
|
- const config = {
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'multipart/form-data',
|
|
|
- 'MVVM-Key': String(new Date().getTime()),
|
|
|
- xx: 'anything'
|
|
|
- } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
|
|
|
- } // 添加请求头
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
|
|
|
- upload(formParam, config)
|
|
|
- .then(response => {
|
|
|
- if (response.data.length) {
|
|
|
- response.data.forEach(element => {
|
|
|
- _this.fileIdList2.push(element)
|
|
|
- })
|
|
|
- _this.company.ryxxzp = _this.fileIdList2.toString()
|
|
|
- // console.log(_this.company.ryxxzp);
|
|
|
- }
|
|
|
- Toast.clear()
|
|
|
- })
|
|
|
- .catch((err, x) => {
|
|
|
- reject(err, x)
|
|
|
- })
|
|
|
- })
|
|
|
+ beforeDelete3(event) {
|
|
|
+ this.fileList3.splice(event.detail.index, 1);
|
|
|
+ this.frsfzzm = ''
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
|
- uploadImg3(file) {
|
|
|
- const _this = this
|
|
|
- const formParam = new FormData() // 创建form对象
|
|
|
- formParam.append('file', file.file) // 通过append向form对象添加数据
|
|
|
- const config = {
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'multipart/form-data',
|
|
|
- 'MVVM-Key': String(new Date().getTime()),
|
|
|
- xx: 'anything'
|
|
|
- } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
|
|
|
- } // 添加请求头
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
|
|
|
- upload(formParam, config)
|
|
|
- .then(response => {
|
|
|
- if (response.data.length) {
|
|
|
- response.data.forEach(element => {
|
|
|
- _this.fileIdList3.push(element)
|
|
|
- })
|
|
|
- _this.frsfzzm = _this.fileIdList3.toString()
|
|
|
- }
|
|
|
- Toast.clear()
|
|
|
- })
|
|
|
- .catch((err, x) => {
|
|
|
- reject(err, x)
|
|
|
- })
|
|
|
- })
|
|
|
+ beforeDelete4(event) {
|
|
|
+ this.fileList4.splice(event.detail.index, 1);
|
|
|
+ this.frsfzfm = ''
|
|
|
+ this.$forceUpdate();
|
|
|
},
|
|
|
- uploadImg4(file) {
|
|
|
- const _this = this
|
|
|
- const formParam = new FormData() // 创建form对象
|
|
|
- formParam.append('file', file.file) // 通过append向form对象添加数据
|
|
|
- const config = {
|
|
|
- headers: {
|
|
|
- 'Content-Type': 'multipart/form-data',
|
|
|
- 'MVVM-Key': String(new Date().getTime()),
|
|
|
- xx: 'anything'
|
|
|
- } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
|
|
|
- } // 添加请求头
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
|
|
|
- upload(formParam, config)
|
|
|
- .then(response => {
|
|
|
- if (response.data.length) {
|
|
|
- response.data.forEach(element => {
|
|
|
- _this.fileIdList4.push(element)
|
|
|
- })
|
|
|
- _this.frsfzfm = _this.fileIdList4.toString()
|
|
|
- }
|
|
|
- Toast.clear()
|
|
|
- })
|
|
|
- .catch((err, x) => {
|
|
|
- reject(err, x)
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
+ // beforeDelete3(file, detail) {
|
|
|
+ // const vm = this
|
|
|
+ // // name.index代表图片的索引
|
|
|
+ // vm.frsfzzm = ''
|
|
|
+ // this.fileList3 = []
|
|
|
+ // this.fileIdList3 = []
|
|
|
+ // },
|
|
|
+ // beforeDelete4(file, detail) {
|
|
|
+ // const vm = this
|
|
|
+ // // name.index代表图片的索引
|
|
|
+ // vm.frsfzfm = ''
|
|
|
+ // this.fileList4 = []
|
|
|
+ // this.fileIdList4 = []
|
|
|
+ // },
|
|
|
+ // uploadImg(file) {
|
|
|
+ // const _this = this
|
|
|
+ // const formParam = new FormData() // 创建form对象
|
|
|
+ // formParam.append('file', file.file) // 通过append向form对象添加数据
|
|
|
+ // const config = {
|
|
|
+ // headers: {
|
|
|
+ // 'Content-Type': 'multipart/form-data',
|
|
|
+ // 'MVVM-Key': String(new Date().getTime()),
|
|
|
+ // xx: 'anything'
|
|
|
+ // } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
|
|
|
+ // } // 添加请求头
|
|
|
+ // return new Promise((resolve, reject) => {
|
|
|
+ // // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
|
|
|
+ // upload(formParam, config)
|
|
|
+ // .then(response => {
|
|
|
+ // if (response.data.length) {
|
|
|
+ // _this.company.yyzzfbzp = response.data[0]
|
|
|
+ // }
|
|
|
+ // this.$showToast.clear()
|
|
|
+ // })
|
|
|
+ // .catch((err, x) => {
|
|
|
+ // reject(err, x)
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // uploadImg2(file) {
|
|
|
+ // const _this = this
|
|
|
+ // const formParam = new FormData() // 创建form对象
|
|
|
+ // formParam.append('file', file.file) // 通过append向form对象添加数据
|
|
|
+ // const config = {
|
|
|
+ // headers: {
|
|
|
+ // 'Content-Type': 'multipart/form-data',
|
|
|
+ // 'MVVM-Key': String(new Date().getTime()),
|
|
|
+ // xx: 'anything'
|
|
|
+ // } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
|
|
|
+ // } // 添加请求头
|
|
|
+ // return new Promise((resolve, reject) => {
|
|
|
+ // // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
|
|
|
+ // upload(formParam, config)
|
|
|
+ // .then(response => {
|
|
|
+ // if (response.data.length) {
|
|
|
+ // response.data.forEach(element => {
|
|
|
+ // _this.fileIdList2.push(element)
|
|
|
+ // })
|
|
|
+ // _this.company.ryxxzp = _this.fileIdList2.toString()
|
|
|
+ // // console.log(_this.company.ryxxzp);
|
|
|
+ // }
|
|
|
+ // this.$showToast.clear()
|
|
|
+ // })
|
|
|
+ // .catch((err, x) => {
|
|
|
+ // reject(err, x)
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // uploadImg3(file) {
|
|
|
+ // const _this = this
|
|
|
+ // const formParam = new FormData() // 创建form对象
|
|
|
+ // formParam.append('file', file.file) // 通过append向form对象添加数据
|
|
|
+ // const config = {
|
|
|
+ // headers: {
|
|
|
+ // 'Content-Type': 'multipart/form-data',
|
|
|
+ // 'MVVM-Key': String(new Date().getTime()),
|
|
|
+ // xx: 'anything'
|
|
|
+ // } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
|
|
|
+ // } // 添加请求头
|
|
|
+ // return new Promise((resolve, reject) => {
|
|
|
+ // // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
|
|
|
+ // upload(formParam, config)
|
|
|
+ // .then(response => {
|
|
|
+ // if (response.data.length) {
|
|
|
+ // response.data.forEach(element => {
|
|
|
+ // _this.fileIdList3.push(element)
|
|
|
+ // })
|
|
|
+ // _this.frsfzzm = _this.fileIdList3.toString()
|
|
|
+ // }
|
|
|
+ // this.$showToast.clear()
|
|
|
+ // })
|
|
|
+ // .catch((err, x) => {
|
|
|
+ // reject(err, x)
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // uploadImg4(file) {
|
|
|
+ // const _this = this
|
|
|
+ // const formParam = new FormData() // 创建form对象
|
|
|
+ // formParam.append('file', file.file) // 通过append向form对象添加数据
|
|
|
+ // const config = {
|
|
|
+ // headers: {
|
|
|
+ // 'Content-Type': 'multipart/form-data',
|
|
|
+ // 'MVVM-Key': String(new Date().getTime()),
|
|
|
+ // xx: 'anything'
|
|
|
+ // } // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
|
|
|
+ // } // 添加请求头
|
|
|
+ // return new Promise((resolve, reject) => {
|
|
|
+ // // axios.post('http://121.228.7.226:9001/wx/fileController/upload', formParam, config)
|
|
|
+ // upload(formParam, config)
|
|
|
+ // .then(response => {
|
|
|
+ // if (response.data.length) {
|
|
|
+ // response.data.forEach(element => {
|
|
|
+ // _this.fileIdList4.push(element)
|
|
|
+ // })
|
|
|
+ // _this.frsfzfm = _this.fileIdList4.toString()
|
|
|
+ // }
|
|
|
+ // this.$showToast.clear()
|
|
|
+ // })
|
|
|
+ // .catch((err, x) => {
|
|
|
+ // reject(err, x)
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
</script>
|