|
@@ -1074,7 +1074,7 @@ import Clipboard from 'clipboard'
|
|
|
import { $t } from '@/i18n/index'
|
|
|
import imageUpload from '@/components/ImageUpload.vue'
|
|
|
// 用来对oss的图片、视频等媒体数据的url进行匹配替换
|
|
|
-import { getVendorList, createQuote } from '@/api/indent'
|
|
|
+import { getVendorList, createQuote, deleteIndent } from '@/api/indent'
|
|
|
import userAPI from '@/api/user'
|
|
|
|
|
|
defineComponent({
|
|
@@ -1302,9 +1302,24 @@ const initData = function (d: any, index: number) {
|
|
|
forms.value.push(Object.assign({}, cloneDeep(formDemo), temp))
|
|
|
}
|
|
|
const deleteForm = function (index: number) {
|
|
|
- forms.value.splice(index, 1)
|
|
|
+ let deleteItem = forms.value.splice(index, 1)
|
|
|
productImageList.value.splice(index, 1)
|
|
|
vendorList.value.splice(index, 1)
|
|
|
+ console.log(deleteItem, 'deleteItem')
|
|
|
+ if (!['0', 0].includes(parentId)) {
|
|
|
+ deleteIndent({
|
|
|
+ indent_ids: [],
|
|
|
+ quote_ids: deleteItem.map((i) => `${parentId}_${i.entity_id}`),
|
|
|
+ }).then((response: any) => {
|
|
|
+ if (response.code === 1) {
|
|
|
+ ElNotification({
|
|
|
+ title: '删除成功',
|
|
|
+ message: '删除成功',
|
|
|
+ duration: 3000,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
const addFormColumn = function () {
|
|
|
if (canAddForm.value) {
|