|
|
@@ -122,6 +122,29 @@
|
|
|
:zRadiocolumns="item.customOptionList"
|
|
|
@zSelectVal="zSelectVal"></z-radio>
|
|
|
</div>
|
|
|
+ <div v-if="item.answerType == 'jxs'" class="formLabel z-cell">
|
|
|
+ <van-cell>
|
|
|
+ <template #title>
|
|
|
+ <span v-if="item.isMust == 0" class="van-f-red">*</span>{{ item.customName }}
|
|
|
+ </template>
|
|
|
+ </van-cell>
|
|
|
+ <div class="jxsBox">
|
|
|
+ <div class="jxsContent">
|
|
|
+ <div class="item" v-for="(val, index) in item.chainList">
|
|
|
+ <div class="selectItem">{{ val.chainName }} ({{ val.chainCode }})</div>
|
|
|
+ <van-icon
|
|
|
+ name="clear"
|
|
|
+ size="16"
|
|
|
+ @click="closeJXS(item, index)"
|
|
|
+ v-if="item.allowWriteAgain" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="addJXS">
|
|
|
+ <van-icon name="add-o" size="24" @click="addJXS" v-if="item.allowWriteAgain" />
|
|
|
+ </div>
|
|
|
+ <div class="tips" v-if="item.allowWriteAgain">选择参与的客户,可多选</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<br />
|
|
|
</div>
|
|
|
</van-form>
|
|
|
@@ -176,11 +199,42 @@
|
|
|
@cancel="EndTimeShow = false"
|
|
|
@confirm="onEndTimeConfirm" />
|
|
|
</van-popup>
|
|
|
+ <!-- 经销商 -->
|
|
|
+ <van-popup v-model="moreTypeShow" position="bottom">
|
|
|
+ <van-row style="background-color: #f5f5f5">
|
|
|
+ <van-col span="20">
|
|
|
+ <van-field
|
|
|
+ left-icon="search"
|
|
|
+ style="margin-top: 2px; border-radius: 6px; overflow: hidden"
|
|
|
+ v-model="agentValue"
|
|
|
+ label=""
|
|
|
+ placeholder="请输入关键词"
|
|
|
+ clearable />
|
|
|
+ </van-col>
|
|
|
+ <van-col
|
|
|
+ span="4"
|
|
|
+ style="text-align: center; line-height: 48px"
|
|
|
+ @click="getChainsList(agentValue)">
|
|
|
+ <div style="background-color: #0057ba; color: #fff">搜索</div>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-picker
|
|
|
+ show-toolbar
|
|
|
+ :columns="chainsData"
|
|
|
+ value-key="chainName"
|
|
|
+ @confirm="onConfirmChainsList"
|
|
|
+ @cancel="moreTypeShow = false" />
|
|
|
+ </van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { insertCustomAnswer, getSummaryMobileDeptInfo, getDeptsByUser } from '@/api/index';
|
|
|
+import {
|
|
|
+ insertCustomAnswer,
|
|
|
+ getSummaryMobileDeptInfo,
|
|
|
+ getDeptsByUser,
|
|
|
+ chainsList,
|
|
|
+} from '@/api/index';
|
|
|
import zRadio from '@/components/zRadio2';
|
|
|
import zCheckbox from '@/components/zCheckbox2';
|
|
|
import uploadImg from '@/components/uploadVTask';
|
|
|
@@ -251,6 +305,12 @@ export default {
|
|
|
flagclick: true,
|
|
|
index: '',
|
|
|
activaFlag: true,
|
|
|
+ moreTypeShow: false,
|
|
|
+ agentValue: '',
|
|
|
+ chainsData: [],
|
|
|
+ chainName: '',
|
|
|
+ chainCode: '',
|
|
|
+ jxsList: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -435,6 +495,17 @@ export default {
|
|
|
});
|
|
|
this.collectionItemList[q].fileIdList = fileIdList;
|
|
|
}
|
|
|
+ // 照片
|
|
|
+ if (
|
|
|
+ this.collectionItemList[q].answerType == 'jxs' &&
|
|
|
+ this.collectionItemList[q].chainList
|
|
|
+ ) {
|
|
|
+ // let fileIdList = [];
|
|
|
+ // this.collectionItemList[q].fileInfoList.forEach((item) => {
|
|
|
+ // fileIdList.push(item.id);
|
|
|
+ // });
|
|
|
+ this.jxsList = this.collectionItemList[q].chainList;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
getThreeDaysAgo() {
|
|
|
@@ -695,6 +766,45 @@ export default {
|
|
|
this.formData.pageNum = 1;
|
|
|
this.EndTimeShow = false;
|
|
|
},
|
|
|
+ // 添加经销商
|
|
|
+ addJXS() {
|
|
|
+ this.moreTypeShow = true;
|
|
|
+ this.getChainsList();
|
|
|
+ },
|
|
|
+ // 删除经销商
|
|
|
+ closeJXS(item, index) {
|
|
|
+ item.chainList.splice(index, 1);
|
|
|
+ },
|
|
|
+ getChainsList(value = '') {
|
|
|
+ this.chainsData = [];
|
|
|
+ chainsList({
|
|
|
+ chainCode: '', // string 经销商编码
|
|
|
+ chainName: value, // string 经销商名称
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200 && res.rows) {
|
|
|
+ this.chainsData = res.rows;
|
|
|
+ } else {
|
|
|
+ this.chainsData = [];
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.chainsData = [];
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onConfirmChainsList(value) {
|
|
|
+ if (value.chainName != undefined) {
|
|
|
+ let JXSSataList = this.collectionItemList.find((item) => item.answerType == 'jxs');
|
|
|
+ if (!JXSSataList.chainList) {
|
|
|
+ JXSSataList.chainList = [];
|
|
|
+ }
|
|
|
+ JXSSataList.chainList.push({
|
|
|
+ chainName: value.chainName,
|
|
|
+ chainCode: value.chainCode,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.moreTypeShow = false;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -751,6 +861,29 @@ export default {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
+.jxsBox {
|
|
|
+ .jxsContent {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ .item {
|
|
|
+ padding: 5px;
|
|
|
+ display: flex;
|
|
|
+ background: #e9e9e9;
|
|
|
+ margin: 5px 0;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .selectItem {
|
|
|
+ flex: 1;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tips {
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|
|
|
<style>
|
|
|
.table-headermd {
|