|
@@ -61,13 +61,27 @@
|
|
|
<TitleInfo :content="'待审批'"></TitleInfo>
|
|
|
<el-table :data="toBeProcessedData.rows" style="width: 100%" :height="tableHeight">
|
|
|
<el-table-column prop="title" label="流程标题" />
|
|
|
+ <el-table-column label="操作" width="60" align="right">
|
|
|
+ <template #default="{row,$index}">
|
|
|
+ <div style="width:100%">
|
|
|
+ <el-button type="primary" link style="font-size:12px" @click="pushProcessApproval(row)">办理</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
</el-table>
|
|
|
|
|
|
</el-card>
|
|
|
<el-card style="width:32%">
|
|
|
<TitleInfo :content="'待报价'"></TitleInfo>
|
|
|
<el-table :data="allData[0].rows" style="width: 100%" :height="tableHeight">
|
|
|
- <el-table-column prop="code" label="报价单号" />
|
|
|
+ <el-table-column prop="code" label="报价单号">
|
|
|
+ <template #default="{row,$index}">
|
|
|
+ <div style="width:100%">
|
|
|
+ <span class="el-click" @click="handleOpenDetail(row)">{{row.code}}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="amount" label="报价金额" width="110" />
|
|
|
</el-table>
|
|
|
|
|
@@ -75,7 +89,13 @@
|
|
|
<el-card style="width:32%">
|
|
|
<TitleInfo :content="'待投产'"></TitleInfo>
|
|
|
<el-table :data="allData[1].rows" style="width: 100%" :height="tableHeight">
|
|
|
- <el-table-column prop="code" label="订单号" />
|
|
|
+ <el-table-column prop="code" label="订单号">
|
|
|
+ <template #default="{row,$index}">
|
|
|
+ <div style="width:100%">
|
|
|
+ <span class="el-click" @click="lookDetails(row)">{{row.code}}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="deliveryPeriod" label="交期" width="150" />
|
|
|
</el-table>
|
|
|
|
|
@@ -126,7 +146,13 @@
|
|
|
<el-card style="margin-bottom:20px">
|
|
|
<TitleInfo :content="'逾期生产订单'+` (${allData[6].total})`"></TitleInfo>
|
|
|
<el-table :data="allData[6].rows" style="width: 100%" :height="tableHeightOne">
|
|
|
- <el-table-column prop="code" label="订单号" />
|
|
|
+ <el-table-column prop="code" label="订单号">
|
|
|
+ <template #default="{row,$index}">
|
|
|
+ <div style="width:100%">
|
|
|
+ <span class="el-click" @click="lookDetails(row)">{{row.code}}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="deliveryPeriod" label="交期" width="150" />
|
|
|
</el-table>
|
|
|
</el-card>
|
|
@@ -134,11 +160,11 @@
|
|
|
<TitleInfo :content="'报损情况(近30天)'"></TitleInfo>
|
|
|
<div class="baosun">
|
|
|
<div class="theme2 q" @click="toUrl(7)">
|
|
|
- <span class="label">补单</span>
|
|
|
+ <span class="label">报损</span>
|
|
|
<span class="num">{{ reportLossesData.replenishSumQuantity }}</span>
|
|
|
</div>
|
|
|
<div class="theme3 q" @click="toUrl(7)">
|
|
|
- <span class="label">丢失</span>
|
|
|
+ <span class="label">丢件</span>
|
|
|
<span class="num">{{ reportLossesData.lossSumQuantity }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -154,6 +180,103 @@
|
|
|
</el-card>
|
|
|
</div>
|
|
|
|
|
|
+ <el-dialog v-if="detailDialog" v-model="detailDialog" title="报价详情" width="90%" append-to-body>
|
|
|
+ <PriceSheetDetailList :rowData="detailRowData" dataType="1" @changeLeftData="changeLeftData"></PriceSheetDetailList>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog :title="'订单详情'" v-model="dialogVisible" width="90%" destroy-on-close>
|
|
|
+ <byForm :formConfig="formConfig" :formOption="formOptionOne" v-model="formData.orderData" ref="formDom">
|
|
|
+ <template #commodity>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-table :data="formData.orderData.contractProductList" style="width: 100%; ">
|
|
|
+ <el-table-column type="expand" width="50" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <div style="padding-left:50px">
|
|
|
+ <div style="margin-bottom:10px;">
|
|
|
+ <TitleInfo content='BOM单:'></TitleInfo>
|
|
|
+ </div>
|
|
|
+ <el-table :data="scope.row.contractProductBomList" style="width: 100%;" border class="bom-table">
|
|
|
+ <el-table-column label="图片" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div v-if="row.fileUrl">
|
|
|
+ <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
|
|
|
+ </div>
|
|
|
+ <div v-else></div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productCode" label="物料编码" width="190" />
|
|
|
+ <el-table-column prop="productName" label="物料名称" min-width="200" />
|
|
|
+ <el-table-column label="尺寸 (cm)" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="quantity" label="数量" width="110" />
|
|
|
+ <el-table-column prop="remark" label="备注" width="180" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="商品图片" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div v-if="row.fileUrl">
|
|
|
+ <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
|
|
|
+ </div>
|
|
|
+ <div v-else></div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productCnName" label="商品名称" min-width="130" />
|
|
|
+ <el-table-column prop="productCode" label="商品编码" width="130" />
|
|
|
+ <el-table-column label="尺寸 cm*cm*cm" width="180">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="设计图稿" width="80">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-upload :action="uploadUrl" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false" :data="uploadData"
|
|
|
+ :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="()=>handleSuccess($index)">
|
|
|
+ <div v-loading="row.imgLoading">
|
|
|
+ <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
|
|
|
+ <!-- <el-icon v-else class="avatar-uploader-icon">
|
|
|
+ <Plus />
|
|
|
+ </el-icon> -->
|
|
|
+ </div>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="生产源文件" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width:100%">
|
|
|
+ <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">
|
|
|
+ <span class="el-click" @click="onPicture(row.fileListOne[0].fileUrl)">{{row.fileListOne[0].fileName}}</span>
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <div v-if="row.prodFileList && row.prodFileList.length > 0">
|
|
|
+ <span class="el-click" @click="onPicture(row.prodFileList[0].fileUrl)">{{row.prodFileList[0].fileName}} (定制)</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="数量" width="150" prop="quantity" />
|
|
|
+ <el-table-column label="备注" min-width="200" prop="remark" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </byForm>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -163,6 +286,9 @@ import byTableDemo from "../components/byTable/demo";
|
|
|
import html2canvas from "html2canvas";
|
|
|
import JsPDF from "jspdf";
|
|
|
import * as echarts from "echarts";
|
|
|
+import PriceSheetDetailList from "@/views/EHSD/saleContract/PriceSheetDetailList";
|
|
|
+import byForm from "@/components/byForm/index";
|
|
|
+
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const tableHeight = ref(0);
|
|
|
const tableHeightOne = ref(0);
|
|
@@ -226,9 +352,7 @@ const pushProcessApproval = (row) => {
|
|
|
flowKey: row.flowKey,
|
|
|
id: row.id,
|
|
|
processType: nodeType == 1 ? 30 : 10,
|
|
|
- version: row.version,
|
|
|
businessId: row.businessId,
|
|
|
- submitType: "10",
|
|
|
},
|
|
|
});
|
|
|
}
|
|
@@ -333,7 +457,7 @@ const getData = () => {
|
|
|
.then((res) => {
|
|
|
allData.value[6] = res;
|
|
|
});
|
|
|
- // 报损统计
|
|
|
+ // 补单统计
|
|
|
proxy.post("/reportLossesDetails/lossesStatistics").then((res) => {
|
|
|
reportLossesData.value = res;
|
|
|
});
|
|
@@ -352,7 +476,7 @@ const toUrl = (att) => {
|
|
|
4: "WaitingForStorage",
|
|
|
5: "WaitingForDelivery",
|
|
|
6: "Claim",
|
|
|
- 7: "SupplementaryOrder",
|
|
|
+ 7: "InventoryInquiry",
|
|
|
};
|
|
|
|
|
|
proxy.$router.push({
|
|
@@ -442,6 +566,151 @@ onMounted(() => {
|
|
|
pie_1Chart.setOption(option1);
|
|
|
pie_1Chart.resize();
|
|
|
});
|
|
|
+
|
|
|
+const detailDialog = ref(false);
|
|
|
+const detailRowData = ref({});
|
|
|
+const handleOpenDetail = (item) => {
|
|
|
+ detailRowData.value = item;
|
|
|
+ detailDialog.value = true;
|
|
|
+};
|
|
|
+
|
|
|
+const handleOpenOrderDetail = (row) => {
|
|
|
+ proxy.$router.push({
|
|
|
+ path: "/platform_manage/process/processApproval",
|
|
|
+ query: {
|
|
|
+ flowKey: "contract_flow",
|
|
|
+ id: row.flowId || "",
|
|
|
+ processType: 20,
|
|
|
+ businessId: row.contractId,
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
+const formData = reactive({
|
|
|
+ data: {},
|
|
|
+ orderData: {},
|
|
|
+});
|
|
|
+const formOptionOne = reactive({
|
|
|
+ inline: true,
|
|
|
+ labelWidth: 100,
|
|
|
+ itemWidth: 100,
|
|
|
+ disabled: true,
|
|
|
+});
|
|
|
+const dialogVisible = ref(false);
|
|
|
+const formDom = ref(null);
|
|
|
+const formConfig = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ type: "title1",
|
|
|
+ title: "基本信息",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "text",
|
|
|
+ prop: "code",
|
|
|
+ label: "合同号:",
|
|
|
+ disabled: true,
|
|
|
+ isShow: formData.orderData.code ? true : false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "title1",
|
|
|
+ title: "商品信息",
|
|
|
+ haveLine: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "slot",
|
|
|
+ slotName: "commodity",
|
|
|
+ label: "",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+const getFileData = () => {
|
|
|
+ let ids = [];
|
|
|
+ formData.orderData.contractProductList.map((x) => {
|
|
|
+ // ids.push(x.productId);
|
|
|
+ x.contractProductBomList.map((y) => {
|
|
|
+ ids.push(y.materialId);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ ids = Array.from(new Set(ids));
|
|
|
+ proxy
|
|
|
+ .post("/fileInfo/getList", {
|
|
|
+ businessIdList: ids,
|
|
|
+ })
|
|
|
+ .then((fileObj) => {
|
|
|
+ formData.orderData.contractProductList.map((x) => {
|
|
|
+ // if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
|
|
|
+ // x.fileUrl = fileObj[x.productId][0].fileUrl;
|
|
|
+ // }
|
|
|
+ x.contractProductBomList.map((y) => {
|
|
|
+ y.fileList = fileObj[y.materialId] || [];
|
|
|
+ if (y.fileList && y.fileList.length > 0) {
|
|
|
+ y.fileUrl = y.fileList[0].fileUrl;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const lookDetails = (item) => {
|
|
|
+ proxy.post("/contract/detail", { id: item.contractId }).then((res) => {
|
|
|
+ formData.orderData = res;
|
|
|
+ dialogVisible.value = true;
|
|
|
+ if (
|
|
|
+ formData.orderData.contractProductList &&
|
|
|
+ formData.orderData.contractProductList.length > 0
|
|
|
+ ) {
|
|
|
+ getFileData();
|
|
|
+ let ids = formData.orderData.contractProductList.map((x) => x.id);
|
|
|
+ let productIds = formData.orderData.contractProductList.map(
|
|
|
+ (x) => x.productId
|
|
|
+ );
|
|
|
+ proxy.getFileData({
|
|
|
+ businessIdList: productIds,
|
|
|
+ data: formData.orderData.contractProductList,
|
|
|
+ att: "productId",
|
|
|
+ businessType: "0",
|
|
|
+ fileAtt: "productFile",
|
|
|
+ filePathAtt: "fileUrl",
|
|
|
+ });
|
|
|
+
|
|
|
+ proxy
|
|
|
+ .getFileData({
|
|
|
+ businessIdList: ids,
|
|
|
+ getAll: true,
|
|
|
+ })
|
|
|
+ .then((fileObj) => {
|
|
|
+ for (
|
|
|
+ let i = 0;
|
|
|
+ i < formData.orderData.contractProductList.length;
|
|
|
+ i++
|
|
|
+ ) {
|
|
|
+ const ele = formData.orderData.contractProductList[i];
|
|
|
+ for (const key in fileObj) {
|
|
|
+ if (
|
|
|
+ ele.id == key &&
|
|
|
+ fileObj[ele.id] &&
|
|
|
+ fileObj[ele.id].length > 0
|
|
|
+ ) {
|
|
|
+ ele.fileListOne = fileObj[ele.id].filter(
|
|
|
+ (x) => x.businessType == "0"
|
|
|
+ );
|
|
|
+ if (ele.fileListOne && ele.fileListOne.length > 0) {
|
|
|
+ ele.imageUrl = ele.fileListOne[0].fileUrl;
|
|
|
+ }
|
|
|
+ ele.prodFileList = fileObj[ele.id]
|
|
|
+ .filter((x) => x.businessType == "1")
|
|
|
+ .map((x) => ({ ...x, name: x.fileName, url: x.fileUrl }));
|
|
|
+ if (ele.prodFileList && ele.prodFileList.length > 0) {
|
|
|
+ ele.isShowProductFile = false;
|
|
|
+ } else {
|
|
|
+ ele.isShowProductFile = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
.app-container {
|