|
|
@@ -4,7 +4,6 @@ let _Http = getApp().globalData.http,
|
|
|
Page({
|
|
|
data: {
|
|
|
showAll: false,
|
|
|
- queryShow: false,
|
|
|
repetitionShow: false,
|
|
|
repetitionList: [],
|
|
|
isSubmit: false,
|
|
|
@@ -126,6 +125,39 @@ Page({
|
|
|
disabled: true,
|
|
|
countDown: "", //查重倒计时
|
|
|
},
|
|
|
+ queryClient() {
|
|
|
+ let data = this.selectComponent("#Form").query();
|
|
|
+ if (data.enterprisename == '') {
|
|
|
+ wx.showToast({
|
|
|
+ title: `您还未填写企业名称`,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ form: this.selectComponent("#Form").data.form,
|
|
|
+ })
|
|
|
+ this.selectComponent("#Info").queryClient(data.enterprisename)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /* 工商查询 */
|
|
|
+ introduce({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ let item = detail;
|
|
|
+ let data = {
|
|
|
+ enterprisename: item.companyName, //企业名称
|
|
|
+ taxno: item.taxNum, //税号
|
|
|
+ contact: item.legalPerson, //法人
|
|
|
+ region: [item.regProvince, item.regCity, item.regArea], //地区
|
|
|
+ address: item.address, //地区
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ form: this.data.form.map(v => {
|
|
|
+ if (data[v.valueName]) v.value = data[v.valueName];
|
|
|
+ return v
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
setOption(item) {
|
|
|
let i = this.data.form.findIndex(v => v.valueName == item.valueName);
|
|
|
this.setData({
|
|
|
@@ -155,76 +187,6 @@ Page({
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- /* 引入 */
|
|
|
- introduce(e) {
|
|
|
- let {
|
|
|
- item
|
|
|
- } = e.currentTarget.dataset,
|
|
|
- that = this;
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: `是否确定引入“${item.companyName}”信息`,
|
|
|
- complete: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- let data = {
|
|
|
- enterprisename: item.companyName, //企业名称
|
|
|
- taxno: item.taxNum, //税号
|
|
|
- contact: item.legalPerson, //法人
|
|
|
- region: [item.regProvince, item.regCity, item.regArea], //地区
|
|
|
- address: item.address, //地区
|
|
|
- }
|
|
|
- that.setData({
|
|
|
- form: that.data.form.map(v => {
|
|
|
- if (data[v.valueName]) v.value = data[v.valueName];
|
|
|
- return v
|
|
|
- }),
|
|
|
- queryShow: false,
|
|
|
- queryList: null
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- /* 工商查询 */
|
|
|
- queryClient(e) {
|
|
|
- let data = this.selectComponent("#Form").query();
|
|
|
- this.setData({
|
|
|
- form: this.data.form.map(v => {
|
|
|
- v.value = data[v.valueName];
|
|
|
- return v
|
|
|
- }),
|
|
|
- })
|
|
|
- console.log(this.data.form)
|
|
|
- if (data.enterprisename == '') return wx.showToast({
|
|
|
- title: `您还未填写企业名称`,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- _Http.basic({
|
|
|
- id: 20221208103601,
|
|
|
- content: {
|
|
|
- pageNumber: 1,
|
|
|
- pageTotal: 1,
|
|
|
- pageSize: 5,
|
|
|
- keyword: data.enterprisename,
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- console.log("工商查询", res)
|
|
|
- if (!res.data[0]) return wx.showToast({
|
|
|
- title: '未查询到相关企业!',
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- this.setData({
|
|
|
- queryList: res.data,
|
|
|
- queryShow: true
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- onClose() {
|
|
|
- this.setData({
|
|
|
- queryShow: false
|
|
|
- })
|
|
|
- },
|
|
|
repClose() {
|
|
|
if (this.data.isSubmit) {
|
|
|
let that = this;
|