This commit is contained in:
zmj 2024-05-15 18:37:15 +08:00
parent dd2d362f97
commit bed89975a9
7 changed files with 69 additions and 26 deletions

View File

@ -1,5 +1,5 @@
NODE_ENV = 'development'
VITE_NOW_TYPE = 'dist'
# Base API
# VITE_APP_BASE_URL='http://192.168.1.21:8546'
# VITE_APP_BASE_URL='http://192.168.144.1:8546'
VITE_APP_BASE_URL='https://erp.lihaink.cn'

View File

@ -39,3 +39,13 @@ export function apiOpurchaseclassGoodsOfferList(params: any) {
export function apiOpurchaseclassGoodsOfferUpdate(params: any) {
return request.post({ url: '/operation/Opurchaseclass/goods_offer_update', params })
}
// 采购详情报价列表
export function apiOpurchaseinfoListList(params: any) {
return request.get({ url: '/operation/opurchaseclass/opurchaseinfo_list', params })
}
export function apicreateSupplierGoods(params: any) {
return request.post({ url: '/operation/opurchaseclass/createSupplierGoods', params })
}

View File

@ -2,7 +2,6 @@
<div>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline @submit.native.prevent>
<el-form-item :label="item.label" v-for="(item, index) in config.serchList" :key="index">
<el-select v-model="queryParams[item.value]" v-if="item.select" :disabled="isDisabled(item.value)">
<el-option :label="i.name" :value="i.value" v-for="i in item.select"
@ -17,10 +16,11 @@
<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">
<el-table :data="pager.lists" @cell-click="handleCurrentChange" row-key="id"
<el-table :data="pager.lists" ref="elTable" @cell-click="handleCurrentChange" row-key="id"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" v-if="multipleChoice" />
@ -91,6 +91,7 @@ const emits = defineEmits(["customEvent"]);
//
const handleCurrentChange = (value: any) => {
console.log(multipleSelection.value)
if (props.multipleChoice) return
emits("customEvent", value);
};
@ -102,6 +103,10 @@ const handleSelectionChange = (val: any) => {
multipleSelection.value = val
}
const test = () => {
multipleSelection.value = []
}
const confirm = () => {
emits("customEvent", multipleSelection.value);
}

View File

@ -41,12 +41,7 @@
<el-input v-model="formData.interest_rate" clearable placeholder="请输入利率" :readonly="false" />
</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="city_id">
<el-select class="flex-1" v-model="formData.city_id" clearable placeholder="请选择城市"
@ -87,8 +82,6 @@
<el-input v-model="formData.mer_address" clearable placeholder="请输入商户地址" :readonly="false" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商户是否禁用" prop="status">
<el-radio-group v-model="formData.status" placeholder="请选择商户是否禁用" :disabled="false">
@ -168,6 +161,17 @@
</el-select>
</el-form-item>
</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>
<el-button type="primary" @click="showDialog = true">添加标签</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-dialog v-model="showDialog" title="选择标签" width="70%">

View File

@ -62,9 +62,9 @@
<el-descriptions-item label="商品图片">
<material-picker v-model="formData.imgs" disabled />
</el-descriptions-item>
<!-- <el-descriptions-item label="商品详情">
<material-picker v-model="formData.details" disabled />
</el-descriptions-item> -->
<el-descriptions-item label="备注信息">
{{ formData.data }}
</el-descriptions-item>
</el-descriptions>
</popup>
</div>

View File

@ -276,10 +276,10 @@ const formRules = reactive<any>({
trigger: ["blur"],
},
],
buy: [
sell: [
{
required: true,
message: "请输入货价格",
message: "请输入货价格",
trigger: ["blur"],
},
],

View File

@ -26,11 +26,7 @@
{{ form.merchant_name }}
</el-descriptions-item>
</el-descriptions>
<el-table
:data="form.goods_info"
border
style="width: 100%; margin-top: 20px"
>
<el-table :data="form.goods_info" border style="width: 100%; margin-top: 20px">
<el-table-column prop="id" label="ID" width="120" />
<el-table-column prop="goods_name" label="商品名称" />
<el-table-column prop="price" label="单价(元)" />
@ -46,7 +42,19 @@
<el-tab-pane label="报价列表" name="offer">
<goodsOffer ref="goodsOfferRef" />
</el-tab-pane>
<!-- <el-tab-pane label="详情3" name="fourth">Task</el-tab-pane> -->
<el-tab-pane label="未推送商品" name="notPushedGoods">
<el-button type="primary" @click="rePush">
重新推送
</el-button>
<el-table :data="pager.lists">
<el-table-column label="商品名称" prop="goods_name" show-overflow-tooltip />
<el-table-column label="单位" prop="unit_name" show-overflow-tooltip />
<el-table-column label="单价(元)" prop="price" show-overflow-tooltip />
<el-table-column prop="nums" label="数量" />
<el-table-column prop="total" label="合计(元)" />
<el-table-column label="备注" prop="data" show-overflow-tooltip />
</el-table>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
@ -63,6 +71,7 @@ import {
import { useRoute } from "vue-router";
import subOrder from "./component/subOrder.vue";
import goodsOffer from "./component/goodsOffer.vue";
import { apiOpurchaseinfoListList, apicreateSupplierGoods } from "@/api/opurchaseclass";
const route = useRoute();
const form = ref({});
@ -73,11 +82,9 @@ const activeMap = ref(
["detail", true],
["order", false],
["offer", false],
["notPushedGoods", false],
])
);
console.log(activeMap.value);
const getDetail = async () => {
const data = await apiOpurchaseclassDetail({
id: route.query.id,
@ -95,4 +102,21 @@ const tabChange = (type: any) => {
activeMap.value.set(type, true);
}
};
const { pager, getLists, resetParams, resetPage } = usePaging({
fetchFun: apiOpurchaseinfoListList,
params: { is_push: 0, id: route.query.id },
});
const rePush = async () => {
await apicreateSupplierGoods({ id: route.query.id })
getLists()
}
//
getLists()
</script>