lilei 2 éve
szülő
commit
bc04e45d69

+ 2 - 2
src/views/salesManagement/salesQuery/printModal.vue

@@ -36,8 +36,8 @@
         </a-form-model-item>
         <a-form-model-item label="产品售价" prop="priceType">
           <a-radio-group v-model="form.priceType">
-            <a-radio :value="nowType=='SALES_BILL_TYPE' ? 'SALES_BILL_TYPE_COST' : 'SALES_BILL_COST'">{{ nowType=='export' ? '导出' : '打印' }}</a-radio>
-            <a-radio :value="nowType=='SALES_BILL_TYPE' ? 'SALES_BILL_TYPE' : 'SALES_BILL'">不{{ nowType=='export' ? '导出' : '打印' }}</a-radio>
+            <a-radio :value="nowType=='SALES_BILL_TYPE' ? 'SALES_BILL_TYPE_COST' : 'SALES_BILL_COST_NOT_LACK'">{{ nowType=='export' ? '导出' : '打印' }}</a-radio>
+            <a-radio :value="nowType=='SALES_BILL_TYPE' ? 'SALES_BILL_TYPE' : 'SALES_BILL_NOT_LACK'">不{{ nowType=='export' ? '导出' : '打印' }}</a-radio>
           </a-radio-group>
         </a-form-model-item>
       </a-form-model>

+ 29 - 3
src/views/salesReturnManagement/salesReturn/chooseDepartUserModal.vue

@@ -52,6 +52,19 @@
                 placeholder="请选择抄送人"
               ></dingDepartUser>
             </a-form-model-item>
+            <a-form-model-item label="附件" help="(支持图片、word、excel、PDF等格式,最多10个附件)">
+              <Upload
+                style="height: 100%;"
+                v-model="form.attachmentList"
+                ref="attachList"
+                :fileSize="10"
+                :maxNums="10"
+                fileType="*"
+                uploadType="attach"
+                :action="attachAction"
+                @change="changeAttach"
+                upText="上传附件"></Upload>
+            </a-form-model-item>
           </a-form-model>
         </div>
         <div class="btn-cont">
@@ -65,12 +78,12 @@
 </template>
 
 <script>
-import { VSelect } from '@/components'
+import { VSelect, Upload } from '@/components'
 import dingDepartUser from '@/views/common/dingDepartUser.js'
 import employee from '@/views/expenseManagement/expenseReimbursement/employee.js'
 export default {
   name: 'ChooseDepartUserModal',
-  components: { dingDepartUser, employee, VSelect },
+  components: { dingDepartUser, employee, VSelect, Upload },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -93,6 +106,8 @@ export default {
         approvers: [], // 审批人
         ccList: [] // 抄送人
       },
+      attachList: [],
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
       rules: {
         salesReturnType: [
           { required: true, message: '请选择退货类型', trigger: 'change' }
@@ -113,6 +128,13 @@ export default {
         this.$refs.ruleForm.validateField(['applyPersonSn'])
       })
     },
+    //  附件上传
+    changeAttach (file) {
+      this.attachList = JSON.parse(file)
+      this.attachList.map(item => {
+        item.fileType = item.extName
+      })
+    },
     updateUser () {
       this.uploading = true
       this.$refs.departUserApp.updateDeptUser()
@@ -136,6 +158,7 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
+          form.attachmentList = this.attachList
           if (form.approvers) {
             form.approvers = this.getTreeVal(form.approvers)
           }
@@ -153,12 +176,15 @@ export default {
     resetForm () {
       this.$nextTick(() => {
         this.$refs.ruleForm.resetFields()
+        this.$refs.attachList.setFileList('')
       })
+      this.attachList = []
       this.form = {
         salesReturnType: undefined,
         applyPersonSn: undefined,
         ccList: undefined,
-        approvers: undefined
+        approvers: undefined,
+        attachmentList: ''
       }
     },
     cancel () {