|
|
@@ -117,17 +117,23 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { ref, reactive, defineAsyncComponent, computed } from 'vue'
|
|
|
+import { ref, reactive, defineAsyncComponent, computed, PropType, onMounted } from 'vue'
|
|
|
import { ElMessage, FormInstance, FormRules } from 'element-plus'
|
|
|
import { formatDate } from '@/filters'
|
|
|
import { regular } from '@/constants/regex'
|
|
|
import { maxValue } from '@/constants/common'
|
|
|
import { getYSProductionModeList, getYSZSCategoryList, YSZSCategory } from '@/constants/presale'
|
|
|
-import { gzCenterPurchaseApply } from '@/services/api/presale'
|
|
|
+import { gzCenterPurchaseApply, queryPresaleorderapplyprice } from '@/services/api/presale'
|
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
import AppUpload from '@pc/components/base/upload/index.vue'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
|
|
|
+const props = defineProps({
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<Ermcp.GZWrPreSaleApplyRsp>
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
// 履约模板
|
|
|
const PerformanceTemplate = defineAsyncComponent(() => import('@pc/components/modules/performance/index.vue'))
|
|
|
// 价格编辑
|
|
|
@@ -277,4 +283,44 @@ const onSubmit = () => {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ if (props.selectedRow) {
|
|
|
+ ({
|
|
|
+ wrstandardname: formData.WRStandardName,
|
|
|
+ yszscategory: formData.YSZSCategory,
|
|
|
+ presaleqty: formData.PresaleQty,
|
|
|
+ performancetemplateid: formData.PerformanceTemplateID,
|
|
|
+ minbuyqty: formData.MinBuyQty,
|
|
|
+ minsuccessqty: formData.MinSuccessQty,
|
|
|
+ maxbuyqty: formData.MaxBuyQty,
|
|
|
+ buymarginvalue: formData.BuyMarginValue,
|
|
|
+ zsshapetypestr: formData.ZSShapeTypeStr,
|
|
|
+ zscolortypestr: formData.ZSColorTypeStr,
|
|
|
+ sizestr: formData.SizeStr,
|
|
|
+ zsclaritytypestr: formData.ZSClarityTypeStr,
|
|
|
+ zspolishtypestr: formData.ZSPolishTypeStr,
|
|
|
+ zssymmetrytypestr: formData.ZSSymmetryTypeStr,
|
|
|
+ zscuttypestr: formData.ZSCutTypeStr,
|
|
|
+ zsfluorescencetypestr: formData.ZSFluorescenceTypeStr,
|
|
|
+ yieldrate: formData.YieldRate,
|
|
|
+ qtydesc: formData.QtyDesc,
|
|
|
+ weightdesc: formData.WeightDesc,
|
|
|
+ remark: formData.Remark,
|
|
|
+ } = props.selectedRow)
|
|
|
+
|
|
|
+ formData.YSProductionMode = props.selectedRow.ysproductionmode || undefined
|
|
|
+ datePickerValue.value = [props.selectedRow.startdate, props.selectedRow.enddate]
|
|
|
+
|
|
|
+ queryPresaleorderapplyprice({
|
|
|
+ applyid: props.selectedRow.presaleapplyid
|
|
|
+ }).then((res) => {
|
|
|
+ formData.GZCenterPurchasePriceLists = res.data.map((e) => ({
|
|
|
+ StepIndex: e.stepindex,
|
|
|
+ Qty: e.qty,
|
|
|
+ Price: e.price,
|
|
|
+ }))
|
|
|
+ })
|
|
|
+ }
|
|
|
+})
|
|
|
</script>
|