|
@@ -83,13 +83,13 @@
|
|
|
align="center">
|
|
align="center">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="materialName"
|
|
|
|
|
|
|
+ prop="productName"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="center"
|
|
align="center"
|
|
|
label="产品名称">
|
|
label="产品名称">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="-"
|
|
|
|
|
|
|
+ prop="cnt"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="center"
|
|
align="center"
|
|
|
label="数量"
|
|
label="数量"
|
|
@@ -103,9 +103,12 @@
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="center"
|
|
align="center"
|
|
|
label="含税单价">
|
|
label="含税单价">
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-input-number v-model="scope.row.price" :disabled="display" :precision="2" :step="0.1" :min="0" style="width: 140px;"/>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="-"
|
|
|
|
|
|
|
+ prop="amount"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="center"
|
|
align="center"
|
|
|
label="含税总价">
|
|
label="含税总价">
|
|
@@ -114,7 +117,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
- prop="-"
|
|
|
|
|
|
|
+ prop="rate"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
align="center"
|
|
align="center"
|
|
|
label="税率">
|
|
label="税率">
|
|
@@ -150,7 +153,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import templateChose from '../warehouse/template-chose'
|
|
|
|
|
|
|
+ import templateChose from '../product/template-chose'
|
|
|
import { getCustomer, getCoDetail } from '@/api/cus'
|
|
import { getCustomer, getCoDetail } from '@/api/cus'
|
|
|
import { uploadUrl, downloadUrl, uploadFiles } from '@/api/file'
|
|
import { uploadUrl, downloadUrl, uploadFiles } from '@/api/file'
|
|
|
import { getDictList } from '@/api/dict'
|
|
import { getDictList } from '@/api/dict'
|
|
@@ -198,6 +201,7 @@
|
|
|
methods: {
|
|
methods: {
|
|
|
async init (id, display) {
|
|
async init (id, display) {
|
|
|
this.dataForm = {}
|
|
this.dataForm = {}
|
|
|
|
|
+ this.cusRCommProductVOS = []
|
|
|
this.visible = true
|
|
this.visible = true
|
|
|
this.id = id || 0
|
|
this.id = id || 0
|
|
|
this.display = display
|
|
this.display = display
|
|
@@ -207,11 +211,6 @@
|
|
|
this.options = data
|
|
this.options = data
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
- // await getType().then(({data}) => {
|
|
|
|
|
- // if (data && data.code === '200') {
|
|
|
|
|
- // this.options = data.data
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
await getCustomer().then(({data}) => {
|
|
await getCustomer().then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
if (data && data.code === '200') {
|
|
|
this.optionsCus = data.data
|
|
this.optionsCus = data.data
|
|
@@ -230,7 +229,16 @@
|
|
|
id: item.url
|
|
id: item.url
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
- // console.log('this.fileList = ' + JSON.stringify(this.fileList))
|
|
|
|
|
|
|
+ data.data.cusRCommProductVOS.forEach((item) => {
|
|
|
|
|
+ this.cusRCommProductVOS.push({
|
|
|
|
|
+ cnt: item.cnt,
|
|
|
|
|
+ price: item.price,
|
|
|
|
|
+ productId: item.productId,
|
|
|
|
|
+ rate: item.rate,
|
|
|
|
|
+ productName: item.productName,
|
|
|
|
|
+ notes: item.notes
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -277,7 +285,7 @@
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
let fList = this.fileList
|
|
let fList = this.fileList
|
|
|
- console.log('fileList = ' + fList)
|
|
|
|
|
|
|
+ // console.log('fileList = ' + fList)
|
|
|
if (fList.length > 0) {
|
|
if (fList.length > 0) {
|
|
|
this.dataForm.attachList = []
|
|
this.dataForm.attachList = []
|
|
|
for (let i = 0; i < fList.length; i++) {
|
|
for (let i = 0; i < fList.length; i++) {
|
|
@@ -322,11 +330,11 @@
|
|
|
addItem (item) {
|
|
addItem (item) {
|
|
|
this.cusRCommProductVOS.push({
|
|
this.cusRCommProductVOS.push({
|
|
|
cnt: 1,
|
|
cnt: 1,
|
|
|
- price: item.price,
|
|
|
|
|
- productId: item.id,
|
|
|
|
|
|
|
+ price: 0,
|
|
|
|
|
+ productId: item.productId,
|
|
|
rate: 0,
|
|
rate: 0,
|
|
|
- materialName: item.materialName,
|
|
|
|
|
- notes: item.materialName
|
|
|
|
|
|
|
+ productName: item.productName,
|
|
|
|
|
+ notes: item.notes
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|