瀏覽代碼

bug 修复

lilei 3 年之前
父節點
當前提交
7dfeef9b09

+ 17 - 3
src/views/bulkManagement/bulkWarehousingOrder/edit.vue

@@ -222,7 +222,7 @@
       v-model="showNewProduct"
       @cancle="showNewProduct=false"
       :width="800">
-      <newProduct ref="newProduct" pageType="modal" @saveOk="saveProductOk"></newProduct>
+      <newProduct ref="newProduct" :saveing="spinning" :paramsData="paramsData" pageType="modal" @saveOk="saveProductOk"></newProduct>
     </a-modal>
   </div>
 </template>
@@ -260,6 +260,7 @@ export default {
       productType: [],
       warehouseCascadeData: [], //  仓库仓位
       disabled: false, //  查询、重置按钮是否可操作
+      paramsData: null, // 新增产品临时参数
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
@@ -285,6 +286,7 @@ export default {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
             data.list[i].putCost = data.list[i].purchasePrice || ''
+            data.list[i].putQty = data.list[i].putQty || 1
             if (this.defaultWarehouseCascade.length > 0) {
               data.list[i].warehouseCascade = this.defaultWarehouseCascade
               data.list[i].warehouseSn = this.defaultWarehouseCascade[0]
@@ -372,18 +374,28 @@ export default {
           content: '该产品信息不存在,是否马上新增?',
           centered: true,
           onOk () {
+            _this.paramsData = {
+              supplierName: _this.basicInfoData.supplierName,
+              putCost: 0,
+              putQty: 1
+            }
             _this.showNewProduct = true
             _this.$nextTick(() => {
               _this.$refs.newProduct.pageInit()
             })
           }
         })
+      } else {
+        if (data.length == 1 && this.showNewProduct) {
+          data[0].putCost = this.paramsData.putCost
+          data[0].putQty = this.paramsData.putQty
+          this.handleAdd(data[0])
+        }
       }
     },
     // 添加产品成功
     saveProductOk (data) {
-      console.log(data)
-      this.showNewProduct = false
+      this.paramsData = data
       this.queryParam.queryWord = data.name
       this.$refs.table.refresh(true)
     },
@@ -481,6 +493,8 @@ export default {
         } else {
           this.spinning = false
         }
+        this.paramsData = null
+        this.showNewProduct = false
       })
     },
     //  提交

+ 15 - 3
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -106,6 +106,14 @@
           <span v-if="$hasPermissions('B_bulkWarehousingOrder_detail')" style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{ record.sparePartsPurchaseNo }}</span>
           <span v-else>{{ record.sparePartsPurchaseNo }}</span>
         </template>
+        <!-- 入库 -->
+        <template slot="waitOut" slot-scope="text, record">
+          <stateIcon :state="record.state == 'FINISH'"></stateIcon>
+        </template>
+        <!-- 付款 -->
+        <template slot="financial" slot-scope="text, record">
+          <stateIcon :state="record.settleState == 'FINISH'"></stateIcon>
+        </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
@@ -147,9 +155,10 @@ import basicInfoModal from './basicInfoModal.vue'
 import { sparePartsPurList, sparePartsPurCount, sparePartsPurDel, sparePartsPurPut, sparePartsPurExport } from '@/api/sparePartsPur'
 import { supplierAllList } from '@/api/supplier'
 import { downloadExcel } from '@/libs/JGPrint.js'
+import stateIcon from '@/views/common/stateIcon'
 export default {
   name: 'BulkWarehousingList',
-  components: { STable, VSelect, basicInfoModal, rangeDate },
+  components: { STable, VSelect, basicInfoModal, rangeDate, stateIcon },
   mixins: [commonMixin],
   data () {
     return {
@@ -182,8 +191,11 @@ export default {
         { title: '产品款数', dataIndex: 'productTotalCategory', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'productTotalQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总金额', dataIndex: 'productTotalCost', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库', scopedSlots: { customRender: 'waitOut' }, width: '5%', align: 'center' },
+        { title: '付款', scopedSlots: { customRender: 'financial' }, width: '5%', align: 'center' },
+        // { title: '完结', scopedSlots: { customRender: 'finish' }, width: '5%', align: 'center' },
+        // { title: '业务状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        // { title: '财务状态', dataIndex: 'settleStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 20 - 11
src/views/financialManagement/financialCollection/list.vue

@@ -230,17 +230,26 @@ export default {
     },
     // 收款
     handleCollectionSing (row) {
-      this.loading = true
-      this.spinning = true
-      settleReceiptMoney([row.id]).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-          this.$refs.table.clearSelected() // 清空表格选中项
-          this.spinning = false
-        } else {
-          this.spinning = false
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认收款吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.loading = true
+          _this.spinning = true
+          settleReceiptMoney([row.id]).then(res => {
+            _this.loading = false
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.$refs.table.clearSelected() // 清空表格选中项
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
         }
       })
     },

+ 40 - 22
src/views/financialManagement/financialPayment/list.vue

@@ -228,17 +228,26 @@ export default {
     },
     // 付款
     handlePay (row) {
-      this.loading = true
-      this.spinning = true
-      settlePayMoney([row.id]).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.refresh()
-          this.$refs.table.clearSelected() // 清空表格选中项
-          this.spinning = false
-        } else {
-          this.spinning = false
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认付款吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.loading = true
+          _this.spinning = true
+          settlePayMoney([row.id]).then(res => {
+            _this.loading = false
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.$refs.table.clearSelected() // 清空表格选中项
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
         }
       })
     },
@@ -254,17 +263,26 @@ export default {
         this.$message.warning('请在列表勾选后再进行批量操作!')
         return
       }
-      this.loading = true
-      this.spinning = true
-      settlePayMoney(this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys).then(res => {
-        this.loading = false
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          this.$refs.table.clearSelected() // 清空表格选中项
-          this.$refs.table.refresh()
-          this.spinning = false
-        } else {
-          this.spinning = false
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认批量付款吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.loading = true
+          _this.spinning = true
+          settlePayMoney(_this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys).then(res => {
+            _this.loading = false
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.clearSelected() // 清空表格选中项
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
         }
       })
     },

+ 70 - 13
src/views/productManagement/productInfo/edit.vue

@@ -16,6 +16,12 @@
           :label-col="formItemLayout.labelCol"
           :wrapper-col="formItemLayout.wrapperCol"
         >
+          <a-form-model-item label="供应商" v-if="pageType=='modal'">
+            <a-input
+              disabled
+              v-model.trim="formData.supplierName"
+            />
+          </a-form-model-item>
           <a-form-model-item label="产品名称" prop="name">
             <a-input
               id="productInfoEdit-name"
@@ -41,7 +47,6 @@
             <a-input
               id="productInfoEdit-origCode"
               :maxLength="200"
-              :disabled="isEdit"
               v-model.trim="form.origCode"
               placeholder="请输入原厂编码(最多200个字符,多个编码用逗号隔开)"
               ref="origCode"
@@ -108,7 +113,32 @@
               ref="productType"
               @keydown.enter.native="nextFocus('productType', 'specialPrice', $event)" />
           </a-form-model-item>
-          <a-form-model-item label="经销批发价" prop="specialPrice">
+          <a-form-model-item label="成本价" v-if="pageType=='modal'" prop="putCost">
+            <a-input-number
+              id="productInfoEdit-putCost"
+              v-model="form.putCost"
+              :min="0"
+              :max="999999"
+              :precision="2"
+              style="width: 90%;margin-right: 5px;"
+              placeholder="请输入成本价(1~999999)"
+              ref="putCost"
+              @keydown.enter.native="nextFocus('putCost', 'putQty', $event)"
+              allowClear /><span>元</span>
+          </a-form-model-item>
+          <a-form-model-item label="数量" v-if="pageType=='modal'" prop="putQty">
+            <a-input-number
+              id="productInfoEdit-specialPrice"
+              v-model="form.putQty"
+              :precision="0"
+              :min="1"
+              :max="999999"
+              style="width: 90%;"
+              placeholder="请输入数量(1~999999)"
+              ref="putQty"
+              allowClear />
+          </a-form-model-item>
+          <a-form-model-item v-if="pageType=='pages'" label="经销批发价" prop="specialPrice">
             <a-input-number
               id="productInfoEdit-specialPrice"
               v-model="form.specialPrice"
@@ -121,7 +151,7 @@
               @keydown.enter.native="nextFocus('specialPrice', 'terminalPrice', $event)"
               allowClear /><span>元</span>
           </a-form-model-item>
-          <a-form-model-item label="终端价" prop="terminalPrice">
+          <a-form-model-item v-if="pageType=='pages'" label="终端价" prop="terminalPrice">
             <a-input-number
               id="productInfoEdit-terminalPrice"
               v-model="form.terminalPrice"
@@ -134,7 +164,7 @@
               @keydown.enter.native="nextFocus('terminalPrice', 'carOwnersPrice', $event)"
               allowClear /><span>元</span>
           </a-form-model-item>
-          <a-form-model-item label="车主价" prop="carOwnersPrice">
+          <a-form-model-item v-if="pageType=='pages'" label="车主价" prop="carOwnersPrice">
             <a-input-number
               id="productInfoEdit-carOwnersPrice"
               v-model="form.carOwnersPrice"
@@ -148,7 +178,13 @@
               allowClear /><span>元</span>
           </a-form-model-item>
           <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
-            <a-button type="primary" @click="handleSubmit" size="large" id="productInfoEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
+            <a-button
+              type="primary"
+              :loading="saveing"
+              @click="handleSubmit"
+              size="large"
+              id="productInfoEdit-btn-submit"
+              style="padding: 0 60px;">保存</a-button>
           </a-form-model-item>
         </a-form-model>
         <!-- 新增/编辑产品品牌 -->
@@ -173,6 +209,16 @@ export default {
     pageType: { // 页面表现形式,pages 新页签打开的页面,modal 弹框里的页面
       type: String,
       default: 'pages'
+    },
+    paramsData: {
+      type: Object,
+      default: function () {
+        return null
+      }
+    },
+    saveing: {
+      type: Boolean,
+      default: false
     }
   },
   computed: {
@@ -187,6 +233,7 @@ export default {
         labelCol: { span: 4 },
         wrapperCol: { span: 16 }
       },
+      formData: this.paramsData,
       form: {
         name: '', // 产品名称
         code: '', //  产品编码
@@ -197,7 +244,9 @@ export default {
         productType: [], //  产品分类
         specialPrice: '', //  经销价
         terminalPrice: '', //  终端价
-        carOwnersPrice: '' //  车主价
+        carOwnersPrice: '', //  车主价
+        putCost: '',
+        putQty: ''
       },
       rules: {
         name: [
@@ -211,6 +260,12 @@ export default {
         ],
         productType: [
           { required: true, message: '请选择产品分类', trigger: 'change' }
+        ],
+        putCost: [
+          { required: true, type: 'number', message: '请输入成本价', trigger: 'change' }
+        ],
+        putQty: [
+          { required: true, type: 'number', message: '请输入数量', trigger: 'change' }
         ]
       },
       fetching: false,
@@ -282,14 +337,12 @@ export default {
           dealerProductSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              setTimeout(() => {
-                if (_this.pageType == 'pages') {
-                  _this.$router.push({ path: '/productManagement/productInfo/list' })
-                } else {
-                  _this.$emit('saveOk', form)
-                }
+              if (_this.pageType == 'pages') {
+                _this.$router.push({ path: '/productManagement/productInfo/list' })
                 _this.spinning = false
-              }, 1000)
+              } else {
+                _this.$emit('saveOk', _this.form)
+              }
             } else {
               _this.spinning = false
             }
@@ -369,6 +422,10 @@ export default {
       if (this.$route.params.id) { //  编辑页
         this.getGoodsDetail()
       }
+      // 如果是其它页面新建产品
+      if (this.pageType == 'modal') {
+        this.form = Object.assign(this.form, this.formData)
+      }
     }
   },
   mounted () {

+ 5 - 5
src/views/salesManagement/salesQuery/list.vue

@@ -253,11 +253,11 @@ export default {
         { title: '收款方式', dataIndex: 'settleStyleEntity.name', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核', dataIndex: 'billStatus', scopedSlots: { customRender: 'audit' }, width: '5%', align: 'center' },
-        { title: '急件', dataIndex: 'oosFlag', scopedSlots: { customRender: 'oosFlag' }, width: '5%', align: 'center' },
-        { title: '出库', dataIndex: 'oosFlag', scopedSlots: { customRender: 'waitOut' }, width: '5%', align: 'center' },
-        { title: '收款', dataIndex: 'oosFlag', scopedSlots: { customRender: 'financial' }, width: '5%', align: 'center' },
-        { title: '完结', dataIndex: 'oosFlag', scopedSlots: { customRender: 'finish' }, width: '5%', align: 'center' },
+        { title: '审核', scopedSlots: { customRender: 'audit' }, width: '5%', align: 'center' },
+        { title: '急件', scopedSlots: { customRender: 'oosFlag' }, width: '5%', align: 'center' },
+        { title: '出库', scopedSlots: { customRender: 'waitOut' }, width: '5%', align: 'center' },
+        { title: '收款', scopedSlots: { customRender: 'financial' }, width: '5%', align: 'center' },
+        { title: '完结', scopedSlots: { customRender: 'finish' }, width: '5%', align: 'center' },
         // { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         // { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }