feat:1.库存成品展示电压,工序类别
2.销售页面调整
| | |
| | | getProductOptions(); |
| | | }; |
| | | const getProductOptions = () => { |
| | | productTreeList().then((res) => { |
| | | productOptions.value = convertIdToValue(res); |
| | | productTreeList({ productName: "成品" }).then((res) => { |
| | | const tree = convertIdToValue(res); |
| | | const finishedNode = tree.find( |
| | | (item) => item?.label === "成品" || item?.productName === "成品" |
| | | ); |
| | | productOptions.value = finishedNode?.children || tree; |
| | | }); |
| | | }; |
| | | const getModels = (value) => { |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | v-if="props.isFinishedProduct" |
| | | label="工序类别" |
| | | prop="processCategory" |
| | | :rules="[ |
| | | { |
| | | required: true, |
| | | message: '请选择工序类别', |
| | | trigger: 'change', |
| | | } |
| | | ]" |
| | | > |
| | | <el-select v-model="formState.processCategory" placeholder="请选择工序类别" clearable> |
| | | <el-option label="铜极" value="铜极" /> |
| | | <el-option label="银极" value="银极" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | v-if="props.isFinishedProduct" |
| | | label="电压" |
| | | prop="voltage" |
| | | :rules="[ |
| | | { |
| | | required: true, |
| | | message: '请输入电压', |
| | | trigger: 'blur', |
| | | } |
| | | ]" |
| | | > |
| | | <el-input v-model="formState.voltage" clearable placeholder="请输入电压" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="库存类型" |
| | | prop="type" |
| | | :rules="[ |
| | |
| | | visible: { |
| | | type: Boolean, |
| | | required: true, |
| | | }, |
| | | topProductParentId: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | isFinishedProduct: { |
| | | type: Boolean, |
| | | default: false, |
| | | } |
| | | }); |
| | | |
| | |
| | | productModelName: "", |
| | | materialCode: "", |
| | | unit: "", |
| | | processCategory: "", |
| | | voltage: "", |
| | | batchNo: "", |
| | | type: undefined, |
| | | qualitity: 0, |
| | |
| | | productModelName: "", |
| | | materialCode: "", |
| | | unit: "", |
| | | processCategory: "", |
| | | voltage: "", |
| | | batchNo: "", |
| | | type: undefined, |
| | | qualitity: 0, |
| | |
| | | const payload = { ...formState.value }; |
| | | const bn = (payload.batchNo || "").trim(); |
| | | payload.batchNo = bn; |
| | | payload.voltage = (payload.voltage || "").trim(); |
| | | if (!props.isFinishedProduct) { |
| | | delete payload.processCategory; |
| | | delete payload.voltage; |
| | | } |
| | | if (payload.type === 'qualified') { |
| | | createStockInventory(payload).then(res => { |
| | | // 关闭模态框 |
| | |
| | | <el-table-column label="规格型号" prop="model" show-overflow-tooltip /> |
| | | <el-table-column label="单位" prop="unit" show-overflow-tooltip /> |
| | | <el-table-column label="料号" prop="materialCode" show-overflow-tooltip /> |
| | | <el-table-column label="合格批号" prop="qualifiedBatchNo" show-overflow-tooltip /> |
| | | <el-table-column label="不合格批号" prop="unQualifiedBatchNo" show-overflow-tooltip /> |
| | | <!-- <el-table-column label="合格批号" prop="qualifiedBatchNo" show-overflow-tooltip />--> |
| | | <!-- <el-table-column label="不合格批号" prop="unQualifiedBatchNo" show-overflow-tooltip />--> |
| | | <el-table-column v-if="props.isFinishedProduct" label="工序类别" prop="processCategory" show-overflow-tooltip /> |
| | | <el-table-column v-if="props.isFinishedProduct" label="电压" prop="voltage" show-overflow-tooltip /> |
| | | <el-table-column label="合格库存数量" prop="qualifiedQuantity" show-overflow-tooltip /> |
| | | <el-table-column label="不合格库存数量" prop="unQualifiedQuantity" show-overflow-tooltip /> |
| | | <el-table-column label="合格冻结数量" prop="qualifiedLockedQuantity" show-overflow-tooltip /> |
| | |
| | | <new-stock-inventory v-if="isShowNewModal" |
| | | v-model:visible="isShowNewModal" |
| | | :top-product-parent-id="props.productId" |
| | | :is-finished-product="props.isFinishedProduct" |
| | | @completed="handleQuery" /> |
| | | |
| | | <subtract-stock-inventory v-if="isShowSubtractModal" |
| | |
| | | type: Number, |
| | | required: true, |
| | | default: 0 |
| | | }, |
| | | isFinishedProduct: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }); |
| | | |
| | |
| | | :label="tab.productName" |
| | | :name="tab.id" |
| | | :key="tab.id"> |
| | | <Record :product-id="tab.id" v-if="tab.id === activeTab" /> |
| | | <Record |
| | | :product-id="tab.id" |
| | | :is-finished-product="tab.productName?.includes('成品')" |
| | | v-if="tab.id === activeTab" |
| | | /> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | |
| | | } |
| | | }; |
| | | const getProductOptions = () => { |
| | | return productTreeList().then((res) => { |
| | | const tree = convertIdToValue(res); |
| | | productOptions.value = filterOutSemiFinished(tree); |
| | | return productTreeList({ productName: "成品" }).then((res) => { |
| | | const tree = filterOutSemiFinished(convertIdToValue(res)); |
| | | const finishedNode = tree.find( |
| | | (item) => item?.label === "成品" || item?.productName === "成品" |
| | | ); |
| | | productOptions.value = finishedNode?.children || tree; |
| | | return res; |
| | | }); |
| | | }; |
| | |
| | | <td colspan="14"></td> |
| | | </tr> |
| | | <tr class="report-row report-row--triple"> |
| | | <td class="label" colspan="2">烧钢日期</td> |
| | | <td class="label" colspan="2">烧铜日期</td> |
| | | <td colspan="5" class="cell-field"> |
| | | <el-date-picker |
| | | v-if="props.isEdit" |
| | |
| | | /> |
| | | <span v-else class="view-value">{{ displayValue(formData.otherData.copperFiringTime) }}</span> |
| | | </td> |
| | | <td class="label label--compact" colspan="2">烧钢出炉时间</td> |
| | | <td class="label label--compact" colspan="2">烧铜出炉时间</td> |
| | | <td colspan="5" class="cell-field"> |
| | | <el-date-picker |
| | | v-if="props.isEdit" |
| | |
| | | </div> |
| | | |
| | | <div class="search-item"> |
| | | <span class="search_title">工序:</span> |
| | | <el-input |
| | | v-model="searchForm.processName" |
| | | style="width: 240px" |
| | | placeholder="请输入" |
| | | @change="handleQuery" |
| | | clearable |
| | | prefix-icon="Search" |
| | | /> |
| | | </div> |
| | | |
| | | <div class="search-item"> |
| | | <el-button type="primary" @click="handleQuery">搜索 </el-button> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="销售合同号" prop="salesContractNo" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="客户名称" prop="customerName" width="300" show-overflow-tooltip /> |
| | | <el-table-column label="业务员" prop="salesman" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="型号" prop="model" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="电压" prop="voltage" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="qty" prop="qty" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="项目名称" prop="projectName" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="付款方式" prop="paymentMethod" show-overflow-tooltip /> |
| | | <el-table-column label="合同金额(元)" prop="contractAmount" width="220" show-overflow-tooltip |
| | | :formatter="formattedNumber" /> |
| | | <el-table-column label="付款方式" prop="paymentMethod" show-overflow-tooltip /> |
| | | <el-table-column label="录入人" prop="entryPersonName" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="录入日期" prop="entryDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="签订日期" prop="executionDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="交付日期" prop="deliveryDate" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="业务员" prop="salesman" width="100" show-overflow-tooltip /> |
| | | <el-table-column label="备注" prop="remarks" width="200" show-overflow-tooltip /> |
| | | <el-table-column label="销售合同号" prop="salesContractNo" width="180" show-overflow-tooltip /> |
| | | <el-table-column fixed="right" label="操作" min-width="100" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="openForm('edit', scope.row)" |
| | |
| | | const getProductOptions = () => { |
| | | // 返回 Promise,便于在编辑产品时等待加载完成 |
| | | return productTreeList({productName: '成品'}).then((res) => { |
| | | productOptions.value = convertIdToValue(res); |
| | | const tree = convertIdToValue(res); |
| | | const finishedNode = tree.find( |
| | | (item) => item?.label === '成品' || item?.productName === '成品' |
| | | ); |
| | | productOptions.value = finishedNode?.children || tree; |
| | | return productOptions.value; |
| | | }); |
| | | }; |