|
@@ -115,28 +115,45 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
|
|
|
-<!-- 导入库存-->
|
|
|
+
|
|
|
<el-dialog
|
|
|
- title="导入库存"
|
|
|
+ title="导入商品"
|
|
|
append-to-body
|
|
|
- :visible.sync="dialogStock"
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
width="80%"
|
|
|
:close-on-click-modal="false"
|
|
|
:destroy-on-close="true"
|
|
|
- :close-on-press-escape="false"
|
|
|
- ></el-dialog>
|
|
|
-<!-- 导入商品-->
|
|
|
- <el-dialog
|
|
|
- title="导入商品"
|
|
|
- :visible.sync="dialogCommodity"
|
|
|
- width="70%"
|
|
|
- append-to-body
|
|
|
- :before-close="handleClose">
|
|
|
- <span>暂无数据</span>
|
|
|
+ :close-on-press-escape="false">
|
|
|
+ <el-row style="height: 0;">
|
|
|
+ <el-col :span="5">
|
|
|
+ <div>
|
|
|
+ <el-scrollbar>
|
|
|
+ <basic-container>
|
|
|
+ <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
|
|
|
+ </basic-container>
|
|
|
+ </el-scrollbar>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <basic-container>
|
|
|
+ <avue-crud :option="optionTwo"
|
|
|
+ :table-loading="loading"
|
|
|
+ :data="data"
|
|
|
+ ref="crud"
|
|
|
+ @refresh-change="refreshChange"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ :page.sync="page"
|
|
|
+ @on-load="onLoad"></avue-crud>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="dialogCommodity = false">取 消</el-button>
|
|
|
- <el-button type="primary" @click="dialogCommodity = false">确 定</el-button>
|
|
|
- </span>
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
|
|
|
+ <el-button type="primary" @click="importChoice" v-if="commodityData === true"
|
|
|
+ :disabled="tableData.length !== 1">导入</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
<!-- 导入其他费用-->
|
|
|
<el-dialog
|
|
@@ -186,7 +203,8 @@ import importInventory from './config/importInventory.json';
|
|
|
import uploadList from './config/uploadList.json';
|
|
|
import advantageProject from "./config/advantageProject.json";
|
|
|
import optionTwoCost from "./config/mainListCost.json";
|
|
|
-import {getDeptLazyTree,customerList} from "@/api/basicData/basicFeesDesc";
|
|
|
+import {getDeptLazyTree,getDeptLazyTreeTwo, customerList} from "@/api/basicData/basicFeesDesc";
|
|
|
+import commodity from "./config/commodity.json"
|
|
|
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
@@ -194,13 +212,14 @@ export default {
|
|
|
return {
|
|
|
disabled: false,
|
|
|
dialogCommodity: false,
|
|
|
+ dialogVisible: false,
|
|
|
form: {},
|
|
|
// 基础信息
|
|
|
basicData: {
|
|
|
column: [
|
|
|
{
|
|
|
label: '系统号',
|
|
|
- prop: 'a1',
|
|
|
+ prop: 'sysNo',
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -210,7 +229,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '订单号',
|
|
|
- prop: 'a2',
|
|
|
+ prop: 'orderNo',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -220,7 +239,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '订单日期',
|
|
|
- prop: 'a3',
|
|
|
+ prop: 'businessDate',
|
|
|
type:'datetime',
|
|
|
data: [],
|
|
|
rules: [
|
|
@@ -232,12 +251,9 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '业务员',
|
|
|
- prop: 'a4',
|
|
|
+ prop: 'salesName',
|
|
|
type:'select',
|
|
|
- dicData: [
|
|
|
- {value:1,label: '张三'},
|
|
|
- {value:2,label: '李四'},
|
|
|
- ],
|
|
|
+ dicData: [],
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -247,12 +263,9 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '销售公司',
|
|
|
- prop: 'a5',
|
|
|
+ prop: 'belongToCorpId',
|
|
|
type:'select',
|
|
|
- dicData: [
|
|
|
- {value:1,label: '一家公司'},
|
|
|
- {value:2,label: '另一家公司'},
|
|
|
- ],
|
|
|
+ dicData: [],
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -262,12 +275,9 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '工厂/贸易商名称',
|
|
|
- prop: 'a6',
|
|
|
+ prop: 'corpId',
|
|
|
type:'select',
|
|
|
- dicData: [
|
|
|
- {value:1,label: '大厂'},
|
|
|
- {value:2,label: '小厂'},
|
|
|
- ],
|
|
|
+ dicData: [],
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -277,7 +287,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '提成标准',
|
|
|
- prop: 'a7',
|
|
|
+ prop: 'commissionRate',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -287,7 +297,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '发票号(PI)',
|
|
|
- prop: 'a8',
|
|
|
+ prop: 'proformaInvoice',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -297,7 +307,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '起运港',
|
|
|
- prop: 'b1',
|
|
|
+ prop: 'portOfLoad',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -308,7 +318,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '目的港',
|
|
|
- prop: 'b2',
|
|
|
+ prop: 'portOfDestination',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -319,7 +329,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '包装要求',
|
|
|
- prop: 'b3',
|
|
|
+ prop: 'packageRemarks',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -330,7 +340,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '计划交期',
|
|
|
- prop: 'b4',
|
|
|
+ prop: 'plannedDeliveryDate',
|
|
|
type: 'datetime',
|
|
|
rules: [
|
|
|
{
|
|
@@ -365,7 +375,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '首付金额',
|
|
|
- prop: 'b7',
|
|
|
+ prop: 'advancePayment',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -376,7 +386,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: '销售单价',
|
|
|
- prop: 'a9',
|
|
|
+ prop: 'salesPrice',
|
|
|
data: [],
|
|
|
rules: [
|
|
|
{
|
|
@@ -387,7 +397,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '发票重量',
|
|
|
- prop: 'a10',
|
|
|
+ prop: 'invoiceWeight',
|
|
|
data: [],
|
|
|
rules: [
|
|
|
{
|
|
@@ -398,7 +408,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '码单重量',
|
|
|
- prop: 'a11',
|
|
|
+ prop: 'billWeight',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -408,7 +418,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '币别',
|
|
|
- prop: 'a12',
|
|
|
+ prop: 'currency',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -418,17 +428,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '汇率',
|
|
|
- prop: 'a13',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '预收金额',
|
|
|
- prop: 'a14',
|
|
|
+ prop: 'exChangeRate',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -436,9 +436,21 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
- }, {
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '预收金额',
|
|
|
+ // prop: 'a14',
|
|
|
+ // rules: [
|
|
|
+ // {
|
|
|
+ // required: true,
|
|
|
+ // message: ' ',
|
|
|
+ // trigger: 'blur'
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // },
|
|
|
+ {
|
|
|
label: '合同金额',
|
|
|
- prop: 'a15',
|
|
|
+ prop: 'orderAmount',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -448,7 +460,7 @@ export default {
|
|
|
]
|
|
|
}, {
|
|
|
label: '收款金额',
|
|
|
- prop: 'a16',
|
|
|
+ prop: 'settlmentAmount',
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -501,6 +513,39 @@ export default {
|
|
|
children: 'children'
|
|
|
}
|
|
|
},
|
|
|
+ treeOption: {
|
|
|
+ nodeKey: 'id',
|
|
|
+ lazy: true,
|
|
|
+ treeLoad: function (node, resolve) {
|
|
|
+ const parentId = (node.level === 0) ? 0 : node.data.id;
|
|
|
+ getDeptLazyTreeTwo(parentId).then(res => {
|
|
|
+ resolve(res.data.data.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ leaf: !item.hasChildren
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addBtn: false,
|
|
|
+ menu: false,
|
|
|
+ size: 'small',
|
|
|
+ props: {
|
|
|
+ labelText: '标题',
|
|
|
+ label: 'title',
|
|
|
+ value: 'value',
|
|
|
+ children: 'children'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 导入商品配置
|
|
|
+ optionGoods: [],
|
|
|
+ loadingGoods: false,
|
|
|
+ dataGoods:[],
|
|
|
+ pageGoods:{
|
|
|
+ pageSize: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
// 导入其他费用配置
|
|
|
optionTwoCost: optionTwoCost,
|
|
|
loadingCost: false,
|
|
@@ -518,40 +563,14 @@ export default {
|
|
|
// 合同数据
|
|
|
bankOfDepositData: [],
|
|
|
bankOfDepositForm: {},
|
|
|
+
|
|
|
+ optionTwo: commodity,
|
|
|
+ loading: false,
|
|
|
+ data: [],
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
if (this.$route.query.id) {
|
|
|
- this.form = {
|
|
|
- id: 1,
|
|
|
- a1: '101801',
|
|
|
- a2: 'HT20211019',
|
|
|
- a3: '2021-10-19',
|
|
|
- a4: 1,
|
|
|
- a5: 2,
|
|
|
- a6: 1,
|
|
|
- a7: 1.2,
|
|
|
- a8: 'FP01',
|
|
|
- a9: 10,
|
|
|
- a10: 1.8,
|
|
|
- a11: 1.11,
|
|
|
- a12: '美元',
|
|
|
- a13: '6.4369',
|
|
|
- a14: 1000,
|
|
|
- a15: 8000,
|
|
|
- a16: 1000,
|
|
|
- orderRemark: '我是测试',
|
|
|
- b1: '青岛',
|
|
|
- b2: '威海',
|
|
|
- b3: '密封',
|
|
|
- b4: '2021-10-20',
|
|
|
- b5: '2021-10-19',
|
|
|
- b6: '10%',
|
|
|
- b7: 1000,
|
|
|
- }
|
|
|
- this.importInventoryData = [
|
|
|
- {a: '101801', b: 'HT2021101901',c: '巴西棉',d :'巴西',e: 800,f: 1.3,g: 1.11,h:10,i:8000,j: 6.4369,remarks:'测试备注'}
|
|
|
- ]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -592,6 +611,17 @@ export default {
|
|
|
this.loadingCost = false;
|
|
|
});
|
|
|
},
|
|
|
+ //商品列表查询
|
|
|
+ onLoad(page, params = {}) {
|
|
|
+ this.loading = true;
|
|
|
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ const data = res.data.data;
|
|
|
+ this.page.total = data.total;
|
|
|
+ this.data = data.records;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
//点击费用明细选择触发
|
|
|
choice(row){
|
|
|
this.dialogCost = !this.dialogCost
|
|
@@ -603,12 +633,22 @@ export default {
|
|
|
this.pageCost.currentPage = 1;
|
|
|
this.onLoadCost(this.pageCost);
|
|
|
},
|
|
|
+ //刷新触发
|
|
|
+ refreshChange() {
|
|
|
+ this.treeDeptId = '';
|
|
|
+ this.page.currentPage = 1;
|
|
|
+ this.onLoad(this.page);
|
|
|
+ },
|
|
|
//费用刷新触发
|
|
|
refreshChangeCost() {
|
|
|
this.treeDeptIdCost = '';
|
|
|
this.pageCost.currentPage = 1;
|
|
|
this.onLoadCost(this.pageCost);
|
|
|
},
|
|
|
+ //选中触发
|
|
|
+ selectionChange(list) {
|
|
|
+ this.tableData = list
|
|
|
+ },
|
|
|
//费用选中触发
|
|
|
selectionChangeCost(list){
|
|
|
this.tableDataCost = list
|