|
@@ -0,0 +1,351 @@
|
|
|
+<template>
|
|
|
+ <div class="bulkWarehousingOrderEdit-wrap">
|
|
|
+ <!-- 内容 -->
|
|
|
+ <a-page-header title="单号:CG2021010100001" style="margin-top: -24px;" >
|
|
|
+ <!-- 操作区,位于 title 行的行尾 -->
|
|
|
+ <template slot="extra">
|
|
|
+ <a-button key="2" id="bulkWarehousingOrderEdit-preview-btn">打印预览</a-button>
|
|
|
+ <a-button key="1" type="primary" id="bulkWarehousingOrderEdit-print-btn">快速打印</a-button>
|
|
|
+ </template>
|
|
|
+ </a-page-header>
|
|
|
+ <!-- 基础信息 -->
|
|
|
+ <a-card :bordered="false" class="bulkWarehousingOrderEdit-cont">
|
|
|
+ <a-collapse :activeKey="['1']">
|
|
|
+ <a-collapse-panel key="1">
|
|
|
+ <template slot="header">
|
|
|
+ 基础信息
|
|
|
+ <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="bulkWarehousingOrderEdit-edit-circle-btn" @click.stop="handleEditInfo" />
|
|
|
+ </template>
|
|
|
+ <a-descriptions :column="3">
|
|
|
+ <a-descriptions-item label="供应商">箭冠营销中心</a-descriptions-item>
|
|
|
+ <a-descriptions-item label="类型">箭冠营销中心</a-descriptions-item>
|
|
|
+ </a-descriptions>
|
|
|
+ </a-collapse-panel>
|
|
|
+ </a-collapse>
|
|
|
+ </a-card>
|
|
|
+ <!-- 选择产品 -->
|
|
|
+ <a-card :bordered="false" class="bulkWarehousingOrderEdit-cont">
|
|
|
+ <a-collapse :activeKey="['1']">
|
|
|
+ <a-collapse-panel key="1">
|
|
|
+ <template slot="header">
|
|
|
+ 选择产品<span class="sub-title">①输入查询条件--->②查找到需要入库的配件--->③录入成本价、数量、仓库、仓位--->④点击“添加”</span>
|
|
|
+ </template>
|
|
|
+ <!-- 选择产品 -->
|
|
|
+ <div>
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="关键词">
|
|
|
+ <a-input id="bulkWarehousingOrderEdit-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="产品名称/产品编码/原厂编码"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="产品品牌">
|
|
|
+ <a-select placeholder="请选择" id="bulkWarehousingOrderEdit-state" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
|
|
|
+ <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="产品类别">
|
|
|
+ <a-cascader :options="typeData" id="bulkWarehousingOrderEdit-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderEdit-refresh">查询</a-button>
|
|
|
+ <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderEdit-reset">重置</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ bordered>
|
|
|
+ <!-- 成本价 -->
|
|
|
+ <template slot="costPrice" slot-scope="text, record">
|
|
|
+ <a-input-number
|
|
|
+ id="bulkWarehousingOrderEdit-costPrice"
|
|
|
+ :value="record.costPrice"
|
|
|
+ :precision="2"
|
|
|
+ :min="0"
|
|
|
+ :max="999999"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </template>
|
|
|
+ <!-- 数量 -->
|
|
|
+ <template slot="quantity" slot-scope="text, record">
|
|
|
+ <a-input-number
|
|
|
+ id="bulkWarehousingOrderEdit-quantity"
|
|
|
+ :value="record.quantity"
|
|
|
+ :precision="0"
|
|
|
+ :min="0"
|
|
|
+ :max="999999"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </template>
|
|
|
+ <!-- 仓库 -->
|
|
|
+ <template slot="warehouse" slot-scope="text, record">
|
|
|
+ <a-select id="bulkWarehousingOrderEdit-warehouse" placeholder="请选择" allowClear v-model="record.warehouse">
|
|
|
+ <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </template>
|
|
|
+ <!-- 仓位 -->
|
|
|
+ <template slot="position" slot-scope="text, record">
|
|
|
+ <a-select id="bulkWarehousingOrderEdit-position" placeholder="请选择" allowClear v-model="record.position">
|
|
|
+ <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button type="primary" @click="handleAdd(record)" id="bulkWarehousingOrderEdit-add-btn">添加</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </div>
|
|
|
+ </a-collapse-panel>
|
|
|
+ </a-collapse>
|
|
|
+ </a-card>
|
|
|
+ <!-- 已选产品 -->
|
|
|
+ <a-card :bordered="false" class="bulkWarehousingOrderEdit-cont">
|
|
|
+ <a-collapse :activeKey="['1']">
|
|
|
+ <a-collapse-panel key="1">
|
|
|
+ <template slot="header">
|
|
|
+ 已选产品
|
|
|
+ <a-button size="small" class="import-btn" id="bulkWarehousingOrderEdit-import-btn" @click.stop="handleImport">导入明细</a-button>
|
|
|
+ </template>
|
|
|
+ <!-- 已选产品 -->
|
|
|
+ <div>
|
|
|
+ <!-- 总计 -->
|
|
|
+ <a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
+ <div slot="message">总款数 <strong>6</strong> ,总数量 <strong>6</strong> ,总成本¥<strong>6.33</strong></div>
|
|
|
+ </a-alert>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="chooseColumns"
|
|
|
+ :data="chooseLoadData"
|
|
|
+ bordered>
|
|
|
+ <!-- 成本价 -->
|
|
|
+ <template slot="costPrice" slot-scope="text, record">
|
|
|
+ <a-input-number
|
|
|
+ id="bulkWarehousingOrderEdit-costPrice"
|
|
|
+ :value="record.costPrice"
|
|
|
+ :precision="2"
|
|
|
+ :min="0"
|
|
|
+ :max="999999"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </template>
|
|
|
+ <!-- 数量 -->
|
|
|
+ <template slot="quantity" slot-scope="text, record">
|
|
|
+ <a-input-number
|
|
|
+ id="bulkWarehousingOrderEdit-quantity"
|
|
|
+ :value="record.quantity"
|
|
|
+ :precision="0"
|
|
|
+ :min="0"
|
|
|
+ :max="999999"
|
|
|
+ placeholder="请输入" />
|
|
|
+ </template>
|
|
|
+ <!-- 仓库 -->
|
|
|
+ <template slot="warehouse" slot-scope="text, record">
|
|
|
+ <a-select id="bulkWarehousingOrderEdit-warehouse" placeholder="请选择" allowClear v-model="record.warehouse">
|
|
|
+ <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </template>
|
|
|
+ <!-- 仓位 -->
|
|
|
+ <template slot="position" slot-scope="text, record">
|
|
|
+ <a-select id="bulkWarehousingOrderEdit-position" placeholder="请选择" allowClear v-model="record.position">
|
|
|
+ <a-select-option v-for="item in customeList" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button type="primary" @click="handleDel(record)" id="bulkWarehousingOrderEdit-del-btn">删除</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </div>
|
|
|
+ </a-collapse-panel>
|
|
|
+ </a-collapse>
|
|
|
+ </a-card>
|
|
|
+ <!-- 选择基本信息弹框 -->
|
|
|
+ <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import { STable, VSelect } from '@/components'
|
|
|
+ import basicInfoModal from './basicInfoModal.vue'
|
|
|
+ export default{
|
|
|
+ components: { STable, VSelect, basicInfoModal },
|
|
|
+ data(){
|
|
|
+ return{
|
|
|
+ queryParam: {
|
|
|
+
|
|
|
+ },
|
|
|
+ brandData: [], // 产品品牌 下拉数据
|
|
|
+ typeData: [], // 产品类别 下拉数据
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ // 表头
|
|
|
+ columns: [
|
|
|
+ { title: '产品编码', dataIndex: 'creatDate', align: 'center', sorter: true },
|
|
|
+ { title: '产品名称', dataIndex: 'custName', align: 'center' },
|
|
|
+ { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
|
|
|
+ { title: '产品品牌', dataIndex: 'custsName', align: 'center', sorter: true },
|
|
|
+ { title: '单位', dataIndex: 'custsNdame', align: 'center' },
|
|
|
+ { title: '成本价', scopedSlots: { customRender: 'costPrice' }, align: 'center' },
|
|
|
+ { title: '数量', scopedSlots: { customRender: 'quantity' }, align: 'center' },
|
|
|
+ { title: '仓库', scopedSlots: { customRender: 'warehouse' }, align: 'center' },
|
|
|
+ { title: '仓位', scopedSlots: { customRender: 'position' }, align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
+ // const 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
|
|
|
+ // }
|
|
|
+ // this.disabled = false
|
|
|
+ // return data
|
|
|
+ // })
|
|
|
+ const _this = this
|
|
|
+ return new Promise(function(resolve, reject){
|
|
|
+ const data = {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ list: [
|
|
|
+ { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
+ ],
|
|
|
+ count: 10
|
|
|
+ }
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ _this.disabled = false
|
|
|
+ resolve(data)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 表头
|
|
|
+ chooseColumns: [
|
|
|
+ { title: '产品编码', dataIndex: 'creatDate', align: 'center', sorter: true },
|
|
|
+ { title: '产品名称', dataIndex: 'custName', align: 'center' },
|
|
|
+ { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
|
|
|
+ { title: '产品品牌', dataIndex: 'custsName', align: 'center', sorter: true },
|
|
|
+ { title: '单位', dataIndex: 'custsNdame', align: 'center' },
|
|
|
+ { title: '成本价', scopedSlots: { customRender: 'costPrice' }, align: 'center' },
|
|
|
+ { title: '数量', scopedSlots: { customRender: 'quantity' }, align: 'center' },
|
|
|
+ { title: '成本小计', dataIndex: 'custsNdsame', align: 'center' },
|
|
|
+ { title: '仓库', scopedSlots: { customRender: 'warehouse' }, align: 'center' },
|
|
|
+ { title: '仓位', scopedSlots: { customRender: 'position' }, align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ chooseLoadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
|
|
|
+ // const 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
|
|
|
+ // }
|
|
|
+ // this.disabled = false
|
|
|
+ // return data
|
|
|
+ // })
|
|
|
+ const _this = this
|
|
|
+ return new Promise(function(resolve, reject){
|
|
|
+ const data = {
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ list: [
|
|
|
+ { id: '1', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
|
|
|
+ ],
|
|
|
+ count: 10
|
|
|
+ }
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ _this.disabled = false
|
|
|
+ resolve(data)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openModal: false, // 选择基本信息弹框是否显示
|
|
|
+ customeList: [], // 仓库 下拉数据
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 重置
|
|
|
+ resetSearchForm () {
|
|
|
+ this.queryParam.orderBundleNo = ''
|
|
|
+ this.queryParam.orderBundle.custMobile = ''
|
|
|
+ this.queryParam.bundleName = ''
|
|
|
+ this.queryParam.itemName = ''
|
|
|
+ this.oldTime = undefined
|
|
|
+ this.newTime = undefined
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ // 添加
|
|
|
+ handleAdd(row){},
|
|
|
+ // 删除
|
|
|
+ handleDel(row){},
|
|
|
+ // 编辑基本信息
|
|
|
+ handleEditInfo(){
|
|
|
+ this.openModal = true
|
|
|
+ },
|
|
|
+ // 基本信息 保存
|
|
|
+ handleOk(){
|
|
|
+
|
|
|
+ },
|
|
|
+ // 导入明细
|
|
|
+ handleImport(){
|
|
|
+ console.log(333)
|
|
|
+ },
|
|
|
+ filterOption(input, option) {
|
|
|
+ return (
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
+ )
|
|
|
+ },
|
|
|
+ },
|
|
|
+ beforeRouteEnter (to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ vm.openModal = false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+ .bulkWarehousingOrderEdit-wrap{
|
|
|
+ .bulkWarehousingOrderEdit-cont{
|
|
|
+ margin-bottom: 15px;
|
|
|
+ .sub-title{
|
|
|
+ font-size: 12px;
|
|
|
+ color: #808695;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+ .tag-txt{
|
|
|
+ font-size: 12px;
|
|
|
+ color: #ff0000;
|
|
|
+ }
|
|
|
+ .edit-circle-btn{
|
|
|
+ margin-left: 15px;
|
|
|
+ i{
|
|
|
+ vertical-align: text-bottom;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .import-btn{
|
|
|
+ margin-left: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|