|
@@ -63,35 +63,48 @@
|
|
<!-- 搜索条件 -->
|
|
<!-- 搜索条件 -->
|
|
<div class="table-page-search-wrapper">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
- <a-row type="flex" :gutter="12" justify="start">
|
|
|
|
- <a-col flex="250px">
|
|
|
|
|
|
+ <a-row :gutter="12">
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="产品编码">
|
|
<a-form-model-item label="产品编码">
|
|
<a-input id="purchaseOrderEdit-code" ref="searchProductCode" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
<a-input id="purchaseOrderEdit-code" ref="searchProductCode" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col flex="350px">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="产品名称">
|
|
<a-form-model-item label="产品名称">
|
|
<a-input id="purchaseOrderEdit-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
<a-input id="purchaseOrderEdit-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col flex="250px">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-model-item label="原厂编码">
|
|
<a-form-model-item label="原厂编码">
|
|
<a-input id="purchaseOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
|
|
<a-input id="purchaseOrderEdit-origCode" v-model.trim="queryParam.origCode" allowClear placeholder="请输入原厂编码"/>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
- <a-col flex="250px">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-item label="产品分类">
|
|
<a-form-item label="产品分类">
|
|
<ProductType id="purchaseOrderEdit-productType" :isDealer="true" :tenantId="$route.params.dealerSn" @change="changeProductType" v-model="productType"></ProductType>
|
|
<ProductType id="purchaseOrderEdit-productType" :isDealer="true" :tenantId="$route.params.dealerSn" @change="changeProductType" v-model="productType"></ProductType>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col flex="250px">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
<a-form-item label="产品品牌">
|
|
<a-form-item label="产品品牌">
|
|
<ProductBrand id="purchaseOrderEdit-productBrand" :tenantId="$route.params.dealerSn" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
<ProductBrand id="purchaseOrderEdit-productBrand" :tenantId="$route.params.dealerSn" v-model="queryParam.productBrandSn"></ProductBrand>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="可用库存小于等于">
|
|
|
|
+ <a-input-number
|
|
|
|
+ style="width:100%;"
|
|
|
|
+ id="purchaseOrderEdit-stockQty"
|
|
|
|
+ v-model.trim="queryParam.stockQty"
|
|
|
|
+ :min="0"
|
|
|
|
+ :step="1"
|
|
|
|
+ :precision="0"
|
|
|
|
+ :max="99999999"
|
|
|
|
+ placeholder="请输入库存数量"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
</template>
|
|
</template>
|
|
- <a-col flex="auto" style="margin-bottom: 10px;">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
|
|
<a @click="advanced=!advanced" style="margin:0 30px 0 10px" id="purchaseOrderEdit-advanced-btn">
|
|
<a @click="advanced=!advanced" style="margin:0 30px 0 10px" id="purchaseOrderEdit-advanced-btn">
|
|
@@ -206,7 +219,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<div style="float:right;overflow: hidden;">
|
|
<div style="float:right;overflow: hidden;">
|
|
- <a-button v-if="!isDealerUp" type="primary" class="button-primary" id="purchaseOrderEdit-cp-importQh-btn" @click="handleOutStock">导入缺货</a-button>
|
|
|
|
|
|
+ <a-button v-if="(systemFlag==0&&!isDealerUp)||(systemFlag==1&&!isDealerUp&&detail&&detail.orderType==='OTHER')" type="primary" class="button-primary" id="purchaseOrderEdit-cp-importQh-btn" @click="handleOutStock">导入缺货</a-button>
|
|
<a-button id="purchaseOrderEdit-cp-importCp-btn" @click="openGuideModal=true">导入产品</a-button>
|
|
<a-button id="purchaseOrderEdit-cp-importCp-btn" @click="openGuideModal=true">导入产品</a-button>
|
|
</div>
|
|
</div>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -268,9 +281,9 @@
|
|
<!-- 上次缺货 -->
|
|
<!-- 上次缺货 -->
|
|
<outStockModal
|
|
<outStockModal
|
|
ref="outStock"
|
|
ref="outStock"
|
|
- :purchaseTargetType="detail?detail.purchaseTargetType:null"
|
|
|
|
:paramsSn="$route.params.sn"
|
|
:paramsSn="$route.params.sn"
|
|
:openModal="openOutStockModal"
|
|
:openModal="openOutStockModal"
|
|
|
|
+ :orderType="detail&&detail.orderType"
|
|
:chooseData="chooseData"
|
|
:chooseData="chooseData"
|
|
@close="openOutStockModal=false"
|
|
@close="openOutStockModal=false"
|
|
@ok="hanldeOkOutStock" />
|
|
@ok="hanldeOkOutStock" />
|
|
@@ -298,6 +311,7 @@ import ProductBrand from '../../common/productBrand.js'
|
|
import { purchaseDetailBySn, purchaseWriteSubmit, purchaseDetailPrint, purchaseDetailExport, purchaseDetailAddress } from '@/api/purchase'
|
|
import { purchaseDetailBySn, purchaseWriteSubmit, purchaseDetailPrint, purchaseDetailExport, purchaseDetailAddress } from '@/api/purchase'
|
|
import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel } from '@/api/purchaseDetail'
|
|
import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel } from '@/api/purchaseDetail'
|
|
import { productListPurchase } from '@/api/product'
|
|
import { productListPurchase } from '@/api/product'
|
|
|
|
+import { getParamValue } from '@/api/data'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'PurchaseEdit',
|
|
name: 'PurchaseEdit',
|
|
@@ -321,7 +335,8 @@ export default {
|
|
origCode: '', // 原厂编码
|
|
origCode: '', // 原厂编码
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
- productTypeSn3: '' // 产品三级分类
|
|
|
|
|
|
+ productTypeSn3: '', // 产品三级分类
|
|
|
|
+ stockQty: ''// 可用库存小于等于
|
|
},
|
|
},
|
|
typeData: [], // 下拉数据
|
|
typeData: [], // 下拉数据
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
@@ -370,7 +385,8 @@ export default {
|
|
openGuideModal: false, // 导入产品引导
|
|
openGuideModal: false, // 导入产品引导
|
|
openOutStockModal: false, // 上次缺货弹框
|
|
openOutStockModal: false, // 上次缺货弹框
|
|
openAddrModal: false, // 选择地址弹框是否显示
|
|
openAddrModal: false, // 选择地址弹框是否显示
|
|
- openOutStockListModal: false // 导入缺货弹框
|
|
|
|
|
|
+ openOutStockListModal: false, // 导入缺货弹框
|
|
|
|
+ systemFlag: null// 是否是转单产品
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -390,6 +406,7 @@ export default {
|
|
// { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
// { title: '成本价', dataIndex: 'purchasePrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
{ title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
{ title: '终端会员价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
{ title: '车主零售价', dataIndex: 'carOwnersPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
{ title: '车主零售价', dataIndex: 'carOwnersPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
|
|
|
|
+ { title: '可用库存', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '6%', align: 'center' },
|
|
{ title: '采购数量', dataIndex: 'qty', scopedSlots: { customRender: 'storageQuantity' }, width: '6%', align: 'center' },
|
|
{ title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
|
|
{ title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
@@ -490,7 +507,8 @@ export default {
|
|
origCode: '', // 原厂编码
|
|
origCode: '', // 原厂编码
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
- productTypeSn3: '' // 产品三级分类
|
|
|
|
|
|
+ productTypeSn3: '', // 产品三级分类
|
|
|
|
+ stockQty: ''// 可用库存小于等于
|
|
}
|
|
}
|
|
this.productType = []
|
|
this.productType = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
@@ -663,6 +681,14 @@ export default {
|
|
_this.spinning = false
|
|
_this.spinning = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 获取系统参数 判断是否显示产品类型
|
|
|
|
+ getSystemInfo () {
|
|
|
|
+ getParamValue({ code: 'TIRE_OPEN' }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.systemFlag = res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 返回列表
|
|
// 返回列表
|
|
handleBack () {
|
|
handleBack () {
|
|
this.$router.push({ path: '/purchasingManagement/purchaseOrder/list' })
|
|
this.$router.push({ path: '/purchasingManagement/purchaseOrder/list' })
|
|
@@ -675,6 +701,7 @@ export default {
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
this.$refs.searchProductCode.focus()
|
|
this.$refs.searchProductCode.focus()
|
|
})
|
|
})
|
|
|
|
+ this.getSystemInfo()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|