瀏覽代碼

提货单页面

lilei 2 年之前
父節點
當前提交
09b33c3033

+ 0 - 8
src/views/salesManagement/stockPrint/printStockClasList.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 167 - 242
src/views/salesReturnManagement/billOfLading/add.vue

@@ -18,161 +18,139 @@
           <a-row>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
               <a-form-model-item label="申请人" prop="applyPersonSn">
-                <employee style="width: 100%;" id="billOfLading-Employee" v-model="queryParam.applyPersonSn"></employee>
+                <employee style="width: 100%;" id="billOfLading-Employee" v-model="form.applyPersonSn"></employee>
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="产品编码" prop="code">
+              <a-form-model-item label="主题" prop="code">
                 <a-input
                   id="billOfLadingEdit-code"
-                  :maxLength="100"
-                  :disabled="form.state&&form.state!='WAIT'"
+                  :maxLength="30"
                   v-model.trim="form.code"
-                  placeholder="请输入产品编码(最多100个字符)"
+                  placeholder="请输入主题(最多30个字符)"
                   allowClear />
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="原厂编码" prop="origCode">
+              <a-form-model-item label="物流公司" prop="origCode">
                 <a-input
                   id="billOfLadingEdit-origCode"
-                  :maxLength="200"
                   v-model.trim="form.origCode"
-                  placeholder="请输入(最多200个字符,多个编码用逗号隔开)"
+                  placeholder="请选择物流公司"
                   allowClear />
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="其他编码" prop="otherCode">
+              <a-form-model-item label="物流点" prop="otherCode">
                 <a-input
                   id="billOfLadingEdit-otherCode"
-                  :maxLength="60"
                   v-model.trim="form.otherCode"
-                  placeholder="请输入(最多60个字符,多个编码用逗号隔开)"
+                  placeholder="请选择物流点"
                   allowClear />
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="产品品牌" prop="productBrandSn">
-                <a-select
-                  id="billOfLadingEdit-productBrand"
-                  placeholder="请选择产品品牌"
-                  allowClear
-                  v-model="form.productBrandSn"
-                  :showSearch="true"
-                  option-filter-prop="children"
-                  :filter-option="filterOption">
-                  <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
-                </a-select>
+              <a-form-model-item label="发货方">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="billOfLadingEdit-buyerSn" @change="custChange" />
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="产品分类" prop="productType">
-                <a-cascader
-                  :disabled="form.state&&form.state!='WAIT'"
-                  expand-trigger="hover"
-                  @change="changeProductType"
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="billOfLadingEdit-productType"
-                  placeholder="请选择产品分类"
-                  allowClear
-                  v-model="form.productType" />
+              <a-form-model-item label="收货人" prop="qrCode">
+                <a-input
+                  id="billOfLadingEdit-qrCode"
+                  :maxLength="30"
+                  v-model.trim="form.qrCode"
+                  placeholder="请输入收货人(最多30个字符)"
+                  allowClear />
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="单位" prop="unit">
-                <v-select
-                  code="PRODUCT_UNIT"
-                  id="billOfLadingEdit-unit"
-                  v-model="form.unit"
-                  allowClear
-                  placeholder="请选择单位"
-                ></v-select>
+              <a-form-model-item label="电话" prop="qrCode">
+                <a-input
+                  id="billOfLadingEdit-qrCode"
+                  :maxLength="30"
+                  v-model.trim="form.qrCode"
+                  placeholder="请输入电话(最多30个字符)"
+                  allowClear />
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="包装数" prop="packQty" :label-col="{span:4}" :wrapper-col="{span:16}">
+              <a-form-model-item label="件数" prop="packQty">
                 <a-input-number
                   id="billOfLadingEdit-packQty"
+                  style="width:100%"
                   v-model="form.packQty"
                   :precision="0"
                   :min="1"
                   :max="999999"
-                  placeholder="请输入"
+                  placeholder="请输入件数"
                 />
-                <span style="margin: 0 5px;">/</span>
-                <v-select
-                  code="PRODUCT_PACK_UNIT"
-                  id="productLevelEdit-packQtyUnit"
-                  v-model="form.packQtyUnit"
-                  allowClear
-                  style="width: 100px;"
-                  placeholder="单位"
-                ></v-select>
               </a-form-model-item>
             </a-col>
-            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="箭冠产品" prop="arrowFalg">
-                <v-select
-                  code="ARROW_FALG"
-                  id="billOfLadingEdit-arrowFalg"
-                  v-model="form.arrowFalg"
-                  allowClear
-                  placeholder="请选择"
-                ></v-select>
-              </a-form-model-item>
-            </a-col>
-            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="条形码" prop="qrCode">
+            <a-col :span="24">
+              <a-form-model-item label="运费" :label-col="{span:2}" :wrapper-col="{span:20}">
                 <a-input
                   id="billOfLadingEdit-qrCode"
-                  :maxLength="50"
+                  :maxLength="100"
                   v-model.trim="form.qrCode"
-                  placeholder="请输入条形码(最多50个字符)"
+                  placeholder="请输入运费(最多100个字符)"
                   allowClear />
               </a-form-model-item>
             </a-col>
           </a-row>
           <a-row>
-            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="产品尺寸" prop="size">
-                <a-input
+            <a-col :spna="24">
+              <a-form-model-item style="margin-bottom:0" label="备注" prop="size" :label-col="{span:2}" :wrapper-col="{span:20}">
+                <a-textarea
                   v-model.trim="form.size"
                   id="billOfLadingEdit-size"
-                  :maxLength="50"
+                  :maxLength="500"
                   allowClear
-                  placeholder="请输入产品尺寸(最多50个字符)" />
+                  placeholder="请输入备注(最多500个字符)" />
               </a-form-model-item>
             </a-col>
-            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="产品重量" prop="weight">
-                <a-input
-                  v-model.trim="form.weight"
-                  id="billOfLadingEdit-weight"
-                  :maxLength="50"
-                  allowClear
-                  placeholder="请输入产品重量(最多50个字符)" />
-              </a-form-model-item>
-            </a-col>
-            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="颜色" prop="color">
-                <a-input
-                  v-model.trim="form.color"
-                  id="productLevelEdit-color"
-                  :maxLength="50"
-                  allowClear
-                  placeholder="请输入颜色(最多50个字符)" />
+            <a-col :spna="24">
+              <a-form-model-item label="附件" help="说明:支持图片、word、excel、PDF等格式,最多10个附件。" :label-col="{span:2}" :wrapper-col="{span:20}">
+                <Upload
+                  style="height: 100%;"
+                  id="billOfLadingEdit-attachList"
+                  v-model="form.expenseAccountFilesList"
+                  ref="attachList"
+                  :fileSize="10"
+                  :maxNums="10"
+                  fileType="*"
+                  uploadType="attach"
+                  :action="attachAction"
+                  @change="changeAttach"
+                  upText="上传附件"></Upload>
               </a-form-model-item>
             </a-col>
-            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-              <a-form-model-item label="产品内盒尺寸" prop="boxSize">
-                <a-input
-                  v-model.trim="form.boxSize"
-                  id="billOfLadingEdit-boxSize"
-                  :maxLength="50"
-                  allowClear
-                  placeholder="请输入产品内盒尺寸(最多50个字符)" />
+            <a-col :spna="24">
+              <a-form-model-item label="关联销退单" :label-col="{span:2}" :wrapper-col="{span:20}">
+                <a-button type="link" @click="openSelModal">选择销退单</a-button>
+                <div>
+                  <a-table :columns="columns" :scroll="{ y: 400 }" :pagination="false" :data-source="chooseData" bordered>
+                    <!-- 编号 -->
+                    <template slot="no" slot-scope="text, record,index">
+                      <span>{{ index+1 }}</span>
+                    </template>
+                    <!-- 单号 -->
+                    <template slot="salesReturnBillNo" slot-scope="text, record">
+                      <span>{{ record.salesReturnBillNo }}</span>
+                    </template>
+                    <!-- 操作 -->
+                    <template slot="action" slot-scope="text, record">
+                      <a-button
+                        size="small"
+                        type="link"
+                        class="button-error"
+                        @click="handleDel(record)"
+                      >
+                        删除
+                      </a-button>
+                    </template>
+                  </a-table>
+                </div>
               </a-form-model-item>
             </a-col>
           </a-row>
@@ -184,11 +162,23 @@
         type="primary"
         class="button-primary"
         :disabled="spinning"
-        id="billOfLadingEdit-submit-btn"
+        id="billOfLadingEdit-save-btn"
         size="large"
-        @click="handleSubmit"
+        @click="handleSave('save')"
         style="padding: 0 60px;">保存</a-button>
+      <a-button
+        type="primary"
+        class="button-error"
+        :disabled="spinning"
+        id="billOfLadingEdit-submit-btn"
+        size="large"
+        @click="handleSave('submit')"
+        style="padding: 0 60px;">提交</a-button>
     </div>
+    <!-- 关联销退单 -->
+    <selectXtModal ref="selXtModal" modalTit="选择销退单" :chooseData="chooseData" :openModal="showXtModal" @cancel="showXtModal=false"></selectXtModal>
+    <!-- 选择审核人员 -->
+    <chooseDepartUserModal :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
   </div>
 </template>
 
@@ -196,22 +186,27 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect, Upload } from '@/components'
 import { productSave, productSnDetail } from '@/api/product'
-import { productTypeQueryAll } from '@/api/productType'
-import { productBrandQuery } from '@/api/productBrand'
+import selectXtModal from './selectXtModal.vue'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
+import chooseDepartUserModal from '../../expenseManagement/expenseReimbursement/chooseDepartUserModal.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 export default {
   name: 'ProductInfoEdit',
   mixins: [commonMixin],
-  components: { VSelect, Upload, STable, employee },
+  components: { VSelect, Upload, STable, employee, dealerSubareaScopeList, chooseDepartUserModal, selectXtModal },
   data () {
     return {
       spinning: false,
+      showXtModal: false,
+      openDepartUserModal: false,
       formItemLayout: {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
       form: {
-        name: '', // 产品名称
+        applyPersonSn: '', // 申请人
+        applyPersonName: '',
         code: '', //  产品编码
         origCode: '', //  原厂编码
         otherCode: '', // 其他编码
@@ -234,8 +229,8 @@ export default {
         otherDesc: '' // 其他说明
       },
       rules: {
-        name: [
-          { required: true, message: '请输入产品名称', trigger: 'blur' }
+        applyPersonSn: [
+          { required: true, message: '请选择申请人', trigger: 'blur' }
         ],
         code: [
           { required: true, message: '请输入产品编码', trigger: 'blur' }
@@ -249,177 +244,107 @@ export default {
         unit: [
           { required: true, message: '请选择单位', trigger: 'change' }
         ],
-        // packQty: [
-        //   { required: true, message: '请输入包装数', trigger: 'blur' }
-        // ],
         arrowFalg: [
           { required: true, message: '请选择是否为箭冠产品', trigger: 'change' }
-        ],
-        qrCode: [
-          { required: false, message: '请输入条形码', trigger: 'blur' },
-          { validator: this.validateQrCode }
         ]
       },
-      productBrandList: [], //  品牌下拉数据
-      productTypeList: [] //  分类下拉数据
+      chooseData: [],
+      columns: [
+        { title: '序号', scopedSlots: { customRender: 'no' }, width: '8%', align: 'center' },
+        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '15%', align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '申请退货数量', dataIndex: 'totalQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+      ]
     }
   },
   methods: {
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
+    },
+    openSelModal () {
+      this.showXtModal = true
+    },
     //  详情
     getDetail () {
-      productSnDetail({ sn: this.$route.params.sn }).then(res => {
+      this.spinning = true
+      this.disabled = true
+      expenseAccountDetail({ expenseAccountSn: this.expenseAccountSn }).then(res => {
         if (res.status == 200) {
           const data = res.data
           this.form = Object.assign(this.form, data)
-          this.form.productType = [ this.form.productTypeSn1, this.form.productTypeSn2, this.form.productTypeSn3 ]
-          if (res.data.productPicList && res.data.productPicList.length > 0) {
-            let str = ''
-            res.data.productPicList.map(item => {
-              if (item.imageUrl) {
-                str += item.imageUrl + ','
-              }
-            })
-            str = str.substr(0, str.length - 1)
-            this.$refs.productMsg.setFileList(str)
-            this.form.productMsg = str
-          } else {
-            this.$refs.productMsg.setFileList('')
-            this.form.productMsg = ''
-          }
-          this.$refs.editor.setHtml(res.data.description)
-          this.$refs.otherDesc.setHtml(res.data.otherDesc)
+          // 获取附件列表
+          this.form.expenseAccountFilesList = ''
+          this.attachList = res.data.expenseAccountFilesList
+          this.$refs.attachList.setFileList(this.attachList)
         } else {
           this.$refs.ruleForm.resetFields()
         }
+        this.spinning = false
+        this.disabled = false
       })
     },
     // 提交
-    handleSubmit (e) {
-      e.preventDefault()
+    handleSave (type) {
       const _this = this
-      if (!this.form.productTypeSn3) {
-        this.$message.warning('产品分类未选到第三级,请修改后再提交!')
-        return
-      }
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          const form = JSON.parse(JSON.stringify(_this.form))
-          form.id = _this.$route.params.id ? _this.$route.params.id : undefined
-          form.productPicList = []
-          if (form.productMsg) {
-            const arr = form.productMsg.split(',')
-            arr.map(item => {
-              form.productPicList.push({ imageUrl: item })
-            })
-          }
-          delete form.productMsg
-          delete form.productType
-          delete form.updateDate
-          _this.spinning = true
-          productSave(form).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              setTimeout(() => {
-                _this.handleBack()
+          if (this.chooseData.length == 0) {
+            _this.$message.info('请选择销退单')
+          } else {
+            // 保存
+            if (type == 'save') {
+              const form = JSON.parse(JSON.stringify(_this.form))
+              form.id = _this.$route.params.id ? _this.$route.params.id : undefined
+              form.expenseAccountFilesList = _this.attachList
+              _this.spinning = true
+              productSave(form).then(res => {
+                if (res.status == 200) {
+                  _this.$message.success(res.message)
+                  _this.handleBack()
+                }
                 _this.spinning = false
-              }, 1000)
-            } else {
-              _this.spinning = false
+              })
+            }
+            // 提交
+            if (type == 'submit') {
+              _this.openDepartUserModal = true
             }
-          })
+          }
         } else {
-          console.log('error submit!!')
           return false
         }
       })
     },
-    // 返回
-    handleBack () {
-      this.$router.push({ path: '/productManagement/productInfo/list', query: { closeLastOldTab: true } })
-    },
-    // 产品图片上传
-    changeImage (file) {
-      this.form.productMsg = file
-    },
-    validateQrCode (rule, value, callback) {
-      const reg = /^[0-9a-zA-Z]+$/
-      if (value && !reg.test(value)) {
-        callback('条形码由大小写英文字母和数字组成')
-      } else {
-        callback()
-      }
-    },
-    // 产品说明 文本编辑器
-    editorDescriptionChange (html, text) {
-      this.form.description = html
-    },
-    //  其他说明 文本编辑器
-    editorOtherChange (html, text) {
-      this.form.otherDesc = html
-    },
-    //  产品分类  change
-    changeProductType (val, opt) {
-      this.form.productTypeSn1 = val[0] ? val[0] : ''
-      this.form.productTypeSn2 = val[1] ? val[1] : ''
-      this.form.productTypeSn3 = val[2] ? val[2] : ''
-    },
-    //  产品品牌  列表
-    getProductBrand () {
-      productBrandQuery({}).then(res => {
-        if (res.status == 200) {
-          this.productBrandList = res.data
-        } else {
-          this.productBrandList = []
-        }
-      })
-    },
-    //  产品分类  列表
-    getProductType () {
-      productTypeQueryAll({}).then(res => {
-        if (res.status == 200) {
-          if (res.data && res.data.length > 0) {
-            //  递归处理disabled禁用
-            this.recursionFun(res.data, false)
-            this.productTypeList = res.data
-          } else {
-            this.productTypeList = []
-          }
-        } else {
-          this.productTypeList = []
+    // 提交信息
+    handleSubmit (data) {
+      this.spinning = true
+      expenseAccountSubmit({ expenseAccountSn: this.$route.params.sn, ...data }).then(res => {
+        if (res.status == '200') {
+          this.$message.success(res.message)
+          this.handleBack()
         }
+        this.spinning = false
       })
     },
-    //  递归函数
-    recursionFun (data, state) {
-      if (data) {
-        data.map((item, index) => {
-          // enabledFlag为0表示禁用,父级禁用则子级也为禁用
-          if ((item.enabledFlag && item.enabledFlag == 0) || state) {
-            item.disabled = true
-          } else {
-            item.disabled = false
-          }
-          if (item.children && item.children.length == 0) {
-            delete item.children
-          } else {
-            this.recursionFun(item.children, item.disabled)
-          }
-        })
-      }
+    // 返回
+    handleBack () {
+      this.$router.push({ name: 'billOfLadingList' })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
+    //  附件上传
+    changeAttach (file) {
+      this.attachList = JSON.parse(file)
+      this.attachList.map(item => {
+        item.fileType = item.extName
+      })
     },
     pageInit () {
-      this.$refs.productMsg.setFileList('')
-      this.$refs.editor.setHtml('')
-      this.$refs.otherDesc.setHtml('')
+      this.attachList = []
+      this.form.expenseAccountFilesList = ''
+      this.$refs.attachList.setFileList('')
       this.$refs.ruleForm.resetFields()
-      this.form.packQtyUnit = undefined
-      this.getProductBrand()
-      this.getProductType()
       if (this.$route.params.id) { //  编辑页
         this.getDetail()
       }

+ 238 - 2
src/views/salesReturnManagement/billOfLading/detail.vue

@@ -1,8 +1,244 @@
 <template>
+  <div class="billOfLadingEdit-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="billOfLadingEdit-cont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="billOfLadingEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
+      <a-form-model
+        id="billOfLadingEdit-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-card :bordered="false" class="billOfLadingEdit-cont">
+          <a-row>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item style="margin-bottom:0" label="申请人" prop="applyPersonSn">
+                往来款
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item style="margin-bottom:0" label="主题" prop="code">
+                关于提货事宜
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item style="margin-bottom:0" label="物流公司" prop="origCode">
+                龙兴物流
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item style="margin-bottom:0" label="物流点" prop="otherCode">
+                东莞市茶山镇茶南路龙兴物流
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item style="margin-bottom:0" label="发货方">
+                箭冠汽配湛江赤坎店
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item style="margin-bottom:0" label="收货人" prop="qrCode">
+                宋志谋
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item style="margin-bottom:0" label="电话" prop="qrCode">
+                18800001111
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item style="margin-bottom:0" label="件数" prop="packQty">
+                2件
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-model-item style="margin-bottom:0" label="运费" :label-col="{span:2}" :wrapper-col="{span:20}">
+                快递费134元,送货费55元,合计189元(成品仓付)
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+          <a-row>
+            <a-col :spna="24">
+              <a-form-model-item style="margin-bottom:0" label="备注" prop="size" :label-col="{span:2}" :wrapper-col="{span:20}">
+                --
+              </a-form-model-item>
+            </a-col>
+            <a-col :spna="24">
+              <a-form-model-item style="margin-bottom:10px" label="附件" :label-col="{span:2}" :wrapper-col="{span:20}">
+                <a href="#">附件.excel</a>
+              </a-form-model-item>
+            </a-col>
+            <a-col :spna="24">
+              <a-form-model-item label="关联销退单" :label-col="{span:2}" :wrapper-col="{span:20}">
+                <a-table :columns="columns" :scroll="{ y: 400 }" :pagination="false" :data-source="chooseData" bordered>
+                  <!-- 编号 -->
+                  <template slot="no" slot-scope="text, record,index">
+                    <span>{{ index+1 }}</span>
+                  </template>
+                  <!-- 单号 -->
+                  <template slot="salesReturnBillNo" slot-scope="text, record">
+                    <span>{{ record.salesReturnBillNo }}</span>
+                  </template>
+                </a-table>
+              </a-form-model-item>
+            </a-col>
+            <a-col :spna="24">
+              <a-form-model-item label="审核进度" :label-col="{span:2}" :wrapper-col="{span:20}">
+                <div>以下信息来自钉钉</div>
+                <a-table :columns="auditColumns" :scroll="{ y: 400 }" :pagination="false" :data-source="auditData" bordered>
+                  <!-- 编号 -->
+                  <template slot="no" slot-scope="text, record,index">
+                    <span>{{ index+1 }}</span>
+                  </template>
+                  <!-- 单号 -->
+                  <template slot="salesReturnBillNo" slot-scope="text, record">
+                    <span>{{ record.salesReturnBillNo }}</span>
+                  </template>
+                </a-table>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+        </a-card>
+      </a-form-model>
+    </a-spin>
+  </div>
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect, Upload } from '@/components'
+import employee from '../../expenseManagement/expenseReimbursement/employee.js'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+export default {
+  name: 'ProductInfoEdit',
+  mixins: [commonMixin],
+  components: { VSelect, Upload, STable, employee, dealerSubareaScopeList },
+  data () {
+    return {
+      spinning: false,
+      showXtModal: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        applyPersonSn: '', // 申请人
+        applyPersonName: '',
+        code: '', //  产品编码
+        origCode: '', //  原厂编码
+        otherCode: '', // 其他编码
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '', //  产品三级分类
+        productType: [], //  产品分类
+        unit: undefined, //  单位
+        packQty: '', // 包装数
+        packQtyUnit: undefined, // 包装数单位
+        arrowFalg: undefined, // 是否箭冠产品
+        qrCode: '',
+        productMsg: '', //  产品图片
+        size: '', // 产品尺寸
+        weight: '', // 产品重量
+        color: undefined, // 颜色
+        boxSize: '', // 内核尺寸
+        description: '', // 产品说明
+        otherDesc: '' // 其他说明
+      },
+      rules: {},
+      chooseData: [],
+      columns: [
+        { title: '序号', scopedSlots: { customRender: 'no' }, width: '8%', align: 'center' },
+        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '15%', align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '申请退货数量', dataIndex: 'totalQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      auditData: [],
+      auditColumns: [
+        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
+        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+    }
+  },
+  methods: {
+    //  详情
+    getDetail () {
+      this.spinning = true
+      this.disabled = true
+      expenseAccountDetail({ expenseAccountSn: this.expenseAccountSn }).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          this.form = Object.assign(this.form, data)
+          // 获取附件列表
+          this.form.expenseAccountFilesList = ''
+          this.attachList = res.data.expenseAccountFilesList
+          this.$refs.attachList.setFileList(this.attachList)
+        } else {
+          this.$refs.ruleForm.resetFields()
+        }
+        this.spinning = false
+        this.disabled = false
+      })
+    },
+    // 返回
+    handleBack () {
+      this.$router.push({ name: 'billOfLadingList' })
+    },
+    pageInit () {
+      this.attachList = []
+      this.form.expenseAccountFilesList = ''
+      this.$refs.ruleForm.resetFields()
+      if (this.$route.params.id) { //  编辑页
+        this.getDetail()
+      }
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
 </script>
 
-<style>
-</style>
+<style lang="less">
+  .billOfLadingEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .billOfLadingEdit-cont{
+      margin-bottom: 10px;
+    }
+    .affix{
+      .ant-affix{
+        z-index: 101;
+      }
+    }
+  }
+</style>

+ 13 - 16
src/views/salesReturnManagement/billOfLading/list.vue

@@ -135,8 +135,6 @@ import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { salesReturnList, salesReturnDel } from '@/api/salesReturn'
-import moment from 'moment'
-import getDate from '@/libs/getDate.js'
 export default {
   name: 'BillOfLadingList',
   mixins: [commonMixin],
@@ -154,14 +152,11 @@ export default {
       advanced: false,
       tableHeight: 0,
       disabled: false, //  查询、重置按钮是否可操作
-      createDate: [
-        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ], //  创建时间
+      createDate: [], //  创建时间
       // 查询参数
       queryParam: {
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: '',
+        endDate: '',
         beginAuditDate: '',
         endAuditDate: '',
         buyerSn: undefined, //  客户名称
@@ -203,10 +198,10 @@ export default {
         { title: '关联销退单', dataIndex: 'salesReturnBillSourceDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请人', dataIndex: 'purchaseReturnBillNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '主题', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '物流公司', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '物流点', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '发货方', dataIndex: 'purchaseReturnBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收货人', dataIndex: 'purchaseReturnBillNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '物流公司', dataIndex: 'buyerName2', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '物流点', dataIndex: 'buyerName1', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '发货方', dataIndex: 'purchaseReturnBillNo1', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收货人', dataIndex: 'purchaseReturnBillNo2', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
@@ -271,13 +266,15 @@ export default {
     },
     resetSearchForm () {
       this.$refs.rangeCreateDate.resetDate()
-      this.$refs.rangeExamineDate.resetDate()
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      if (this.advanced) {
+        this.$refs.rangeExamineDate.resetDate()
+        this.$refs.dealerSubareaScopeList.resetForm()
+      }
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
       this.queryParam.beginAuditDate = ''
       this.queryParam.endAuditDate = ''
       this.queryParam.buyerSn = undefined
-      this.$refs.dealerSubareaScopeList.resetForm()
       this.queryParam.salesReturnBillNo = ''
       this.queryParam.purchaseReturnBillNo = ''
       this.queryParam.billStatus = undefined

+ 199 - 0
src/views/salesReturnManagement/billOfLading/selectXtModal.vue

@@ -0,0 +1,199 @@
+<template>
+  <a-modal
+    centered
+    class="collection-detail-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    :title="modalTit"
+    :bodyStyle="{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
+    @cancel="isShow=false"
+    width="60%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="common-main">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form layout="inline">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="销退单号">
+                  <a-input v-model.trim="queryParam.salesReturnBillNo" allowClear placeholder="请输入销退单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="客户名称">
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="billOfLadingEdit-buyerSn" @change="custChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <span class="table-page-search-submitButtons">
+                  <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                </span>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 表格数据 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: 400 }"
+          :pageSize="10"
+          bordered>
+          <!-- 收款单号 -->
+          <template slot="salesReturnBillNo" slot-scope="text, record">
+            {{ record.salesReturnBillNo }}
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <div v-if="record.billStatus == 'FINISH'">
+              <a-button
+                size="small"
+                type="link"
+                class="button-warning"
+                v-if="!record.checked"
+                @click="handleChoose(record)"
+              >选择</a-button>
+              <span style="color:green;" v-else>已选</span>
+            </div>
+          </template>
+        </s-table>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { salesReturnList } from '@/api/salesReturn'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+export default {
+  name: 'GlDetailModal',
+  components: { STable, VSelect, dealerSubareaScopeList },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalTit: { // 弹框标题
+      type: String,
+      default: null
+    },
+    chooseData: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      disabled: false,
+      spinning: false,
+      handlePlData: [],
+      queryParam: {
+        salesReturnBillNo: '',
+        buyerSn: undefined
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总部销退单号', scopedSlots: { customRender: 'salesReturnBillNo' }, width: '15%', align: 'center' },
+        { title: '客户名称', dataIndex: 'buyerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '申请退货数量', dataIndex: 'totalQty', width: '15%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditTime', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+      ],
+      orginData: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return salesReturnList(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              const index = this.chooseData.findIndex(item => data.list[i].salesReturnBillNo == item.salesReturnBillNo)
+              data.list[i].checked = index >= 0
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          this.orginData = data.list
+          return data
+        })
+      },
+      snList: []
+    }
+  },
+  computed: {
+    totalAmount () {
+      let ret = 0
+      this.handlePlData.map(item => {
+        ret = ret + item.totalAmount
+      })
+      return ret.toFixed(2)
+    }
+  },
+  methods: {
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
+    },
+    // 删除
+    handleDel (row) {
+      const i = this.chooseData.findIndex(item => row.salesReturnBillNo == item.salesReturnBillNo)
+      this.chooseData.splice(i, 1)
+      const oi = this.orginData.findIndex(item => row.salesReturnBillNo == item.salesReturnBillNo)
+      if (oi >= 0) {
+        this.orginData[oi].checked = false
+      }
+    },
+    // 选择
+    handleChoose (row) {
+      row.checked = true
+      this.chooseData.push(row)
+    },
+    // 取消
+    handleCommonCancel () {
+      this.$emit('cancel')
+      this.chooseData = []
+    },
+    // 重置
+    resetSearchForm () {
+      this.queryParam = {
+        salesReturnBillNo: '',
+        buyerSn: undefined
+      }
+      this.orginData = []
+      this.$refs.table.refresh(true)
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.handleCommonCancel()
+      } else {
+        this.resetSearchForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+
+</style>