123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
-
- @{
- ViewBag.Title = "MobileSmartDetail";
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>中联区卫问题登记</title>
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit" />
- <link href="~/Content/Scripts/plugins/element/element-ui.css" rel="stylesheet" />
- @*<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">*@
- <link href="~/Content/Scripts/plugins/form-making-advanced@1.4.4.00/dist/FormMaking.css" rel="stylesheet" />
- <!-- 引入组件库 -->
- <script src="~/Content/Scripts/jquery.min.js"></script>
- <script src="~/Content/Scripts/CookieManage.js?v=1.0"></script>
- <script src="~/Content/Scripts/vue.js"></script>
- <script src="~/Content/Scripts/plugins/element/element-ui.js"></script>
- <script src="~/Content/Scripts/plugins/form-making-advanced@1.4.4.00/dist/FormMaking.umd.js"></script>
- </head>
- <body>
-
- <div class="easyui-layout" id="fill" data-options="fit:true,border:false">
- <form id="insert_interface" method="post" class="layui-form" style="margin-top:20px">
- <div class="mui-content" style="margin:10px 10px 60px 10px;" v-loading="loading">
- <label class="layui-form-label"></label>
- <div title="填报内容表单" style="padding: 5px 10px; height: 100%; ">
- <fm-generate-form v-if="isshow" :data="jsonData" :value="editData" ref="fillitem"></fm-generate-form>
- </div>
- </div >
- </form>
- <div data-options="region:'south',border:false" style="height:50px;text-align:right; padding:5px">
- <button v-on:click="Save(0)" type="button"
- class="mui-btn mui-btn-danger"
- style="width: 100px; height: 30px; border: 1px solid #dedede; border-radius: 2px; background-color: #1E9FFF; border-color: #1E9FFF; color: #fff; margin-right: 10px ">提交</button>
- @*<button v-on:click="Save(3)" type="button" class="mui-btn mui-btn-danger" style="width: 100px; height: 30px; border: 1px solid #dedede; border-radius: 2px; background-color: #fb7e00 ">暂存</button>*@
- </div>
- </div>
- </body>
- </html>
- <script>
- $(function () {
- var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
- $('#cancel').click(function () {
- top.ZLPMS.CloseWindow(index);
- });
- var vm = new Vue({
- el: '#fill',
- data: {
- loading: true,
- activeName: '1',
- /// 表单数据
- jsonData: {},
- editData: {},
- replyjsonData: {},
- replyeditData: {},
- isshow: false,
- isreplyshow: false,
- BDMBID: "",//表单模板id
- BDXXID:"",//表单信息id
- BDNR: "",//表单内容
- BDM: "",
- ID: '@ViewBag.ID',//表单记录id
- BDXXID: '',//表单信息id
- XMMC: "",//项目名称
- },
- computed: {},
- methods: {
- init: function init() {
- var that = this;
- $.post('/SmartForm/MyRecordList', { id: '@ViewBag.ID', TBRID:-1 }, function (data) {
- that.isshow = false
- that.isreplyshow = false;
- that.BDM = data[0].BDM;
- that.BDXXID = data[0].BDXXID;
- that.XMMC = data[0].XMMC;
- that.jsonData = JSON.parse(data[0].BDNR == "" ? "{}" : data[0].BDNR);
- that.editData = JSON.parse(data[0].BDJG == "" ? "{}" : data[0].BDJG);
- that.replyjsonData = JSON.parse(data[0].BDCLNR == "" ? "{}" : data[0].BDCLNR);
- that.replyeditData = JSON.parse(data[0].BDCLJG == "" ? "{}" : data[0].BDCLJG);
- that.$nextTick(() => {
- that.isshow = true
- that.isreplyshow = true
- that.loading = false
- })
- })
- },
- //保存
- Save: function Save(type) {
- var that = this;
- that.loading = true;
- that.$refs.fillitem.getData().then(data => {
- var param = {
- BDJG: escape(JSON.stringify(data)),
- ID: that.ID,
- BDXXID: that.BDXXID,
- BZ: type == 0 ? 3 : 5,
- XMMC: that.XMMC,
- TBZT: type,
- };
- $.post("/SmartForm/UpdateRecord", param, function (data) {
- if (data.code == 200) {
- that.$message({
- message: data.msg,
- type: 'success'
- });
- setTimeout(() => {
- that.loading = false;
- that.MySmart()
- }, 1000);
- } else {
- that.loading = false;
- that.$message.error(data.msg);
- }
- })
- }).catch(e => {
- console.log(e);
- that.loading = false;
- that.$message.error("请注意必填项目!");
- })
- },
- ///返回首页
- MySmart: function MySmart(){
- top.ZLPMS.CloseWindow(index);
- } , ///返回上一页
- Beforeback: function Beforeback() {
- }
- },
- watch: {
- },
- mounted: function mounted() {
- this.init();
- }
- });
- });
- </script>
|