add
This commit is contained in:
parent
bed89975a9
commit
b7253c386e
|
@ -1,5 +1,5 @@
|
|||
NODE_ENV = 'development'
|
||||
VITE_NOW_TYPE = 'dist'
|
||||
# Base API
|
||||
# VITE_APP_BASE_URL='http://192.168.144.1:8546'
|
||||
VITE_APP_BASE_URL='https://erp.lihaink.cn'
|
||||
VITE_APP_BASE_URL='http://192.168.1.22:8546'
|
||||
# VITE_APP_BASE_URL='https://erp.lihaink.cn'
|
|
@ -16,7 +16,6 @@
|
|||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
<el-button @click="test">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="mt-4">
|
||||
|
@ -91,7 +90,6 @@ const emits = defineEmits(["customEvent"]);
|
|||
|
||||
// 选中数据子父传递
|
||||
const handleCurrentChange = (value: any) => {
|
||||
console.log(multipleSelection.value)
|
||||
if (props.multipleChoice) return
|
||||
emits("customEvent", value);
|
||||
};
|
||||
|
|
|
@ -163,13 +163,11 @@
|
|||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="标签" prop="sys_labels">
|
||||
<el-tag v-for="tag in formData.sys_labels_text.split(',')" :key="tag" closable :type="tag.type">
|
||||
{{ tag }}
|
||||
<el-tag class="mr-2" v-for="(item, index) in formData.sys_labels_arr" @close="delTags(index)"
|
||||
:key="index" closable>
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
|
||||
<el-button type="primary" @click="showDialog = true">添加标签</el-button>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -188,10 +186,9 @@ import Popup from '@/components/popup/index.vue'
|
|||
import { apiSupplierAdd, apiSupplierEdit, apiSupplierDetail } from '@/api/supplier'
|
||||
import { apicityLists, apiAreaLists, apiStreetLists, apiVillageLists } from "@/api/address"
|
||||
import { goods_label } from "@/components/dialogTable/dialogTableConfig"
|
||||
|
||||
|
||||
|
||||
import type { PropType } from 'vue'
|
||||
|
||||
|
||||
defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
|
@ -238,17 +235,14 @@ const formData = reactive({
|
|||
financial_wechat: '',
|
||||
financial_alipay: '',
|
||||
financial_type: '',
|
||||
sys_labels_arr: []
|
||||
})
|
||||
|
||||
const customEvent = (e) => {
|
||||
formData.sys_labels = []
|
||||
let text = []
|
||||
e.forEach(item => {
|
||||
formData.sys_labels.push(item.id)
|
||||
text.push(item.name)
|
||||
formData.sys_labels_arr.push(item)
|
||||
});
|
||||
formData.sys_labels_text = text.join(',')
|
||||
formData.sys_labels = formData.sys_labels.join(',')
|
||||
formData.sys_labels_arr = Array.from(new Set(formData.sys_labels_arr.map(obj => JSON.stringify(obj)))).map(str => JSON.parse(str));
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
|
@ -302,6 +296,11 @@ const formRules = reactive<any>({
|
|||
}]
|
||||
})
|
||||
|
||||
// 标签列表
|
||||
const delTags = (index: number) => {
|
||||
formData.sys_labels_arr.splice(index, 1)
|
||||
}
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
|
@ -317,7 +316,6 @@ const setFormData = async (data: Record<any, any>) => {
|
|||
if (data.financial_type == 0) {
|
||||
formData.financial_type = ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -332,6 +330,9 @@ const getDetail = async (row: Record<string, any>) => {
|
|||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
data.sys_labels = data.sys_labels_arr.map(item => {
|
||||
return item.id
|
||||
}).join(',')
|
||||
mode.value == 'edit'
|
||||
? await apiSupplierEdit(data)
|
||||
: await apiSupplierAdd(data)
|
||||
|
@ -361,7 +362,6 @@ const address = reactive({
|
|||
})
|
||||
|
||||
const getCityList = async (province_code: number | String, isAsync: Boolean) => {
|
||||
|
||||
if (!province_code) return;
|
||||
let res = await apicityLists({ province_code })
|
||||
address.cityList = res
|
||||
|
|
|
@ -52,12 +52,6 @@
|
|||
}" placeholder="请选择商品单位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="标签" prop="sys_labels">
|
||||
<el-input v-model="formData.sys_labels_text" readonly @click="showDialog = true" clearable
|
||||
placeholder="请输入标签" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="购货价格" prop="buy">
|
||||
<el-input v-model="formData.buy" clearable placeholder="请输入购货价格" />
|
||||
|
@ -127,11 +121,20 @@
|
|||
<el-input v-model="formData.sort" type="number" clearable placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品图片" prop="imgs">
|
||||
<material-picker v-model="formData.imgs" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="标签" prop="sys_labels_arr">
|
||||
<el-tag class="mr-2" v-for="(item, index) in formData.sys_labels_arr" @close="delTags(index)"
|
||||
:key="index" closable>
|
||||
{{ item.name }}
|
||||
</el-tag>
|
||||
<el-button type="primary" @click="showDialog = true">添加标签</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="商品详情" prop="details">
|
||||
<material-picker v-model="formData.details" :limit="9" />
|
||||
|
@ -196,6 +199,7 @@ const formData = reactive({
|
|||
retail_name: "",
|
||||
sys_labels_text: "",
|
||||
sys_labels: "",
|
||||
sys_labels_arr: [],
|
||||
imgs: "",
|
||||
details: "",
|
||||
data: "",
|
||||
|
@ -203,7 +207,10 @@ const formData = reactive({
|
|||
sort: "",
|
||||
});
|
||||
|
||||
|
||||
// 标签列表
|
||||
const delTags = (index: number) => {
|
||||
formData.sys_labels_arr.splice(index, 1)
|
||||
}
|
||||
|
||||
// const formData = reactive(
|
||||
// {
|
||||
|
@ -241,14 +248,10 @@ const formData = reactive({
|
|||
|
||||
|
||||
const customEvent = (e) => {
|
||||
formData.sys_labels = []
|
||||
let text = []
|
||||
e.forEach(item => {
|
||||
formData.sys_labels.push(item.id)
|
||||
text.push(item.name)
|
||||
formData.sys_labels_arr.push(item)
|
||||
});
|
||||
formData.sys_labels_text = text.join(',')
|
||||
formData.sys_labels = formData.sys_labels.join(',')
|
||||
formData.sys_labels_arr = Array.from(new Set(formData.sys_labels_arr.map(obj => JSON.stringify(obj)))).map(str => JSON.parse(str));
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
|
@ -405,23 +408,6 @@ const props = {
|
|||
},
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const classList = ref([]);
|
||||
const getClassList = () => {
|
||||
apiGoodsclassLists({}).then((res) => {
|
||||
|
@ -475,6 +461,9 @@ const getDetail = async (row: Record<string, any>) => {
|
|||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate();
|
||||
const data = { ...formData };
|
||||
data.sys_labels = data.sys_labels_arr.map(item => {
|
||||
return item.id
|
||||
}).join(',')
|
||||
mode.value == "edit" ? await apiGoodsEdit(data) : await apiGoodsAdd(data);
|
||||
popupRef.value?.close();
|
||||
emit("success");
|
||||
|
|
|
@ -67,13 +67,12 @@
|
|||
<el-table-column label="抵扣金额" prop="deduction_price" show-overflow-tooltip />
|
||||
<el-table-column label="实际金额" prop="actual" show-overflow-tooltip />
|
||||
<el-table-column label="实收金额" prop="money" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="制单人" prop="user" show-overflow-tooltip /> -->
|
||||
<el-table-column label="支付方式" prop="pay_type">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.pay_type" :value="row.pay_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" prop="type">
|
||||
<!-- <el-table-column label="审核状态" prop="type">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.auditing_type" :value="row.type" />
|
||||
</template>
|
||||
|
@ -83,16 +82,12 @@
|
|||
<template #default="{ row }">
|
||||
<span>{{ row.auditingtime ? timeFormat(row.auditingtime, 'yyyy-mm-dd hh:MM:ss') : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" width="170" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-if="row.type == 0" v-perms="['retail.cashierclass/edit']" type="primary" link
|
||||
<!-- <el-button v-if="row.type == 0" v-perms="['retail.cashierclass/edit']" type="primary" link
|
||||
@click="handleEdit(row)">
|
||||
审核
|
||||
</el-button>
|
||||
<!-- <el-button v-perms="['retail.cashierclass/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button> -->
|
||||
<el-button link @click="handleDetail(row)">
|
||||
详情
|
||||
|
|
Loading…
Reference in New Issue