Нет описания

AddWorkOrder.js 37KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185
  1. /**
  2. * 手工制单
  3. * */
  4. var CallID = helper.request.queryString("CallID");
  5. var KHid;
  6. var UserCode;
  7. var timestamp = Date.parse(new Date());
  8. //通话中执行变化
  9. var timer, n = 0;
  10. //初始化时间
  11. laydate.render({
  12. elem: '#der_time',
  13. theme: '#1ab394',
  14. calendar: true
  15. });
  16. //**所有input去掉自动填充
  17. $(function() {   
  18. if($.cookie("userRoleCode") == "DQJL" || $.cookie("userRoleCode") == "FGSJL" || $.cookie("userRoleCode") == "YWY") {
  19. // $(".codeDiv").remove();
  20. $('.salesman_order').remove();
  21. $("#save_vsv").hide();
  22. $("#save_order").show();
  23. }
  24. $('input:not([autocomplete]),textarea:not([autocomplete]),select:not([autocomplete])').attr('autocomplete', 'off'); 
  25. });
  26. // 立即处理
  27. $('#order_isover').find('input[type="radio"]').on('change', function() {
  28. if($(this).val() === '1') {
  29. $('#order_transfer_depts').hide();
  30. } else {
  31. $('#order_transfer_depts').show();
  32. }
  33. });
  34. function clearInter() {
  35. clearInterval(timer);
  36. }
  37. //获取接收人员
  38. function getReceiveUser(obj, deptid) {
  39. $.ajax({
  40. url: huayi.config.callcenter_url + 'UserAccount/GetDeptUserList',
  41. type: 'get',
  42. data: {
  43. deptid: deptid,
  44. token: $.cookie("token")
  45. },
  46. dataType: "json",
  47. async: true,
  48. success: function(res) {
  49. obj.empty();
  50. if(res.state.toLowerCase() === "success") {
  51. res = res.data;
  52. if(res && res.length > 0) {
  53. obj.append('<option value="0">请选择接收人</option>');
  54. res.forEach(function(v, i) {
  55. obj.append('<option value="' + v.F_UserId + '" data-code="' + v.F_UserCode + '">' + v.F_UserName + '(' + v.F_UserCode + ')</option>');
  56. });
  57. obj.selectpicker('refresh');
  58. }
  59. }
  60. },
  61. });
  62. }
  63. var callId = helper.request.queryString("cid");
  64. $(function() {
  65. var cphone = helper.request.queryString("cphone");
  66. var cCustomerName = decodeURIComponent(helper.request.queryString("cCustomerName"));
  67. if(cphone){
  68. $('#kehudian').val(cphone)
  69. }
  70. if(cCustomerName){
  71. $('#kehuxing').val(cCustomerName);
  72. }
  73. helper.getDropList.getlistDropByDic($('#order_handle'), 'YWLX');
  74. $('#save_order').click(function() { //ID为test的元素点击时
  75. orderSave();
  76. });
  77. // 指派按钮
  78. $('#save_vsv').click(function() { //ID为test的元素点击时
  79. dealWorkOrder();
  80. });
  81. // 完结按钮
  82. $('#save_ssss').click(function() { //ID为test的元素点击时
  83. buttonend();
  84. });
  85. // 来电保存客户
  86. $('#save').click(function() { //ID为test的元素点击时
  87. if(!regexs.userNameReg.test($.trim($('#head_form_custom').val()))) {
  88. layer.confirm('请输入有效的客户姓名!', {
  89. icon: 2,
  90. btn: ['确定']
  91. });
  92. return;
  93. }
  94. screen();
  95. });
  96. $('#empty').click(function() { //ID为test的元素点击时
  97. cleanOrde();
  98. });
  99. });
  100. //新建工单 保存
  101. function orderSave() {
  102. typePro();
  103. $.ajax({
  104. type:"post",
  105. url:huayi.config.callcenter_url + 'WorkOrderNew/Add',
  106. async:true,
  107. beforeSend: function() { //触发ajax请求开始时执行
  108. $('#save_order').attr("disabled", true);
  109. $('#save_order').text('创建中...');
  110. },
  111. data:{
  112. // orderid: oid, //否 strubg 工单ID
  113. F_Source: $('#godanlx').val(), //
  114. // F_CompanyName: $('#order_company').val(),// 公司名称
  115. F_Type: $('#order_isover').find('input[type="radio"]:checked').val(), //工单类型
  116. //公共字段
  117. F_CusName: $('#kehuxing').val(), //客户姓名
  118. F_CusPhone: $('#kehudian').val(), //客户电话
  119. F_CompanyName: $('#gonsi').val(), //公司名称
  120. F_IncidentProvince: $('#sheng').val(), //string 省
  121. F_IncidentCity: $('#shi').val(), // 市
  122. F_IncidentCountry: $('#quxian').val(), //区/县
  123. F_IncidentTownship: $('#xiang').val(), //乡
  124. F_IncidentDetailed: $('#xiangxi').val(), //详细地址
  125. F_Description: $('#reception').val(), //问题描述
  126. //咨询模块
  127. F_QuestionType: catt, //问题类别
  128. F_TS_Category: comdi, //产品名称
  129. F_ZX_Quantity: stion, //问题数量
  130. F_SalesBase: coint, //销售基地
  131. //投诉模块
  132. F_BatchNumber: shengch, //生产批号
  133. F_TS_Formula: $('#formula').val(), //配方
  134. F_TS_Quantity: $('#quantity').val(), //问题数量(吨)
  135. F_TS_Level: $('#level').val(), //重要界别
  136. F_CustomerID: $('#number').val(), //客户编号
  137. F_Salesman: $('#salesman').val(), //业务员
  138. F_SalesPhone: $('#telephone').val(), //电话
  139. F_AreaName: $('#chdaqu').val(), //大区
  140. F_BranchName: $('#chfen').val(), //分公司
  141. F_Brands: $('#manage').val(), //经营品牌
  142. F_WorkerBrand: $('#about_brand').val(), //品牌
  143. F_CompanyName: $('#F_CompanyName').val(), //公司名称
  144. F_MaterialID: $('#Code').val(), //客户编号
  145. F_CustomerID: $('#number').val(), //客户编号
  146. F_Model: $('#model_number').val(), //型号
  147. F_Specs: $('#specifications').val(), //规格
  148. F_Level1: $('#category1').val(), //一级分类
  149. F_Level2: $('#category2').val(), //二级分类
  150. F_Level3: $('#category3').val(), //三级分类
  151. F_Brand: $('#brand_name').val(), //品牌
  152. F_MaterialEffect: $('#efficiency').val(), //复合肥肥效
  153. F_Pipeline: $('#product_line').val(), //产品线
  154. F_Craft: $('#process').val(), //工艺
  155. F_Formula: $('#enter_formula').val(), //配方
  156. //抽检模块
  157. // F_CusName: $('#kxing').val(),//客户姓名
  158. // F_CusPhone: $('#kdian').val(),//客户电话
  159. // F_QuestionType:catt, //问题类别
  160. F_CJ_Time: $('#der_time').val(), //抽检时间
  161. F_CJ_Level: $('#der_level').val(), //抽检级别
  162. F_CJ_Unit: $('#der_Company').val(), //抽检单位
  163. F_CJ_TestUnit: $('#der_Test').val(), //化验单位
  164. F_CJ_Tonnage: $('#der_Tonnage').val(), //抽检吨数
  165. F_CJ_BagNo: $('#der_Ton').val(), //抽检袋数
  166. F_CJ_Outlay: $('#der_Amount').val(), //公关费用金额
  167. overtime: $("#dddd").find('input[type="radio"]:checked').val(), //超时时限
  168. clbm: $("#clbm").val(), //否 指派部门
  169. clid: $("#clid").val(), //否 接受人
  170. F_Files: proimglist && proimglist.join(','), //附件
  171. sms: $("#overtime").find('input[type="radio"]:checked').val(), //是否发送短信
  172. token: $.cookie("token")
  173. },
  174. success:function(result){
  175. result = $.parseJSON(result);
  176. if(result.state.toLowerCase() == "success") {
  177. cleanOrderForm();
  178. // top.workcount();
  179. layer.msg("保存成功");
  180. window.location.reload();
  181. $('#save_order').attr("disabled", false);
  182. $('#save_order').text('创建');
  183. }else{
  184. $('#save_order').attr("disabled", false);
  185. $('#save_order').text('创建');
  186. }
  187. }
  188. });
  189. }
  190. //完结按钮
  191. function buttonend(oid) {
  192. typePro();
  193. // var ltype = $("input[name='ltype']:checked").val();
  194. var isDetail = helper.request.queryString("isDetail"); //是否是详情页面的处理
  195. $.ajax({
  196. type:"post",
  197. url:huayi.config.callcenter_url + 'WorkOrderNew/CreatOver',
  198. async:true,
  199. beforeSend: function() { //触发ajax请求开始时执行
  200. $('#save_ssss').attr("disabled", true);
  201. $('#save_ssss').text('完结中...');
  202. },
  203. data:{
  204. orderid: oid, //否 strubg 工单ID
  205. F_Source: $('#godanlx').val(), //
  206. // F_CompanyName: $('#order_company').val(),// 公司名称
  207. F_Type: $('#order_isover').find('input[type="radio"]:checked').val(), //工单类型
  208. //公共字段
  209. F_CusName: $('#kehuxing').val(), //客户姓名
  210. F_CusPhone: $('#kehudian').val(), //客户电话
  211. F_CompanyName: $('#gonsi').val(), //公司名称
  212. F_IncidentProvince: $('#sheng').val(), //string 省
  213. F_IncidentCity: $('#shi').val(), // 市
  214. F_IncidentCountry: $('#quxian').val(), //区/县
  215. F_IncidentTownship: $('#xiang').val(), //乡
  216. F_IncidentDetailed: $('#xiangxi').val(), //详细地址
  217. F_Description: $('#reception').val(), //问题描述
  218. //咨询模块
  219. F_QuestionType: catt, //问题类别
  220. F_TS_Category: comdi, //产品名称
  221. F_ZX_Quantity: $('#Product_Quantity').val(), //问题数量
  222. F_SalesBase: coint, //销售基地
  223. //投诉模块
  224. F_BatchNumber: shengch, //生产批号
  225. F_TS_Formula: $('#formula').val(), //配方
  226. F_TS_Quantity: $('#quantity').val(), //问题数量(吨)
  227. F_TS_Level: $('#level').val(), //重要界别
  228. F_CustomerID: $('#number').val(), //客户编号
  229. F_Salesman: $('#salesman').val(), //业务员
  230. F_SalesPhone: $('#telephone').val(), //电话
  231. F_AreaName: $('#chdaqu').val(), //大区
  232. F_BranchName: $('#chfen').val(), //分公司
  233. F_Brands: $('#manage').val(), //经营品牌
  234. F_MaterialID: $('#Code').val(), //客户编号
  235. F_CustomerID: $('#number').val(), //客户编号
  236. F_Model: $('#model_number').val(), //型号
  237. F_Specs: $('#specifications').val(), //规格
  238. F_Level1: $('#category1').val(), //一级分类
  239. F_Level2: $('#category2').val(), //二级分类
  240. F_Level3: $('#category3').val(), //三级分类
  241. F_Brand: $('#brand_name').val(), //品牌
  242. F_MaterialEffect: $('#efficiency').val(), //复合肥肥效
  243. F_Pipeline: $('#product_line').val(), //产品线
  244. F_Craft: $('#process').val(), //工艺
  245. F_Formula: $('#enter_formula').val(), //配方
  246. F_WorkerBrand: $('#about_brand').val(), //品牌
  247. //抽检模块
  248. // F_CusName: $('#kxing').val(),//客户姓名
  249. // F_CusPhone: $('#kdian').val(),//客户电话
  250. // F_QuestionType:catt, //问题类别
  251. F_CJ_Time: $('#der_time').val(), //抽检时间
  252. F_CJ_Level: $('#der_level').val(), //抽检级别
  253. F_CJ_Unit: $('#der_Company').val(), //抽检单位
  254. F_CJ_TestUnit: $('#der_Test').val(), //化验单位
  255. F_CJ_Tonnage: $('#der_Tonnage').val(), //抽检吨数
  256. F_CJ_BagNo: $('#der_Ton').val(), //抽检袋数
  257. F_CJ_Outlay: $('#der_Amount').val(), //公关费用金额
  258. overtime: $("#dddd").find('input[type="radio"]:checked').val(), //超时时限
  259. clbm: $("#clbm").val(), //否 指派部门
  260. clid: $("#clid").val(), //否 接受人
  261. sms: $("#overtime").find('input[type="radio"]:checked').val(), //是否发送短信
  262. token: $.cookie("token")
  263. },
  264. success:function(result){
  265. result = $.parseJSON(result);
  266. if(result.state.toLowerCase() == "success") {
  267. $('#save_ssss').attr("disabled", false);
  268. $('#save_ssss').text('完结');
  269. // parent.parent.layer.msg("工单完结成功!");
  270. cleanOrderForm();
  271. layer.msg("完结成功");
  272. // top.workcount();
  273. }else{
  274. $('#save_ssss').attr("disabled", false);
  275. $('#save_ssss').text('完结');
  276. }
  277. }
  278. });
  279. }
  280. //投诉和抽检客户 物料编号清空
  281. function emptyct() {
  282. $('#number').val('');
  283. $('#salesman').val('');
  284. $('#telephone').val('');
  285. $('#District').val('');
  286. $('#Branice').val('');
  287. $('#manage').val('');
  288. $('#Code').val('');
  289. $('#material_name').val('');
  290. $('#model_number').val('');
  291. $('#specifications').val('');
  292. $('#category1').val('');
  293. $('#category2').val('');
  294. $('#category3').val('');
  295. $('#brand_name').val('');
  296. $('#efficiency').val('');
  297. $('#product_line').val('');
  298. $('#process').val('');
  299. $('#enter_formula').val('');
  300. }
  301. var catt; //问题类别
  302. var cttt; //投诉问题类别
  303. var comdi; //产品名称
  304. var coint; //销售基地
  305. var stion; //问题数量
  306. var shengch; //生产批次号
  307. var jyppai;
  308. var daqu;
  309. var fengo;
  310. var orderIsover;
  311. function typePro() {
  312. orderIsover = $('input:radio[name="type"]:checked').val();
  313. if(orderIsover === '1') {
  314. debugger
  315. catt = $('#category').val(); //问题类别
  316. comdi = $('#ProductName').val(); //产品名称
  317. stion = $('#Product_Quantity').val(); //问题数量
  318. coint = $('#xiaoshou').val(); //销售基地
  319. daqu = '';
  320. fengo = '';
  321. jyppai = '';
  322. cttt = '';
  323. shengch = '';
  324. emptyct()
  325. $('#wlbm').hide();
  326. $('#wlmcc').hide();
  327. $('#clie').hide();
  328. $('#mate').hide();
  329. } else if(orderIsover === '2') {
  330. // daqu=$('#chdaqu').val();
  331. // fengo=$('#chfen').val();
  332. jyppai = $('#brand_name').val();
  333. comdi = $('#product_name').val(); //产品名称
  334. cttt = $("#cate").val();
  335. // if($("#catego").val()){
  336. // cttt = $("#cat").val()+"|"+$("#catego").val();
  337. // if($("#cate").val()){
  338. // cttt = $("#cat").val()+"|"+$("#catego").val()+"|"+$("#cate").val();
  339. // }
  340. // }
  341. catt = $("#cate").val();
  342. shengch = $('#Batch_number').val(); //生产批次号
  343. stion = $('#quantity').val(); //问题数量
  344. coint = $('#Sales_base').val(); //销售基地
  345. } else if(orderIsover === '3') {
  346. // daqu=$('#District').val();
  347. // fengo=$('#Branice').val();
  348. jyppai = $('#brand_name').val();
  349. shengch = $('#batch_num').val(); //生产批次号
  350. catt = $('#chou_wtlb').val();
  351. // cttt=$('#chou_wtlb').val();
  352. comdi = '';
  353. coint = '';
  354. stion = '';
  355. } else if(orderIsover === '4') {
  356. catt = $('#cateq').val(); //问题类别
  357. comdi = $('#Produ_ctName').val(); //产品名称
  358. stion = $('#Product_Quan').val(); //问题数量
  359. coint = $('#xiaosh').val(); //销售基地
  360. daqu = '';
  361. fengo = '';
  362. jyppai = '';
  363. cttt = '';
  364. shengch = '';
  365. emptyct()
  366. $('#wlbm').hide();
  367. $('#wlmcc').hide();
  368. $('#clie').hide();
  369. $('#mate').hide();
  370. // alert(catt)
  371. }
  372. }
  373. // 指派按钮
  374. function dealWorkOrder(oid) {
  375. typePro();
  376. $.ajax({
  377. type:"post",
  378. url:huayi.config.callcenter_url + 'WorkOrderNew/Createass',
  379. async:true,
  380. beforeSend: function() { //触发ajax请求开始时执行
  381. $('#save_vsv').attr("disabled", true);
  382. $('#save_vsv').text('指派中...');
  383. },
  384. data:{
  385. orderid: oid, //否 strubg 工单ID
  386. F_Source: $('#godanlx').val(), //
  387. // F_CompanyName: $('#order_company').val(),// 公司名称
  388. F_Type: $('#order_isover').find('input[type="radio"]:checked').val(), //工单类型
  389. //公共字段
  390. F_CusName: $('#kehuxing').val(), //客户姓名
  391. F_CusPhone: $('#kehudian').val(), //客户电话
  392. F_CompanyName: $('#gonsi').val(), //公司名称
  393. F_IncidentProvince: $('#sheng').val(), //string 省
  394. F_IncidentCity: $('#shi').val(), // 市
  395. F_IncidentCountry: $('#quxian').val(), //区/县
  396. F_IncidentTownship: $('#xiang').val(), //乡
  397. F_IncidentDetailed: $('#xiangxi').val(), //详细地址
  398. F_Description: $('#reception').val(), //问题描述
  399. //咨询模块
  400. F_QuestionType: catt, //问题类别
  401. F_TS_Category: comdi, //产品名称
  402. F_ZX_Quantity: stion, //问题数量
  403. F_SalesBase: coint, //销售基地
  404. //投诉模块
  405. F_BatchNumber: shengch, //生产批号
  406. F_TS_Formula: $('#formula').val(), //配方
  407. F_TS_Quantity: $('#quantity').val(), //问题数量(吨)
  408. F_TS_Level: $('#level').val(), //重要界别
  409. // F_SalesPhone: $('#telephone').val(),//电话
  410. F_ZX_Area: daqu, //大区
  411. F_ZX_Branch: fengo, //分公司
  412. F_Brand: jyppai, //经营品牌
  413. F_Salesman: $('#salesman').val(), //业务员
  414. F_SalesPhone: $('#telephone').val(), //电话
  415. F_AreaName: $('#chdaqu').val(), //大区
  416. F_BranchName: $('#chfen').val(), //分公司
  417. F_Brands: $('#manage').val(), //经营品牌
  418. // F_Salesman: $('#salesman').val(),//业务员
  419. F_MaterialID: $('#Code').val(), //客户编号
  420. F_CustomerID: $('#number').val(), //客户编号
  421. F_Model: $('#model_number').val(), //型号
  422. F_Specs: $('#specifications').val(), //规格
  423. F_Level1: $('#category1').val(), //一级分类
  424. F_Level2: $('#category2').val(), //二级分类
  425. F_Level3: $('#category3').val(), //三级分类
  426. // F_Brand: $('#brand_name').val(),//品牌
  427. F_MaterialEffect: $('#efficiency').val(), //复合肥肥效
  428. F_Pipeline: $('#product_line').val(), //产品线
  429. F_Craft: $('#process').val(), //工艺
  430. F_Formula: $('#enter_formula').val(), //配方
  431. F_WorkerBrand: $('#about_brand').val(), //品牌
  432. //抽检模块
  433. // F_CusName: $('#kxing').val(),//客户姓名
  434. // F_CusPhone: $('#kdian').val(),//客户电话
  435. // F_QuestionType:cttt, //问题类别
  436. F_CJ_Time: $('#der_time').val(), //抽检时间
  437. F_CJ_Level: $('#der_level').val(), //抽检级别
  438. F_CJ_Unit: $('#der_Company').val(), //抽检单位
  439. F_CJ_TestUnit: $('#der_Test').val(), //化验单位
  440. F_CJ_Tonnage: $('#der_Tonnage').val(), //抽检吨数
  441. F_CJ_BagNo: $('#der_Ton').val(), //抽检袋数
  442. F_CJ_Outlay: $('#der_Amount').val(), //公关费用金额
  443. overtime: $("#dddd").find('input[type="radio"]:checked').val(), //超时时限
  444. clbm: $("#clbm").val(), //否 指派部门
  445. clid: $("#clid").val(), //否 接受人
  446. F_Files: proimglist && proimglist.join(','), //附件
  447. sms: $("#overtime").find('input[type="radio"]:checked').val(), //是否发送短信
  448. token: $.cookie("token")
  449. },
  450. success:function(result){
  451. result = $.parseJSON(result);
  452. if(result.state.toLowerCase() == "success") {
  453. // top.workcount();
  454. $('#save_vsv').attr("disabled", false);
  455. $('#save_vsv').text('指派');
  456. cleanOrderForm();
  457. layer.msg("指派成功");
  458. setTimeout(function(){
  459. window.location.reload();
  460. },700)
  461. }else{
  462. $('#save_vsv').attr("disabled", false);
  463. $('#save_vsv').text('指派');
  464. }
  465. }
  466. });
  467. }
  468. //三级联动下拉
  469. $(document).ready(function() {
  470. var wid = helper.request.queryString("wid");
  471. LY($("#sheng")); //省
  472. XSJD($("#xiaoshou")); //销售基地
  473. XSJD($("#xiaosh")); //建议及其他销售基地
  474. XSJD($("#Sales_base")); //建议及其他销售基地
  475. ZXWTLB($("#category")); //咨询问题类别
  476. // ZXWTLB($("#categg")); //问题类别
  477. ZXCPMC($("#ProductName"));
  478. // ZXCPMC($("#ProductName"));
  479. ZXCPMC($("#product_name"));
  480. ZXCPMC($("#Produ_ctName")); //建议及其他产品名称
  481. DQ($("#District"));
  482. //投诉模块
  483. WTLB1($("#cat")); //问题类型1
  484. CPZL($("#Product_Category")); //产品名称
  485. WTLBCJ($("#chou_wtlb")); //抽检问题类型
  486. ZYJB($("#level")); //重要级别
  487. CJJP($("#der_level")); //抽检级别
  488. CJDW($("#der_Company")); //抽检单位
  489. DQQ($("#customer_comaddress")); //大区
  490. QDLX($("#customer_taxPointDes")); //添加客户渠道类型
  491. QDLX($("#channel")); //来电弹屏渠道类型
  492. XYDJ($("#customer_invoiceRange"));
  493. JYPP($("#customer_Qualification"));
  494. JYPP($("#management"));
  495. CAPI($("#customer_FinancialManager"));
  496. YFPP($("#customer_feeEx"));
  497. YFPP($("#fertilizer"));
  498. });
  499. // 客户信息里的 省/市/区/县
  500. // 咨询模块 省
  501. function LY(obj) {
  502. obj.empty();
  503. obj.append('<option selected="selected" value="">请选择</option>');
  504. $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
  505. "token": $.cookie("token"),
  506. F_Layer: 1,
  507. }, function(data) {
  508. if(data.state.toLowerCase() == "success") {
  509. var content = data.data;
  510. $(content).each(function(i, n) {
  511. $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
  512. })
  513. }
  514. })
  515. }
  516. //市
  517. function LB(obj) {
  518. obj.empty();
  519. obj.append('<option selected="selected" value="">请选择</option>');
  520. $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
  521. "token": $.cookie("token"),
  522. F_Layer: 2,
  523. F_RegionName: $('#sheng').val()
  524. }, function(data) {
  525. if(data.state.toLowerCase() == "success") {
  526. var content = data.data;
  527. $(content).each(function(i, n) {
  528. $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
  529. })
  530. }
  531. })
  532. }
  533. // 区/县
  534. function ZT(obj) {
  535. obj.empty();
  536. obj.append('<option selected="selected" value="">请选择</option>');
  537. $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
  538. "token": $.cookie("token"),
  539. F_Layer: 3,
  540. F_RegionName: $('#shi').val()
  541. }, function(data) {
  542. if(data.state.toLowerCase() == "success") {
  543. var content = data.data;
  544. $(content).each(function(i, n) {
  545. $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
  546. })
  547. }
  548. })
  549. }
  550. // 乡
  551. function XX(obj) {
  552. obj.empty();
  553. obj.append('<option selected="selected" value="">请选择</option>');
  554. $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
  555. "token": $.cookie("token"),
  556. F_Layer: 4,
  557. F_RegionName: $('#quxian').val()
  558. }, function(data) {
  559. if(data.state.toLowerCase() == "success") {
  560. var content = data.data;
  561. $(content).each(function(i, n) {
  562. $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo(obj);
  563. })
  564. }
  565. })
  566. }
  567. $('#sheng').on('change', function() {
  568. $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
  569. "token": $.cookie("token"),
  570. F_Layer: 2,
  571. F_RegionName: $('#sheng').val(),
  572. }, function(data) {
  573. if(data.state.toLowerCase() == "success") {
  574. var content = data.data;
  575. $(content).each(function(i, n) {
  576. $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#shi");
  577. })
  578. LB($("#shi"));
  579. }
  580. })
  581. });
  582. $('#shi').on('change', function() {
  583. $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
  584. "token": $.cookie("token"),
  585. F_Layer: 3,
  586. F_RegionName: $('#shi').val()
  587. }, function(data) {
  588. if(data.state.toLowerCase() == "success") {
  589. var content = data.data;
  590. $(content).each(function(i, n) {
  591. $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#quxian");
  592. })
  593. ZT($("#quxian"));
  594. }
  595. })
  596. });
  597. $('#quxian').on('change', function() {
  598. $.getJSON(huayi.config.callcenter_url + "RegionCategory/GetAllList", {
  599. "token": $.cookie("token"),
  600. F_Layer: 4,
  601. F_RegionName: $('#quxian').val()
  602. }, function(data) {
  603. if(data.state.toLowerCase() == "success") {
  604. var content = data.data;
  605. $(content).each(function(i, n) {
  606. $("<option value='" + n.F_RegionName + "'>" + n.F_RegionName + "</option>").appendTo("#xiang");
  607. })
  608. XX($('#xiang'));
  609. }
  610. })
  611. });
  612. //销售基地
  613. function XSJD(obj) {
  614. obj.empty();
  615. obj.append('<option selected="selected" value="">请选择</option>');
  616. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  617. "token": $.cookie("token"),
  618. flag: "XSJD",
  619. }, function(data) {
  620. if(data.state.toLowerCase() == "success") {
  621. var content = data.data;
  622. $(content).each(function(i, n) {
  623. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  624. })
  625. }
  626. })
  627. }
  628. //问题类别
  629. function ZXWTLB(obj) {
  630. obj.empty();
  631. obj.append('<option selected="selected" value="">请选择</option>');
  632. $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionNameType", {
  633. "token": $.cookie("token"),
  634. type: 3,
  635. // pid:0,
  636. }, function(data) {
  637. if(data.state.toLowerCase() == "success") {
  638. var content = data.data;
  639. $(content).each(function(i, n) {
  640. $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
  641. })
  642. }
  643. })
  644. }
  645. function ZXCPMC(obj) {
  646. obj.empty();
  647. obj.append('<option selected="selected" value="">请选择</option>');
  648. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  649. "token": $.cookie("token"),
  650. flag: "CPZL",
  651. }, function(data) {
  652. if(data.state.toLowerCase() == "success") {
  653. var content = data.data;
  654. $(content).each(function(i, n) {
  655. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  656. })
  657. }
  658. })
  659. }
  660. function DQ(obj) {
  661. obj.empty();
  662. obj.append('<option selected="selected" value="">请选择</option>');
  663. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  664. "token": $.cookie("token"),
  665. F_Layer: 1,
  666. }, function(data) {
  667. if(data.state.toLowerCase() == "success") {
  668. var content = data.data;
  669. $(content).each(function(i, n) {
  670. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
  671. })
  672. }
  673. })
  674. }
  675. function FENGONGSI(obj) {
  676. obj.empty();
  677. obj.append('<option selected="selected" value="">请选择</option>');
  678. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  679. "token": $.cookie("token"),
  680. F_Layer: 2,
  681. F_DeptName: $("#District").find("option:selected").text(),
  682. }, function(data) {
  683. if(data.state.toLowerCase() == "success") {
  684. var content = data.data;
  685. $(content).each(function(i, n) {
  686. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
  687. })
  688. }
  689. })
  690. }
  691. $('#District').on('change', function() {
  692. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  693. "token": $.cookie("token"),
  694. F_Layer: 2,
  695. F_DeptName: $("#District").find("option:selected").text(),
  696. }, function(data) {
  697. if(data.state.toLowerCase() == "success") {
  698. var content = data.data;
  699. $(content).each(function(i, n) {
  700. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo("#Branice");
  701. })
  702. FENGONGSI($("#Branice"));
  703. }
  704. })
  705. });
  706. //清空表单
  707. function cleanOrderForm() {
  708. // $("#lygon").val(data.F_SourceName);//工单来源
  709. // $('#gdbian').val(data.F_WorkOrderCode);// 工单编号
  710. // 咨询模块
  711. $("#category").val(''); //问题类别
  712. $("#ProductName").val(''); //产品名称
  713. $('#Product_Quantity').val(''); //问题数量
  714. $("#xiaoshou").val(''); //销售基地
  715. // 投诉模块
  716. $("#product_name").val(''); //产品名称
  717. $('#quantity').val(''); //问题数量
  718. $('#Batch_number').val(''); //生产批次
  719. $("#Sales_base").val(''); //销售基地
  720. $("#level").val(''); //重要级别
  721. $("#cat").val(''); //问题类别1
  722. $("#catego").val(''); //问题类别2
  723. $("#cate").val(''); //问题类别3
  724. $('#about_brand').val(''); //品牌
  725. // 抽检模块
  726. $("#chou_wtlb").val(''); //问题类别
  727. $("#der_level").val(''); //抽检级别
  728. $('#batch_num').val(''); //生产批次号
  729. $("#der_Company").val(''); //抽检单位
  730. $('#der_Test').val(''); //化验单位
  731. $('#der_Tonnage').val(''); //抽检吨数
  732. $('#der_Ton').val(''); //抽检袋数
  733. $('#der_Amount').val(''); //公关费用金额
  734. $('#der_time').val(''); //抽检时间
  735. // 建议及其他
  736. $("#cateq").val(''); //问题类别
  737. $("#Produ_ctName").val(''); //产品名称
  738. $('#Product_Quan').val(''); //问题数量
  739. $("#xiaosh").val(''); //销售基地
  740. // 公共模块
  741. $('#number').val(''); //客户编码
  742. $('#salesman').val(''); //业务员
  743. $('#telephone').val(''); //电话
  744. $("#chdaqu").val(''); //大区
  745. $("#chfen").val(''); //分公司
  746. $('#manage').val(''); //经营品牌
  747. //物料
  748. $('#Code').val(''); //物料编码
  749. $('#material_name').val(''); //物料名称
  750. $('#model_number').val(''); //型号
  751. $('#specifications').val(''); //规格
  752. $('#category1').val(''); //一级分类
  753. $('#category2').val(''); //二级分类
  754. $('#category3').val(''); //三级分类
  755. $('#brand_name').val(''); //品牌
  756. $('#efficiency').val(''); //复合肥肥效
  757. $('#product_line').val(''); //产品线
  758. $('#process').val(''); //工艺
  759. $('#enter_formula').val(''); //配方
  760. $('#kehuxing').val(''); //客户姓名
  761. $('#kehudian').val(''); //客户电话
  762. $('#gonsi').val(''), //公司名称
  763. $("#sheng").val(''); // 省
  764. $("#shi").val(''); //市
  765. $("#quxian").val(''); //区县
  766. $("#xiang").val(''); //乡
  767. $("#xiangxi").val(''); //详细
  768. $('#reception').val(''); //问题描述
  769. overtime: $("#dddd").find('input[type="radio"]:checked').val(''); //超时时限
  770. clbm: $("#clbmname").val(''); //否 指派部门
  771. clid: $(".select").val(''); //否 接受人
  772. sms: $("#overtime").find('input[type="radio"]:checked').val(''); //是否发送短信
  773. $("#fileList>li").remove();
  774. }
  775. //抽检问题类别
  776. function WTLBCJ(obj) {
  777. obj.empty();
  778. obj.append('<option selected="selected" value="">请选择</option>');
  779. $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
  780. "token": $.cookie("token"),
  781. type: 2,
  782. pid: 0,
  783. }, function(data) {
  784. if(data.state.toLowerCase() == "success") {
  785. var content = data.data;
  786. $(content).each(function(i, n) {
  787. $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
  788. })
  789. }
  790. })
  791. }
  792. //问题类别1
  793. function WTLB1(obj) {
  794. obj.empty();
  795. obj.append('<option selected="selected" value="">请选择</option>');
  796. $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
  797. "token": $.cookie("token"),
  798. type: 1,
  799. pid: 0,
  800. }, function(data) {
  801. if(data.state.toLowerCase() == "success") {
  802. var content = data.data;
  803. $(content).each(function(i, n) {
  804. $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
  805. })
  806. }
  807. })
  808. }
  809. //问题类别2
  810. function WTLB2(obj) {
  811. obj.empty();
  812. obj.append('<option selected="selected" value="">请选择</option>');
  813. $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
  814. "token": $.cookie("token"),
  815. type: 1,
  816. pid: $('#cat').val(),
  817. }, function(data) {
  818. if(data.state.toLowerCase() == "success") {
  819. var content = data.data;
  820. $(content).each(function(i, n) {
  821. $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
  822. })
  823. }
  824. })
  825. }
  826. // 问题类别3
  827. function WTLB3(obj) {
  828. obj.empty();
  829. obj.append('<option selected="selected" value="">请选择</option>');
  830. $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
  831. "token": $.cookie("token"),
  832. type: 1,
  833. pid: $('#catego').val(),
  834. }, function(data) {
  835. if(data.state.toLowerCase() == "success") {
  836. var content = data.data;
  837. $(content).each(function(i, n) {
  838. $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo(obj);
  839. })
  840. }
  841. })
  842. }
  843. $('#cat').on('change', function() {
  844. // alert($('#cat').val())
  845. WTLB2($("#catego")); //问题类型2
  846. // $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
  847. // "token": $.cookie("token"),
  848. // type: 1,
  849. //
  850. // pid:$('#cat').val(),
  851. // }, function (data) {
  852. // if (data.state.toLowerCase() == "success") {
  853. // var content = data.data;
  854. // $(content).each(function (i, n) {
  855. // $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo("#catego");
  856. // })
  857. //
  858. // }
  859. // })
  860. });
  861. $('#catego').on('change', function() {
  862. // alert($("#catego").val())
  863. WTLB3($("#cate")); //问题类型3
  864. // $.getJSON(huayi.config.callcenter_url + "WorkOrder/GetQuestionType", {
  865. // "token": $.cookie("token"),
  866. // type: 1,
  867. //
  868. // pid:$('#catego').val()
  869. // }, function (data) {
  870. // if (data.state.toLowerCase() == "success") {
  871. // var content = data.data;
  872. // $(content).each(function (i, n) {
  873. // $("<option value='" + n.id + "'>" + n.text + "</option>").appendTo("#cate");
  874. // })
  875. //
  876. // }
  877. // })
  878. });
  879. //产品种类
  880. function CPZL(obj) {
  881. obj.empty();
  882. obj.append('<option selected="selected" value="">请选择</option>');
  883. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  884. "token": $.cookie("token"),
  885. flag: "CPZL",
  886. }, function(data) {
  887. if(data.state.toLowerCase() == "success") {
  888. var content = data.data;
  889. $(content).each(function(i, n) {
  890. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  891. })
  892. }
  893. })
  894. }
  895. //重要界别
  896. function ZYJB(obj) {
  897. obj.empty();
  898. obj.append('<option selected="selected" value="">请选择</option>');
  899. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  900. "token": $.cookie("token"),
  901. flag: "ZYJB",
  902. }, function(data) {
  903. if(data.state.toLowerCase() == "success") {
  904. var content = data.data;
  905. $(content).each(function(i, n) {
  906. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  907. })
  908. }
  909. })
  910. }
  911. //抽检模块
  912. function CJJP(obj) {
  913. obj.empty();
  914. obj.append('<option selected="selected" value="">请选择</option>');
  915. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  916. "token": $.cookie("token"),
  917. flag: "CJJP",
  918. }, function(data) {
  919. if(data.state.toLowerCase() == "success") {
  920. var content = data.data;
  921. $(content).each(function(i, n) {
  922. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  923. })
  924. }
  925. })
  926. }
  927. function CJDW(obj) {
  928. obj.empty();
  929. obj.append('<option selected="selected" value="">请选择</option>');
  930. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  931. "token": $.cookie("token"),
  932. flag: "CJDW",
  933. }, function(data) {
  934. if(data.state.toLowerCase() == "success") {
  935. var content = data.data;
  936. $(content).each(function(i, n) {
  937. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  938. })
  939. }
  940. })
  941. }
  942. //。。。。。。。。。。。。。。。。。。。。。。。
  943. function YFPP(obj) {
  944. obj.empty();
  945. obj.append('<option selected="selected" value="">请选择</option>');
  946. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  947. "token": $.cookie("token"),
  948. flag: "YFPP",
  949. }, function(data) {
  950. if(data.state.toLowerCase() == "success") {
  951. var content = data.data;
  952. $(content).each(function(i, n) {
  953. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  954. })
  955. }
  956. })
  957. }
  958. //渠道类型
  959. function QDLX(obj) {
  960. obj.empty();
  961. obj.append('<option selected="selected" value="">请选择</option>');
  962. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  963. "token": $.cookie("token"),
  964. flag: "QDLX",
  965. }, function(data) {
  966. if(data.state.toLowerCase() == "success") {
  967. var content = data.data;
  968. $(content).each(function(i, n) {
  969. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  970. })
  971. }
  972. })
  973. }
  974. //信用等级
  975. function XYDJ(obj) {
  976. obj.empty();
  977. obj.append('<option selected="selected" value="">请选择</option>');
  978. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  979. "token": $.cookie("token"),
  980. flag: "XYDJ",
  981. }, function(data) {
  982. if(data.state.toLowerCase() == "success") {
  983. var content = data.data;
  984. $(content).each(function(i, n) {
  985. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  986. })
  987. }
  988. })
  989. }
  990. //经营品牌
  991. function JYPP(obj) {
  992. obj.empty();
  993. obj.append('<option selected="selected" value="">请选择</option>');
  994. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  995. "token": $.cookie("token"),
  996. flag: "JYPP",
  997. }, function(data) {
  998. if(data.state.toLowerCase() == "success") {
  999. var content = data.data;
  1000. $(content).each(function(i, n) {
  1001. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  1002. })
  1003. }
  1004. })
  1005. }
  1006. //产品
  1007. function CAPI(obj) {
  1008. obj.empty();
  1009. obj.append('<option selected="selected" value="">请选择</option>');
  1010. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag", {
  1011. "token": $.cookie("token"),
  1012. flag: "CAPI",
  1013. }, function(data) {
  1014. if(data.state.toLowerCase() == "success") {
  1015. var content = data.data;
  1016. $(content).each(function(i, n) {
  1017. $("<option value='" + n.F_Name + "'>" + n.F_Name + "</option>").appendTo(obj);
  1018. })
  1019. }
  1020. })
  1021. }
  1022. function DQQ(obj) {
  1023. obj.empty();
  1024. obj.append('<option selected="selected" value="">请选择</option>');
  1025. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  1026. "token": $.cookie("token"),
  1027. F_Layer: 1,
  1028. }, function(data) {
  1029. if(data.state.toLowerCase() == "success") {
  1030. var content = data.data;
  1031. $(content).each(function(i, n) {
  1032. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
  1033. })
  1034. }
  1035. })
  1036. }
  1037. function KEFENGONG(obj) {
  1038. obj.empty();
  1039. obj.append('<option selected="selected" value="">请选择</option>');
  1040. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  1041. "token": $.cookie("token"),
  1042. F_Layer: 2,
  1043. F_DeptName: $("#customer_comaddress").find("option:selected").text(),
  1044. }, function(data) {
  1045. if(data.state.toLowerCase() == "success") {
  1046. var content = data.data;
  1047. $(content).each(function(i, n) {
  1048. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
  1049. })
  1050. }
  1051. })
  1052. }
  1053. $('#customer_comaddress').on('change', function() {
  1054. $.getJSON(huayi.config.callcenter_url + "Department/GetList", {
  1055. "token": $.cookie("token"),
  1056. F_Layer: 2,
  1057. F_DeptName: $("#customer_comaddress").find("option:selected").text(),
  1058. }, function(data) {
  1059. if(data.state.toLowerCase() == "success") {
  1060. var content = data.data;
  1061. $(content).each(function(i, n) {
  1062. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo("#customer_legalName");
  1063. })
  1064. KEFENGONG($("#customer_legalName"));
  1065. }
  1066. })
  1067. });
  1068. //工单类型点选
  1069. $('.r_order_type').find('input[type="radio"]').on('change', function() {
  1070. if($(this).val() === "1") { //咨询
  1071. $('#PageArrival').show(); //receive
  1072. $('#Duration').hide();
  1073. $('#Depth').hide();
  1074. $('#Page').hide();
  1075. $('#wlbm').hide();
  1076. $('#wlmcc').hide();
  1077. $('.noSampling').show();
  1078. $('.Sampling').hide();
  1079. $("#dddd input[type=radio][value='12']").prop("checked", true);
  1080. } else if($(this).val() === "2") { //投诉
  1081. $('#PageArrival').hide(); //receive
  1082. $('#Duration').show();
  1083. $('#Depth').hide();
  1084. $('#Page').hide();
  1085. $('#wlbm').show();
  1086. $('#wlmcc').show();
  1087. $('.Sampling').hide();
  1088. $('.noSampling').show();
  1089. $("#dddd input[type=radio][value='12']").prop("checked", true);
  1090. } else if($(this).val() === "3") { //抽检
  1091. $('#PageArrival').hide(); //receive
  1092. $('#Duration').hide();
  1093. $('#Depth').show();
  1094. $('#Page').hide();
  1095. $('#wlbm').show();
  1096. $('#wlmcc').show();
  1097. $('.Sampling').show();
  1098. $('.noSampling').hide();
  1099. $("#dddd input[type=radio][value='720']").prop("checked", true);
  1100. } else if($(this).val() === "4") { //建议其他
  1101. $('#PageArrival').hide(); //receive
  1102. $('#Duration').hide();
  1103. $('#Depth').hide();
  1104. $('#Page').show();
  1105. $('#wlbm').hide();
  1106. $('#wlmcc').hide();
  1107. $('.Sampling').hide();
  1108. $('.noSampling').show();
  1109. $("#dddd input[type=radio][value='12']").prop("checked", true);
  1110. }
  1111. });
  1112. $("#customer_taxPointDes").change(function() {
  1113. if($("#customer_taxPointDes").find("option:selected").text() == "二级商") {
  1114. $("#bbb").show()
  1115. } else {
  1116. $("#bbb").hide()
  1117. }
  1118. })
  1119. $("#customer_taxPointDes").change(function() {
  1120. if($("#customer_taxPointDes").find("option:selected").text() == "种田大户") {
  1121. $("#ccc").show()
  1122. } else {
  1123. $("#ccc").hide()
  1124. }
  1125. })
  1126. $("#customer_feeEx").change(function() {
  1127. if($("#customer_feeEx").find("option:selected").text() == "其他") {
  1128. $("#ddd").show()
  1129. } else {
  1130. $("#ddd").hide()
  1131. }
  1132. })
  1133. $("#customer_Qualification").change(function() {
  1134. if($("#customer_Qualification").find("option:selected").text() == "其他") {
  1135. $("#eee").show()
  1136. } else {
  1137. $("#eee").hide()
  1138. }
  1139. })