| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919 |
- <template>
- <view class="wrapper">
- <view class="form">
- <form @submit="formSubmit" @reset="formReset">
- <view class="uni-form-item uni-column">
- <view class="title">标题:</view>
- <input class="uni-input" name="workOrderTitle" :value="formData.workOrderTitle" placeholder="标题" />
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">来电内容:</view>
- <view class="uni-textarea">
- <textarea name="callContent" :value="formData.callContent" auto-height />
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">工单内容:</view>
- <view class="uni-textarea">
- <textarea name="workOrderContent" :value="formData.workOrderContent" auto-height />
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">处理方式:</view>
- <radio-group name="processingMethod" :value="formData.processingMethod" @change="bindChangeProcessingMethod">
- <label> <radio value="1" :checked="!radioChecked.processingMethod" /><text>当即办理</text> </label>
- <label> <radio value="0" :checked="radioChecked.processingMethod" /><text>网络转办</text> </label>
- </radio-group>
- </view>
- <view class="uni-form-item uni-column" v-show="isDisplay.result">
- <view class="title">办理内容:</view>
- <view class="uni-textarea">
- <textarea name="result" :value="formData.result" auto-height />
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">姓名:</view>
- <input class="uni-input" name="name" :value="formData.name" placeholder="请输入姓名" />
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">性别:</view>
- <radio-group name="gender" :value="formData.gender">
- <label> <radio value="0" :checked="radioChecked.gender" /><text>男</text></label>
- <label> <radio value="1" :checked="!radioChecked.gender" /><text>女</text></label>
- </radio-group>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">反映类别:</view>
- <view>
- <bjx-inputs the-style="overflow: auto" :value="formData.responseCategory" item-key="names" placeholder="请输入内容" @list="getReflectCategoryData" @select="selectReflectCategory" overflow="hide"> </bjx-inputs>
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title uni-common-pl">来源:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangeSource" :range="sourceListData" :range-key="'F_Value'">
- <view name="source" class="uni-input">{{ sourceListData[pickerIndex.indexSource].F_Value }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">来电号码:</view>
- <input class="uni-input" name="callerNumber" :value="formData.callerNumber" placeholder="请输入来电号码" />
- </view>
- <view class="uni-form-item uni-column">
- <view class="title uni-common-pl">类型:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangeType" value="" :range="typeListData" :range-key="'F_Value'">
- <view class="uni-input">{{ typeListData[pickerIndex.indexType].F_Value }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">号码密级:</view>
- <radio-group name="numberSecurityLevel" :value="formData.numberSecurityLevel">
- <label> <radio value="0" :checked="radioChecked.numberSecurityLevel" /><text>普通</text> </label>
- <label> <radio value="1" :checked="!radioChecked.numberSecurityLevel" /><text>保密</text> </label>
- </radio-group>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title uni-common-pl">紧急程度:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangeEmergencyLevel" :value="pickerIndex.indexEmergencyLevel" :range="emergencyLevelListData" :range-key="'text'">
- <view class="uni-input">{{ emergencyLevelListData[pickerIndex.indexEmergencyLevel].text }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column" v-show="isDisplay.phoneType">
- <view class="title uni-common-pl">电话类别:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangePhoneType" :value="formData.phoneType" :range="phoneTypeListData" :range-key="'F_Remark'">
- <view class="uni-input">{{ phoneTypeListData[pickerIndex.indexPhoneType].F_Remark }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column" v-show="isDisplay.leaderCharge">
- <view class="title uni-common-pl">分管领导:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangeLeaderCharge" :value="formData.leaderCharge" :range="leaderChargeListData" :range-key="'text'">
- <view class="uni-input">{{ leaderChargeListData[pickerIndex.indexLeaderCharge].text }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title uni-common-pl">事发区域:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangeSourcearea" value="" :range="sourceareaListData" :range-key="'F_AreaName'">
- <view class="uni-input">{{ sourceareaListData[pickerIndex.indexSourcearea].F_AreaName }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title uni-common-pl">乡镇:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangeTownship" value="" :range="townshipListData" :range-key="'F_AreaName'">
- <view class="uni-input">{{ townshipListData[pickerIndex.indexTownship].F_AreaName }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title uni-common-pl">村:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangeVillage" value="" :range="villageListData" :range-key="'F_AreaName'">
- <view class="uni-input">{{ villageListData[pickerIndex.indexVillage].F_AreaName }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column">
- <view class="title">详细地址:</view>
- <view class="uni-textarea">
- <textarea name="callContent" :value="formData.sourceaddress" auto-height />
- </view>
- </view>
- <!-- <view class="uni-form-item uni-column">
- <view class="title">附件:</view>
- <view>
- <uni-file-picker
- v-model="imageValue"
- fileMediatype="image"
- mode="grid"
- @select="select"
- @progress="progress"
- @success="success"
- @fail="fail"
- />
- </view>
- </view> -->
- <view class="uni-form-item uni-column">
- <view class="title">承办单位:</view>
- <view>
- <bjx-inputs the-style="" :value="formData.deptName" item-key="F_DeptName" placeholder="请输入内容" @list="getDeptData" @select="selectDept" overflow="hide"> </bjx-inputs>
- </view>
- </view>
- <view class="uni-form-item uni-column" v-if="isDisplay.urgentOrOrdinary">
- <view class="title uni-common-pl">办理时限:</view>
- <view class="uni-list">
- <view class="uni-list-cell">
- <view class="uni-list-cell-db">
- <picker @change="bindPickerChangeProcessingTimeLimit" :value="pickerIndex.indexProcessingTimeLimit" :range="processingTimeLimitListData" :range-key="'text'">
- <view class="uni-input">{{ processingTimeLimitListData[pickerIndex.indexProcessingTimeLimit].text }}</view>
- </picker>
- </view>
- </view>
- </view>
- </view>
- <view class="uni-form-item uni-column" v-if="!isDisplay.urgentOrOrdinary">
- <view class="title uni-common-pl">紧急时限:</view>
- <view class="uni-list">
- <view class="test">
- <input class="uni-input" @click="DatePicker('datetime')" name="emergencyTimeFrame" :value="formData.emergencyTimeFrame" placeholder="紧急时限" />
- <!-- <text @click="DatePicker('datetime')">{{ formData.emergencyTimeFrame }}</text> -->
- </view>
- <mx-date-picker :show="showPicker" type="datetime" :value="formData.emergencyTimeFrame" :show-tips="true" :begin-text="'开始'" :end-text="'结束'" :show-seconds="true" @confirm="ed" @cancel="ed" />
- </view>
- </view>
- <view class="uni-btn-v">
- <button class="mini-btn" type="default" size="mini" @click="save">保存</button>
- <button class="mini-btn" type="default" size="mini" @click="approved">审核通过</button>
- <!-- <button >打开弹窗</button> -->
- <uni-popup ref="popup" type="dialog">
- <uni-popup-dialog mode="base" content="确定转办吗?" message="成功消息" :duration="2000" :before-close="true" @close="close" @confirm="confirm"></uni-popup-dialog>
- </uni-popup>
- </view>
- </form>
- </view>
- </view>
- </template>
- <script>
- import BjxInputs from "@/components/bjx-inputs/bjx-inputs.vue"
- import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue"
- export default {
- components: {
- BjxInputs,
- MxDatePicker
- },
- data() {
- return {
- imageValue: [],
- wid: "", // 工单id
- title: "picker",
- index: 0,
- reflectCategoryListData: [], // 反映类别列表数据
- // date: currentDate,
- formData: {
- workOrderTitle: "", // 标题
- callContent: "", // 来电内容
- workOrderContent: "", // 工单内容
- processingMethod: "", // 处理方式
- result: "", // 办理内容
- name: "", // 姓名
- gender: "", // 性别
- source: "", // 来源
- callerNumber: "", // 来电号码
- workOrderType: "", // 工单类型
- responseCategory: "", // 反映类别
- responseCategoryId: "", // 反映类别id
- numberSecurityLevel: "", // 来电号码密级
- emergencyLevel: "", // 紧急程度
- organizer: "", // 承办单位
- processingTimeLimit: "", // 办理时限
- emergencyTimeLimit: "", // 积极时限
- phoneType: "", // 电话类别
- phoneTypeId: "", // 电话类别
- leaderCharge: "", // 分管领导
- threeWayCall: "", // 三方通话
- deptName: "", // 承办单位
- deptId: "", // 承办单位id
- emergencyTimeFrame: "", // 紧急时限
- sourcearea: "", // 事发区域
- township: "", // 乡镇
- village: "", // 村
- sourceaddress: "", // 详细地址
- },
- radioChecked: {
- processingMethod: true,
- gender: true,
- numberSecurityLevel: true,
- },
- isDisplay: {
- result: false, // 办理内容
- phoneType: false, // 电话类别
- leaderCharge: false, // 分管领导
- urgentOrOrdinary: true, // 紧急时限,办理时限
- },
- pickerIndex: {
- indexSource: 0, // 来源index
- indexType: 0, // 类型index
- indexEmergencyLevel: 0, // 紧急程度index
- indexPhoneType: 0, // 电话类别index
- indexLeaderCharge: 0, // 分管领导index
- indexProcessingTimeLimit: 0, // 办理时限index
- indexSourcearea: 0, // 事发区域index
- indexTownship: 0, // 乡镇index
- indexVillage: 0, // 村index
- },
- // 来源数据
- sourceListData: [
- {
- F_Value: "请选择",
- }
- ],
- // 工单类型数据
- typeListData: [
- {
- F_Value: "请选择",
- }
- ],
- // 紧急程度
- emergencyLevelListData: [
- {
- value: "1",
- text: "普通",
- },
- {
- value: "2",
- text: "紧急",
- },
- ],
- // 电话类别
- phoneTypeListData: [
- {
- F_Value: "请选择",
- }
- ],
- // 分管领导
- leaderChargeListData: [
- {
- value: "0",
- text: "省长",
- },
- {
- value: "1",
- text: "市长",
- }
- ],
- // 办理时限
- processingTimeLimitListData: [
- {
- value: "1",
- text: "一天",
- },
- {
- value: "3",
- text: "三天",
- },
- {
- value: "5",
- text: "五天",
- },
- {
- value: "7",
- text: "七天",
- },
- ],
- // 事发区域
- sourceareaListData: [
- {
- F_AreaName: "请选择",
- }
- ],
- // 乡镇数据
- townshipListData: [
- {
- F_AreaName: "请选择",
- }
- ],
- // 村数据
- villageListData: [
- {
- F_AreaName: "请选择",
- }
- ],
- showPicker: false, // 时间组件
- }
- },
- onLoad(option) {
- console.log("option", option);
- this.wid = option.wid
- // 获取来源数据 dictionaryId=1
- this.getDictionaryData(1)
- // 获取来源数据 dictionaryId=2
- this.getDictionaryData(2)
- // 获取电话类别 dictionaryId=2498
- this.getDictionaryData(2498)
- // 获取反映类别
- this.getReflectCategoryList()
- //获取部门
- this.getDeptList()
- // 获取事发区域
- this.getSourceareaData()
- // 获取详情 type=0
- this.getDetail(0)
- },
- methods: {
- formSubmit: function (e) {
- console.log("form发生了submit事件,携带数据为:" + JSON.stringify(e.detail.value))
- // this.saveData();
- },
- // 保存
- save() {
- this.saveData("0");
- },
- // 保存
- // buttonType 0-保存
- saveData(buttonType) {
- const params = {
- workorderid: this.wid,
- cusname: this.formData.name, // 姓名
- cussex: this.formData.gender, // 性别
- cusphone: this.formData.callerNumber, // 电话
- title: this.formData.workOrderTitle, // 标题
- content: this.formData.callContent, // 来电内容
- workcontent: this.formData.workOrderContent, // 工单内容
- // files: $("#file").val(), //(多个用英文逗号,隔开)
- files: "",
- sourcearea: this.formData.sourcearea, // 事发区域
- township: this.formData.township, // 乡镇
- village: this.formData.village, // 村
- sourceaddress: this.formData.sourceaddress, // 详细地址
- source: this.formData.source, // 来源
- splituser: this.formData.leaderCharge, // 分管领导
- phonetype: this.formData.phoneType, // 电话类别
- isresult: this.formData.processingMethod, //=(0转办1直办)
- // business: this.formData.threeWayCall, // 三方通话
- business: "0",
- result: this.formData.result, // 办理内容
- keys: this.formData.responseCategoryId, // 反映类别
- type: this.formData.workOrderType, // 类型
- isprotect: this.formData.numberSecurityLevel, //=(0普通1保密)
- level: this.formData.emergencyLevel, //=(1普通2紧急)
- issubmit: 0, //=(0保存1保存并提交)
- token: uni.getStorageSync("token"),
- }
- this.$http
- .post("/WorkOrder/EditWorkOrder", params)
- .then((response) => {
- if (response.state.toLowerCase() === "success") {
- if (String(buttonType) === "0") {
- this.returnPage()
- }
- }
- })
- .catch((e) => {
- console.log(e)
- })
- },
- //获取详情
- getDetail(type) {
- let params = {
- type: type,
- workorderid: this.wid,
- token: uni.getStorageSync("token"),
- }
- this.$http.get("/WorkOrder/GetWorkOrderNew", params).then((response) => {
- if (response.state.toLowerCase() === "success") {
- let data = response.data.data[0];
- this.formData.name = data.F_CusName; // 姓名
- this.formData.gender = data.F_CusSex; // 性别
- this.formData.callerNumber = data.F_CusPhone; // 电话
- this.formData.workOrderTitle = data.F_ComTitle; // 标题
- this.formData.callContent = data.F_ComContent; // 来电内容
- this.formData.workOrderContent = data.F_Content == null ? data.F_ComContent : data.F_Content; // 工单内容
- // files: $("#file").val(), //(多个用英文逗号,隔开)
- // this.formData.threeWayCall = data.F_Business, // 三方通话
- this.formData.sourceaddress = data.F_SourceAddress, // 详细地址
- this.formData.result = data.F_Result; // 办理内容
- this.formData.responseCategoryId = data.F_Key; // 反映类别
- this.formData.responseCategory = data.KeyName; // 反映类别名称
- this.isDisplay.urgentOrOrdinary = String(data.F_Level) === "2" ? false : true // 是否显示紧急办理时间
- // 处理方式(0转办1直办)
- if (String(data.F_IsResult) === "0") {
- this.radioChecked.processingMethod = true;
- this.formData.processingMethod = 0;
- } else if (Sting(data.F_IsResult) === "1") {
- this.radioChecked.processingMethod = false;
- this.formData.processingMethod = 1;
- }
- // 性别(0男1女)
- if (String(data.F_CusSex) === "0") {
- this.radioChecked.gender = true;
- this.formData.gender = 0;
- } else if (String(data.F_CusSex) === "1") {
- this.formData.gender = 1;
- }
- // 号码密级(0普通1保密)
- if (String(data.F_IsProtect) === "0") {
- this.radioChecked.numberSecurityLevel = true;
- this.formData.numberSecurityLevel = 0;
- } else if (String(data.F_IsProtect) === "1") {
- this.radioChecked.numberSecurityLevel = false;
- this.formData.numberSecurityLevel = 1;
- }
- // 来源
- this.sourceListData.forEach((e,i) => {
- if (String(e.F_ValueId) === String(data.F_InfoSource)) {
- this.pickerIndex.indexSource = i;
- this.formData.source = data.F_InfoSource;
- }
- });
- // 咨询
- this.typeListData.forEach((e,i) => {
- if (String(e.F_ValueId) === String(data.F_InfoType)) {
- this.pickerIndex.indexType = i;
- this.formData.workOrderType = data.F_InfoType;
- }
- });
- // 紧急程度
- this.emergencyLevelListData.forEach((e,i) => {
- if (String(e.value) === String(data.F_Level)) {
- this.pickerIndex.indexEmergencyLevel = i;
- this.formData.emergencyLevel = data.F_Level;
- }
- });
- // 电话类别
- this.phoneTypeListData.forEach((e,i) => {
- if (String(e.text) === String(data.F_PhoneType)) {
- this.pickerIndex.indexPhoneType = i;
- this.formData.phoneType = data.F_PhoneType;
- }
- });
- // 分管领导
- this.leaderChargeListData.forEach((e,i) => {
- if (String(e.text) === String(data.F_SplitUser)) {
- this.pickerIndex.indexLeaderCharge = i;
- this.formData.leaderCharge = data.F_SplitUser;
- }
- });
- // 事发区域
- this.sourceareaListData.forEach((e,i) => {
- if (String(e.F_AreaId) === String(data.F_SourceArea)) {
- this.pickerIndex.indexSourcearea = i;
- this.formData.sourcearea = data.F_SourceArea;
- }
- });
- // 乡镇
- this.townshipListData.forEach((e,i) => {
- if (String(e.F_AreaId) === String(data.F_Township)) {
- this.pickerIndex.indexTownship = i;
- this.formData.township = data.F_Township;
- }
- });
- // 村
- this.villageListData.forEach((e,i) => {
- if (String(e.F_AreaId) === String(data.F_Village)) {
- this.pickerIndex.indexVillage = i;
- this.formData.village = data.F_Village;
- }
- });
- // visittype: $("#visittype").val(), // 回访方式
- }
- }).catch((e) => {
- console.log(e);
- })
- },
- // 获取数据字典
- getDictionaryData(dictionaryId) {
- const params = {
- id: dictionaryId,
- token: uni.getStorageSync("token"),
- }
- this.$http
- .get("/Dictionary/GetDicValueListById", params)
- .then((response) => {
- if (response.state.toLowerCase() === "success") {
- let data = response.data;
- if (String(dictionaryId) === "1") {
- // 来源数据
- this.sourceListData = data;
- } else if (String(dictionaryId) === "2") {
- // 类型数据
- this.typeListData = data;
- } else if (String(dictionaryId) === "2498") {
- // 电话类别
- this.phoneTypeListData = data;
- }
- }
- })
- .catch((e) => {
- console.log(e)
- })
- },
- // 获取事发区域
- getSourceareaData() {
- let params = {
- token: uni.getStorageSync("token"),
- }
- this.$http
- .get("Area/GetAreaListById", params)
- .then((response) => {
- if (response.state.toLowerCase() === "success") {
- let data = response.data
- data.forEach((element, index) => {
- if (element.F_AreaName === "市区") {
- data.splice(index, 1)
- }
- })
- this.sourceareaListData = data
- }
- })
- .catch((e) => {
- console.log(e)
- })
- },
- /**
- * 获取乡镇/村
- * @param {Number} parentid 父id
- * @param {String} type "1"-乡镇,"2"-村
- */
- getTownshipVillageData(parentid, type) {
- let params = {
- token: uni.getStorageSync("token"),
- parentid: parentid,
- }
- this.$http
- .get("Area/GetAreaChildren", params)
- .then((response) => {
- if (response.state.toLowerCase() === "success") {
- let data = response.data
- if (type === "1") {
- this.townshipListData = data;
- } else if (type === "2") {
- this.villageListData = data;
- }
- }
- })
- .catch((e) => {
- console.log(e)
- })
- },
- // 获取反映类别
- getReflectCategoryList() {
- let params = {
- token: uni.getStorageSync("token"),
- }
- this.$http
- .get("Dictionary/GetKeyListNew", params)
- .then((response) => {
- if (response.state.toLowerCase() === "success") {
- let data = response.data
- this.reflectCategoryListData = data
- }
- })
- .catch((e) => {
- console.log(e)
- })
- },
- // 远程加载数据 返回一个对象,{value: 输入框值, callback: 回调函数}
- getReflectCategoryData(e) {
- console.log("e", e)
- this.formData.responseCategory = e.value
- if (!e.value) {
- e.callback(this.reflectCategoryListData)
- } else {
- let data = []
- this.reflectCategoryListData.forEach((item) => {
- if (item.names.indexOf(e.value) > -1) {
- data.push(item)
- }
- })
- e.callback(data)
- }
- },
-
- selectReflectCategory(value) {
- this.formData.responseCategory = value.name
- this.formData.responseCategoryId = value.id
- },
- bindPickerChange: function (e) {
- console.log("picker发送选择改变,携带值为", e.target.value)
- this.index = e.target.value
- },
- bindPickerChangeSource: function (e) {
- this.pickerIndex.indexSource = e.target.value;
- this.formData.source = this.sourceListData[e.target.value].F_ValueId;
- if (String(this.formData.source) === "4") {
- this.isDisplay.leaderCharge = true
- this.isDisplay.phoneType = false
- } else if (String(this.formData.source) === "1") {
- this.isDisplay.phoneType = true
- this.isDisplay.leaderCharge = false
- } else {
- this.isDisplay.phoneType = false
- this.isDisplay.leaderCharge = false
- }
- },
- bindPickerChangeType: function (e) {
- this.pickerIndex.indexType = e.target.value;
- this.formData.workOrderType = this.typeListData[e.target.value].F_ValueId
- },
- bindPickerChangeEmergencyLevel: function (e) {
- this.pickerIndex.indexEmergencyLevel = e.target.value;
- this.formData.emergencyLevel = this.emergencyLevelListData[e.target.value].value
- },
- bindPickerChangePhoneType: function (e) {
- this.pickerIndex.indexPhoneType = e.target.value;
- this.formData.phoneType = this.phoneTypeListData[e.target.value].F_ValueId
- },
- bindPickerChangeLeaderCharge: function (e) {
- this.pickerIndex.indexLeaderCharge = e.target.value;
- this.formData.leaderCharge = this.leaderChargeListData[e.target.value].text
- },
- bindPickerChangeSourcearea: function (e) {
- this.pickerIndex.indexSourcearea = e.target.value;
- this.formData.sourcearea = this.sourceareaListData[e.target.value].F_AreaId
- this.getTownshipVillageData(this.formData.sourcearea, "1")
- },
- bindPickerChangeTownship: function (e) {
- this.pickerIndex.indexTownship = e.target.value;
- this.formData.township = this.townshipListData[e.target.value].F_AreaId
- this.getTownshipVillageData(this.formData.township, "2")
- },
- bindPickerChangeVillage: function (e) {
- this.pickerIndex.indexVillage = e.target.value;
- this.formData.village = this.villageListData[e.target.value].F_AreaId
- },
- bindChangeProcessingMethod: function (e) {
- if (String(e.detail.value) === "0") {
- this.isDisplay.result = false;
- } else if (String(e.detail.value) === "1") {
- this.isDisplay.result = true;
- }
- },
- //办理时限change
- bindPickerChangeProcessingTimeLimit: function (e) {
- this.pickerIndex.indexProcessingTimeLimit = e.target.value
- this.formData.processingTimeLimit = this.processingTimeLimitListData[e.target.value].value
- },
- // 审核通过
- approved() {
- this.saveData();
- this.$refs.popup.open()
- },
- /**
- * 点击取消按钮触发
- * @param {Object} done
- */
- close() {
- // TODO 做一些其他的事情,before-close 为true的情况下,手动执行 close 才会关闭对话框
- // ...
- this.$refs.popup.close()
- },
- /**
- * 点击确认按钮触发
- * @param {Object} done
- * @param {Object} value
- */
- confirm() {
- this.assign()
- // TODO 做一些其他的事情,手动执行 close 才会关闭对话框
- // ...
- this.$refs.popup.close()
- },
- // 获取单位
- getDeptList() {
- let params = {
- iscbdw: 2,
- token: uni.getStorageSync("token"),
- }
- this.$http
- .get("/Department/GetDeptList", params)
- .then((response) => {
- if (response.state.toLowerCase() === "success") {
- let data = response.data
- this.deptListData = data
- }
- })
- .catch((e) => {
- console.log(e)
- })
- },
- // 远程加载数据 返回一个对象,{value: 输入框值, callback: 回调函数}
- getDeptData(e) {
- console.log("e", e)
- this.formData.deptName = e.value
- if (!e.value) {
- e.callback(this.deptListData)
- } else {
- let data = []
- this.deptListData.forEach((item) => {
- if (item.F_DeptName.indexOf(e.value) > -1) {
- data.push(item)
- }
- })
- e.callback(data)
- }
- },
- selectDept(value) {
- this.formData.deptName = value.F_DeptName
- this.formData.deptId = value.F_DeptId
- },
- DatePicker(type) {
- //显示
- this.type = type
- this.showPicker = true
- this.formData.emergencyTimeFrame = this[type]
- },
- ed(e) {
- //选择
- this.showPicker = false
- if (e) {
- //选择的值
- console.log("value => " + e.value)
- //原始的Date对象
- console.log("date => " + e.date)
- this.timeFormat(e.date)
- }
- },
- timeFormat(date) {
- let year = date.getFullYear()
- let month = date.getMonth() + 1
- month = month < 10 ? "0" + month : month
- let day = date.getDate()
- day = day < 10 ? "0" + day : day
- let hours = date.getHours()
- hours = hours < 10 ? "0" + hours : hours
- let minute = date.getMinutes()
- minute = minute < 10 ? "0" + minute : minute
- let seconds = date.getSeconds()
- seconds = seconds < 10 ? "0" + seconds : seconds
- let time = `${year}-${month}-${day} ${hours}:${minute}:${seconds}`
- this.formData.emergencyTimeFrame = time
- },
- // 转派
- assign() {
- if (String(this.formData.numberSecurityLevel) === "1") {
- this.formData.schedulingOpinions = `请于1小时内与来电人取得联系(匿名除外),并于${this.formData.processingTimeLimit}个工作日内内将办理情况反馈来电人,并将办理结果报市长便民公开电话受理中心,同时做好来电人信息保密工作。(若超期将进行通报;若无故不回复,将转交市委市政府督查局。)`
- } else if (String(this.formData.numberSecurityLevel) === "2" ) {
- this.formData.schedulingOpinions = `请于1小时内与来电人取得联系(匿名除外),并于${this.formData.emergencyTimeFrame}个工作日内内将办理情况反馈来电人,并将办理结果报市长便民公开电话受理中心,同时做好来电人信息保密工作。(若超期将进行通报;若无故不回复,将转交市委市政府督查局。)`
- }
- const params = {
- workorderid: this.wid,
- state: 1, // 保存并交办
- maindeptid: this.formData.deptId, // 承办单位
- limittime: this.formData.processingTimeLimit, // 办理时限
- limittimes: this.formData.emergencyTimeFrame, // 紧急办理时限
- assignedopinion: this.formData.schedulingOpinions, //调度意见
- token: uni.getStorageSync("token"),
- }
- this.$http
- .post("/WorkOrder/AssignWorkOrderNew", params)
- .then((response) => {
- if (response.state.toLowerCase() === "success") {
- this.returnPage()
- }
- })
- .catch((e) => {
- console.log(e)
- })
- },
- // 返回列表页
- returnPage() {
- uni.$emit("updateList",{});
- uni.navigateBack({
- delta: 2,
- })
- },
- },
- }
- </script>
- <style lang="scss">
- .wrapper {
- padding: 10px 15px;
- .form {
- .uni-form-item {
- margin: 10px 0 0 0;
- padding: 0 0 5px 0;
- border-bottom: 1px solid #bfbfbf;
- color: #525252;
- radio-group label radio {
- transform: scale(0.7);
- }
- .title {
- font-weight: 700;
- color: #000;
- }
- .bjx-inputs {
- .bjx-select {
- .data {
- .item-hide {
- .item-text {
- white-space: normal
- }
- }
- }
- }
- }
- }
- .uni-btn-v {
- margin: 15px 0 0 0;
- text-align: center;
- .mini-btn {
- margin-right: 3px;
- color: #fff;
- background: #1e90ff;
- }
- }
- }
- }
- </style>
|