|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-page-header @back="pageType=0" content="新增" style=" padding: 20px 20px 0 20px;"></el-page-header>
|
|
|
+ <el-page-header @back="handleBack" content="新增" style="padding: 20px 20px 0 20px"></el-page-header>
|
|
|
<warehousing-header ref="header" />
|
|
|
<sales-table :dataList="dataList" :column="column" isOperation isSelection @handleSelection="handleSelection">
|
|
|
<template #bts>
|
|
|
<div>
|
|
|
- <el-button type="primary" size="mini" @click="dialogVisible=true">添加</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="dialogVisible = true">添加</el-button>
|
|
|
<el-button type="danger" size="mini" @click="delChange">删除</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -15,21 +15,22 @@
|
|
|
<el-button size="mini">重置</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <template v-slot:custom="{item:{row,$index}}">
|
|
|
+ <template v-slot:custom="{ item: { row, $index } }">
|
|
|
<el-radio label="1" v-model="row.flag">增加</el-radio>
|
|
|
<el-radio label="-1" v-model="row.flag">减少</el-radio>
|
|
|
</template>
|
|
|
- <template v-slot:operation="{item:{row,$index}}">
|
|
|
- <el-popconfirm
|
|
|
- style="margin-left: 10px"
|
|
|
- title="删除?"
|
|
|
- @onConfirm="handleDel(row,$index)"
|
|
|
- >
|
|
|
+ <template v-slot:operation="{ item: { row, $index } }">
|
|
|
+ <el-popconfirm style="margin-left: 10px" title="删除?" @onConfirm="handleDel(row, $index)">
|
|
|
<el-button slot="reference" type="text" size="mini">删除</el-button>
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
</sales-table>
|
|
|
- <sales-dialog :dialogVisible="dialogVisible" :customerNumber="customerNumber" :func="getDialogList" @confirm="confirm" />
|
|
|
+ <sales-dialog
|
|
|
+ :dialogVisible="dialogVisible"
|
|
|
+ :customerNumber="customerNumber"
|
|
|
+ :func="getDialogList"
|
|
|
+ @confirm="confirm"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -50,10 +51,10 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
dialogVisible: false,
|
|
|
- customerNumber:'',
|
|
|
+ customerNumber: '',
|
|
|
dataList: [],
|
|
|
selection: [],
|
|
|
- flag:1,
|
|
|
+ flag: 1,
|
|
|
column: [
|
|
|
{
|
|
|
prop: 'materialName',
|
|
@@ -80,7 +81,6 @@ export default {
|
|
|
label: '发生方向',
|
|
|
width: '180',
|
|
|
isCustom: true
|
|
|
-
|
|
|
},
|
|
|
{
|
|
|
prop: 'stockChangeQty',
|
|
@@ -93,7 +93,6 @@ export default {
|
|
|
label: '备注',
|
|
|
width: '180',
|
|
|
isInput: true
|
|
|
-
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -109,7 +108,6 @@ export default {
|
|
|
this.$refs.header.screenForm.customerNumber = this.dataList[0].customerNumber
|
|
|
this.customerNumber = this.dataList[0].customerNumber
|
|
|
this.dialogVisible = false
|
|
|
-
|
|
|
},
|
|
|
handleDel(item, index) {
|
|
|
this.dataList.splice(index, 1)
|
|
@@ -138,15 +136,15 @@ export default {
|
|
|
}
|
|
|
addFrontOrder(params).then(res => {
|
|
|
this.$successMsg('新增成功')
|
|
|
- this.$emti('close')
|
|
|
+ this.handleBack()
|
|
|
this.$forceUpdate()
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ handleBack() {
|
|
|
+ this.$emit('close')
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-
|
|
|
-</style>
|
|
|
+<style scoped></style>
|