瀏覽代碼

修改弹窗宽度

chenrui 2 年之前
父節點
當前提交
8fc23dc789

+ 90 - 79
src/views/allocationManagement/transferOut/printStatusModal.vue

@@ -1,21 +1,32 @@
 <template>
-  <a-modal v-model="opened" :title="title" centered :maskClosable="false" :footer="null" @cancel="cancel" width="50%">
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :footer="null"
+    @cancel="cancel"
+    width="30%">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-form-model id="chooseCustom-form" ref="ruleForm" :model="form"
-        :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-        <a-form-model-item label="调拨单号:" prop="no"> <span>{{form.no}}{{form.printState=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':''}}</span>
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="调拨单号:" prop="no"> <span>{{ form.no }}{{ form.printState=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':'' }}</span>
         </a-form-model-item>
-        <a-form-model-item label="调往对象:" prop="targetName"> <span>{{form.targetName}}</span>
+        <a-form-model-item label="调往对象:" prop="targetName"> <span>{{ form.targetName }}</span>
         </a-form-model-item>
         <a-form-model-item label="调拨打印:" prop="printState">
-          <a-radio-group  v-model="form.printState">
-              <a-radio value="NO_PRINT">
-                允许打印
-              </a-radio>
-              <a-radio value="CANCEL_PRINT">
-                取消打印
-              </a-radio>
-            </a-radio-group>
+          <a-radio-group v-model="form.printState">
+            <a-radio value="NO_PRINT">
+              允许打印
+            </a-radio>
+            <a-radio value="CANCEL_PRINT">
+              取消打印
+            </a-radio>
+          </a-radio-group>
         </a-form-model-item>
         <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
           <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
@@ -28,80 +39,80 @@
 </template>
 
 <script>
-  import {
-    updateFinanceBookDetail
-  } from '@/api/financeBook.js'
-  export default {
-    name: 'PrintModal',
-    props: {
-      show: [Boolean],
-      info: {
-        type: Object,
-        default: () => {
-          return null
-        }
+import {
+  updateFinanceBookDetail
+} from '@/api/financeBook.js'
+export default {
+  name: 'PrintModal',
+  props: {
+    show: [Boolean],
+    info: {
+      type: Object,
+      default: () => {
+        return null
       }
-    },
-    data() {
-      return {
-        opened: this.show,
-        spinning: false,
-        title: '调拨打印状态',
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '调拨打印状态',
 
-        confirmLoading: false,
-        formItemLayout: {
-          labelCol: {
-            span: 6
-          },
-          wrapperCol: {
-            span: 18
-          }
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: {
+          span: 6
         },
-        form: {
-          no: undefined,
-          payerName: undefined,
-          printStatus:'',
-          id:'',
-          type:undefined
+        wrapperCol: {
+          span: 18
         }
-      }
-    },
-    methods: {
-      //  保存
-      handleSubmit() {
-       const _this = this
-       const ajax_form = {
-         id:this.form.id,
-         printStatus:this.form.printStatus  
-       }
-       _this.spinning = true
-       _this.confirmLoading = true
-       updateFinanceBookDetail(ajax_form).then(res => {
-         if (res.status == 200) {
-           _this.$message.success(res.message)
-           _this.cancel()
-           _this.spinning = false
-         } else {
-           _this.spinning = false
-         }
-         _this.confirmLoading = false
-       })
       },
-      cancel() {
-        this.opened = false
-        this.$emit('cancel')
-        this.$refs.ruleForm.resetFields()
+      form: {
+        no: undefined,
+        payerName: undefined,
+        printStatus: '',
+        id: '',
+        type: undefined
       }
-    },
-    watch: {
-      show(newValue, oldValue) {
-        this.opened = newValue
-        if (!newValue) {
-         this.cancel();
-        }else{
-           this.form = this.info
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit () {
+      const _this = this
+      const ajax_form = {
+        id: this.form.id,
+        printStatus: this.form.printStatus
+      }
+      _this.spinning = true
+      _this.confirmLoading = true
+      updateFinanceBookDetail(ajax_form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
+        _this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.cancel()
+      } else {
+        this.form = this.info
       }
     }
   }
+}
 </script>

+ 90 - 79
src/views/allocationManagement/transfersPrint/printModal.vue

@@ -1,98 +1,109 @@
 <template>
-  <a-modal v-model="opened" :title="title" centered :maskClosable="false" :footer="null" @cancel="cancel" width="50%">
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :footer="null"
+    @cancel="cancel"
+    width="30%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div>如需将打印状态退至【暂不打印】,请点击下方按钮</div>
-     <a-form-model id="chooseCustom-form" ref="ruleForm" :model="form"
-       :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-       <a-form-model-item label="调拨单号:" prop="no"> <span>{{form.no}}{{form.printState=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':''}}</span>
-       </a-form-model-item>
-       <a-form-model-item label="调往对象:" prop="targetName"> <span>{{form.targetName}}</span>
-       </a-form-model-item>
-       <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
-         <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
-         <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">暂不打印
-         </a-button>
-       </a-form-model-item>
-     </a-form-model>
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="调拨单号:" prop="no"> <span>{{ form.no }}{{ form.printState=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':'' }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="调往对象:" prop="targetName"> <span>{{ form.targetName }}</span>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">暂不打印
+          </a-button>
+        </a-form-model-item>
+      </a-form-model>
     </a-spin>
   </a-modal>
 </template>
 
 <script>
-  import {
-    updateFinanceBookDetail
-  } from '@/api/financeBook.js'
-  export default {
-    name: 'PrintModal',
-    props: {
-      show: [Boolean],
-      info: {
-        type: Object,
-        default: () => {
-          return null
-        }
+import {
+  updateFinanceBookDetail
+} from '@/api/financeBook.js'
+export default {
+  name: 'PrintModal',
+  props: {
+    show: [Boolean],
+    info: {
+      type: Object,
+      default: () => {
+        return null
       }
-    },
-    data() {
-      return {
-        opened: this.show,
-        spinning: false,
-        title: '操作提示',
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '操作提示',
 
-        confirmLoading: false,
-        formItemLayout: {
-          labelCol: {
-            span: 6
-          },
-          wrapperCol: {
-            span: 18
-          }
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: {
+          span: 6
         },
-        form: {
-          no: undefined,
-          payerName: undefined,
-          printStatus:'',
-          id:'',
-          type:undefined
+        wrapperCol: {
+          span: 18
         }
-      }
-    },
-    methods: {
-      //  保存
-      handleSubmit() {
-       const _this = this
-       const ajax_form = {
-         id:this.form.id,
-         printStatus:this.form.printStatus  
-       }
-       _this.spinning = true
-       _this.confirmLoading = true
-       updateFinanceBookDetail(ajax_form).then(res => {
-         if (res.status == 200) {
-           _this.$message.success(res.message)
-           _this.cancel()
-           _this.spinning = false
-         } else {
-           _this.spinning = false
-         }
-         _this.confirmLoading = false
-       })
       },
-      cancel() {
-        this.opened = false
-        this.$emit('cancel')
-        this.$refs.ruleForm.resetFields()
+      form: {
+        no: undefined,
+        payerName: undefined,
+        printStatus: '',
+        id: '',
+        type: undefined
       }
-    },
-    watch: {
-      show(newValue, oldValue) {
-        this.opened = newValue
-        if (!newValue) {
-         this.cancel();
-        }else{
-           this.form = this.info
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit () {
+      const _this = this
+      const ajax_form = {
+        id: this.form.id,
+        printStatus: this.form.printStatus
+      }
+      _this.spinning = true
+      _this.confirmLoading = true
+      updateFinanceBookDetail(ajax_form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
+        _this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.cancel()
+      } else {
+        this.form = this.info
       }
     }
   }
+}
 </script>