|
@@ -162,6 +162,40 @@
|
|
总成本 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? '¥'+productTotal.productTotalCost : '--' }}</strong>
|
|
总成本 <strong>{{ (productTotal&&(productTotal.productTotalCost || productTotal.productTotalCost==0)) ? '¥'+productTotal.productTotalCost : '--' }}</strong>
|
|
</div>
|
|
</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
|
|
|
|
+ <a-row :gutter="15">
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品编码">
|
|
|
|
+ <a-input id="bulkWarehousingOrderEdit-code" v-model.trim="queryChooseParam.code" allowClear placeholder="请输入产品编码"/>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
|
+ <a-input id="bulkWarehousingOrderEdit-name" v-model.trim="queryChooseParam.name" allowClear placeholder="请输入产品名称"/>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
|
|
|
|
+ <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-choose-refresh">查询</a-button>
|
|
|
|
+ <a-button style="margin-left: 8px" @click="resetChooseSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-choose-reset">重置</a-button>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="8" :sm="24" style="text-align:right;">
|
|
|
|
+ <a-button
|
|
|
|
+ type="default"
|
|
|
|
+ @click="openGuideModal=true"
|
|
|
|
+ :loading="delLoading"
|
|
|
|
+ id="bulkWarehousingOrderEdit-del-all">导入产品</a-button>
|
|
|
|
+ <a-button
|
|
|
|
+ type="link"
|
|
|
|
+ @click="delBulkOrder"
|
|
|
|
+ :loading="delLoading"
|
|
|
|
+ id="bulkWarehousingOrderEdit-del-all">整单删除</a-button>
|
|
|
|
+ </a-col>
|
|
|
|
+ </a-row>
|
|
|
|
+ </a-form>
|
|
|
|
+ </div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
class="sTable"
|
|
class="sTable"
|
|
@@ -233,8 +267,13 @@
|
|
@click="handleSubmit"
|
|
@click="handleSubmit"
|
|
style="padding: 0 60px;">提交</a-button>
|
|
style="padding: 0 60px;">提交</a-button>
|
|
</div>
|
|
</div>
|
|
- <!-- 选择基本信息弹框 -->
|
|
|
|
- <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
|
|
|
|
|
|
+ <!-- 导入弹框 -->
|
|
|
|
+ <!-- 导入费用明细 -->
|
|
|
|
+ <importGuideModal
|
|
|
|
+ :openModal="openGuideModal"
|
|
|
|
+ :params="{sparePartsPurchaseSn: $route.params.sn}"
|
|
|
|
+ @close="openGuideModal=false"
|
|
|
|
+ @ok="hanldeImprotOk" />
|
|
<!-- 新增产品 -->
|
|
<!-- 新增产品 -->
|
|
<a-modal
|
|
<a-modal
|
|
centered
|
|
centered
|
|
@@ -259,27 +298,38 @@
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
-import basicInfoModal from './basicInfoModal.vue'
|
|
|
|
import { getOperationalPrecision } from '@/libs/tools.js'
|
|
import { getOperationalPrecision } from '@/libs/tools.js'
|
|
-import { sparePartsPurDetail, sparePartsPurDetailList, sparePartsPurDetailCount, sparePartsPurDetailSave, sparePartsPurDetailDel, sparePartsPurSubmit, sparePartsPurDetailPrint } from '@/api/sparePartsPur'
|
|
|
|
|
|
+import {
|
|
|
|
+ sparePartsPurDetail,
|
|
|
|
+ sparePartsPurDetailList,
|
|
|
|
+ sparePartsPurDetailCount,
|
|
|
|
+ sparePartsPurDetailSave,
|
|
|
|
+ sparePartsPurDetailDel,
|
|
|
|
+ sparePartsPurSubmit,
|
|
|
|
+ sparePartsPurDetailPrint,
|
|
|
|
+ sparePartsPurDeleteAll,
|
|
|
|
+ sparePartsPurDetailInsertBatch } from '@/api/sparePartsPur'
|
|
import { bulkProductList } from '@/api/dealerProduct'
|
|
import { bulkProductList } from '@/api/dealerProduct'
|
|
import { warehouseCascadeList } from '@/api/warehouse'
|
|
import { warehouseCascadeList } from '@/api/warehouse'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductType from '../../common/productType.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
import Print from '@/views/common/print.vue'
|
|
import Print from '@/views/common/print.vue'
|
|
|
|
+import importGuideModal from './importGuideModal.vue'
|
|
import newProduct from '@/views/productManagement/productInfo/edit.vue'
|
|
import newProduct from '@/views/productManagement/productInfo/edit.vue'
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
import { hdPrint } from '@/libs/JGPrint'
|
|
export default {
|
|
export default {
|
|
name: 'BulkWarehousingEdit',
|
|
name: 'BulkWarehousingEdit',
|
|
- components: { STable, VSelect, basicInfoModal, Print, ProductType, ProductBrand, newProduct },
|
|
|
|
|
|
+ components: { STable, VSelect, Print, ProductType, ProductBrand, newProduct, importGuideModal },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
advanced: false,
|
|
advanced: false,
|
|
spinning: false,
|
|
spinning: false,
|
|
loading: false,
|
|
loading: false,
|
|
|
|
+ delLoading: false,
|
|
chooseLoading: false,
|
|
chooseLoading: false,
|
|
showNewProduct: false,
|
|
showNewProduct: false,
|
|
|
|
+ openGuideModal: false,
|
|
queryParam: {
|
|
queryParam: {
|
|
code: '', // 产品编码
|
|
code: '', // 产品编码
|
|
name: '', // 产品名称
|
|
name: '', // 产品名称
|
|
@@ -289,6 +339,10 @@ export default {
|
|
productTypeSn2: undefined,
|
|
productTypeSn2: undefined,
|
|
productTypeSn3: undefined
|
|
productTypeSn3: undefined
|
|
},
|
|
},
|
|
|
|
+ queryChooseParam: {
|
|
|
|
+ code: '', // 产品编码
|
|
|
|
+ name: '' // 产品名称
|
|
|
|
+ },
|
|
productType: [],
|
|
productType: [],
|
|
warehouseCascadeData: [], // 仓库仓位
|
|
warehouseCascadeData: [], // 仓库仓位
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
@@ -385,7 +439,6 @@ export default {
|
|
},
|
|
},
|
|
loadDataSource: [],
|
|
loadDataSource: [],
|
|
chooseLoadDataSource: [],
|
|
chooseLoadDataSource: [],
|
|
- openModal: false, // 选择基本信息弹框是否显示
|
|
|
|
warehouseList: [], // 仓库 下拉数据
|
|
warehouseList: [], // 仓库 下拉数据
|
|
warehouseLocList: {}, // 仓位 下拉数据
|
|
warehouseLocList: {}, // 仓位 下拉数据
|
|
defaultWarehouseCascade: [], // 默认仓库仓位
|
|
defaultWarehouseCascade: [], // 默认仓库仓位
|
|
@@ -437,7 +490,7 @@ export default {
|
|
this.queryParam.code = data.code
|
|
this.queryParam.code = data.code
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
- // 重置
|
|
|
|
|
|
+ // 重置产品列表
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam.name = ''
|
|
this.queryParam.name = ''
|
|
this.queryParam.code = ''
|
|
this.queryParam.code = ''
|
|
@@ -449,6 +502,12 @@ export default {
|
|
this.productType = []
|
|
this.productType = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
|
|
+ // 重置已选产品列表
|
|
|
|
+ resetChooseSearchForm () {
|
|
|
|
+ this.queryChooseParam.name = ''
|
|
|
|
+ this.queryChooseParam.code = ''
|
|
|
|
+ this.$refs.chooseTable.refresh(true)
|
|
|
|
+ },
|
|
// 打印预览/快捷打印
|
|
// 打印预览/快捷打印
|
|
handlePrint (type, printerType) {
|
|
handlePrint (type, printerType) {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -577,6 +636,7 @@ export default {
|
|
title: '提示',
|
|
title: '提示',
|
|
content: '删除后不可恢复,确定要进行删除吗?',
|
|
content: '删除后不可恢复,确定要进行删除吗?',
|
|
centered: true,
|
|
centered: true,
|
|
|
|
+ closable: true,
|
|
onOk () {
|
|
onOk () {
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
sparePartsPurDetailDel({ id: row.id }).then(res => {
|
|
sparePartsPurDetailDel({ id: row.id }).then(res => {
|
|
@@ -591,15 +651,25 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 编辑基本信息
|
|
|
|
- handleEditInfo () {
|
|
|
|
- this.openModal = true
|
|
|
|
- },
|
|
|
|
- // 基本信息 保存
|
|
|
|
- handleOk () {},
|
|
|
|
- // 导入明细
|
|
|
|
- handleImport () {
|
|
|
|
- console.log(333)
|
|
|
|
|
|
+ // 整单删除
|
|
|
|
+ delBulkOrder () {
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '删除后不可恢复,确认删除所有已选产品吗?',
|
|
|
|
+ centered: true,
|
|
|
|
+ closable: true,
|
|
|
|
+ onOk () {
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ sparePartsPurDeleteAll({ sn: _this.$route.params.sn }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.chooseTable.refresh()
|
|
|
|
+ }
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 返回列表
|
|
// 返回列表
|
|
handleBack () {
|
|
handleBack () {
|
|
@@ -694,12 +764,21 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 确认导入明细
|
|
|
|
+ hanldeImprotOk (obj) {
|
|
|
|
+ this.spinning = true
|
|
|
|
+ sparePartsPurDetailInsertBatch(obj).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.resetChooseSearchForm()
|
|
|
|
+ }
|
|
|
|
+ this.spinning = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
initPage () {
|
|
initPage () {
|
|
this.getWarehouseCascade()
|
|
this.getWarehouseCascade()
|
|
this.getDetail()
|
|
this.getDetail()
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
this.$refs.chooseTable.refresh(true)
|
|
this.$refs.chooseTable.refresh(true)
|
|
- this.openModal = false
|
|
|
|
this.$refs.searchProductCode.focus()
|
|
this.$refs.searchProductCode.focus()
|
|
}
|
|
}
|
|
},
|
|
},
|