12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945 |
- <template>
- <div class="BidSystemContractEdit">
- <Toptitle
- :title="
- $route.query.type == 1
- ? '新增工装订单'
- : $route.query.type == 2
- ? '编辑工装订单'
- : '查看工装订单'
- "
- >
- <slot name="titleButton">
- <Button
- @click="showForms = true"
- type="primary"
- style="margin-right: 10px"
- >表单设置</Button
- >
- <Button
- type="primary"
- style="margin-right: 10px"
- :disabled="isChecked"
- @click="showAddInputModal = true"
- >
- 添加特殊字段
- </Button>
- <Button
- @click="showSupModal = true"
- type="primary"
- style="margin-right: 10px"
- >项目辅料</Button
- >
- <Button
- @click="goback()"
- type="primary"
- ghost
- style="margin-right: 10px"
- >返回</Button
- >
- <Button
- @click="postData()"
- type="primary"
- :disabled="isChecked"
- ghost
- style="margin-right: 10px"
- >保存</Button
- >
- </slot>
- </Toptitle>
- <div class="top_search">
- <Form :model="formData" :label-width="100" class="top_search_form">
- <FormItem
- v-if="formSetTableData.filter((v) => v.key == 'order_no')[0].is_show"
- :label="formSetTableData.filter((v) => v.key == 'order_no')[0].title"
- >
- <Input
- type="text"
- size="small"
- disabled
- v-model="formData.order_no"
- placeholder="自动生成"
- style="width: 200px"
- />
- </FormItem>
- <FormItem
- v-if="
- formSetTableData.filter((v) => v.key == 'residential_name')[0]
- .is_show
- "
- :label="
- formSetTableData.filter((v) => v.key == 'residential_name')[0].title
- "
- >
- <Input
- type="text"
- :disabled="isChecked"
- size="small"
- v-model="formData.residential_name"
- placeholder="请输入项目名称"
- style="width: 200px"
- />
- </FormItem>
- <FormItem
- v-if="formSetTableData.filter((v) => v.key == 'custom_id')[0].is_show"
- :label="formSetTableData.filter((v) => v.key == 'custom_id')[0].title"
- >
- <Select
- clearable
- filterable
- size="small"
- :disabled="isChecked"
- class="auto-width"
- @on-change="handleClientChange"
- v-model="formData.custom_id"
- >
- <Option
- v-for="item in clientList"
- :label="item.title"
- :key="item.id"
- :value="item.id"
- ></Option>
- </Select>
- </FormItem>
- <FormItem
- v-if="
- formSetTableData.filter((v) => v.key == 'warning_state')[0].is_show
- "
- :label="
- formSetTableData.filter((v) => v.key == 'warning_state')[0].title
- "
- >
- <Select
- v-model="formData.warning_state"
- :disabled="isChecked"
- size="small"
- style="width: 200px"
- >
- <Option
- v-for="_item in warningList"
- :key="_item.id"
- :value="_item.id"
- :label="_item.title"
- ></Option>
- </Select>
- </FormItem>
- <FormItem
- v-if="
- formSetTableData.filter((v) => v.key == 'front_money')[0].is_show
- "
- :label="
- formSetTableData.filter((v) => v.key == 'front_money')[0].title
- "
- >
- <Input
- type="text"
- size="small"
- :disabled="isChecked"
- v-model="formData.front_money"
- placeholder="请输入项目定金"
- style="width: 200px"
- />
- <!-- <RadioGroup v-model="formData.pay_state"
- size="small">
- <Radio :label=0
- :disabled="isChecked">未收款</Radio>
- <Radio :label=1
- :disabled="isChecked">已收款</Radio>
- </RadioGroup> -->
- </FormItem>
- <FormItem
- v-if="
- formSetTableData.filter((v) => v.key == 'custom_detail_id')[0]
- .is_show
- "
- :label="
- formSetTableData.filter((v) => v.key == 'custom_detail_id')[0].title
- "
- >
- <Select
- clearable
- filterable
- size="small"
- :disabled="isChecked"
- class="auto-width"
- @on-change="handleClientDetailChange"
- v-model="formData.custom_detail_id"
- >
- <Option
- v-for="item in clientDetailList"
- :label="item.address"
- :key="item.id"
- :value="item.id"
- ></Option>
- </Select>
- </FormItem>
- <FormItem
- v-if="
- formSetTableData.filter((v) => v.key == 'custom_detail_id')[0]
- .is_show
- "
- :label="
- formSetTableData.filter((v) => v.key == 'custom_detail_id')[0].title
- "
- >
- <Select
- clearable
- filterable
- size="small"
- :disabled="isChecked"
- class="auto-width"
- @on-change="handleClientDetailChange"
- v-model="formData.custom_detail_id"
- >
- <Option
- v-for="item in clientDetailList"
- :label="item.mobile"
- :key="item.id"
- :value="item.id"
- ></Option>
- </Select>
- </FormItem>
- <FormItem
- v-if="
- formSetTableData.filter((v) => v.key == 'start_time')[0].is_show
- "
- :label="
- formSetTableData.filter((v) => v.key == 'start_time')[0].title
- "
- >
- <DatePicker
- type="date"
- size="small"
- :disabled="isChecked"
- :options="options"
- @on-change="handleStartTimeChange"
- v-model="formData.start_time"
- placeholder=" 年/月/日"
- style="width: 200px"
- ></DatePicker>
- </FormItem>
- <FormItem
- v-if="formSetTableData.filter((v) => v.key == 'end_time')[0].is_show"
- :label="formSetTableData.filter((v) => v.key == 'end_time')[0].title"
- >
- <DatePicker
- type="date"
- size="small"
- :disabled="isChecked"
- :options="options"
- @on-change="handleEndTimeChange"
- v-model="formData.end_time"
- placeholder=" 年/月/日"
- style="width: 200px"
- ></DatePicker>
- </FormItem>
- <FormItem
- v-if="formSetTableData.filter((v) => v.key == 'salesman')[0].is_show"
- :label="formSetTableData.filter((v) => v.key == 'salesman')[0].title"
- >
- <Select
- v-model="formData.salesman"
- filterable
- :disabled="isChecked"
- clearable
- style="width: 200px"
- size="small"
- >
- <Option
- v-for="item in salesmanList"
- :value="item.id"
- :key="item.id"
- >{{ item.nickname }}</Option
- >
- </Select>
- </FormItem>
- <!-- <FormItem label="订单类型:">
- <Select v-model="formData.type"
- :disabled="isChecked"
- size="small"
- style="width:200px">
- <Option label='工装'
- :value=1></Option>
- <Option label='家装'
- :value=2></Option>
- </Select>
- </FormItem> -->
- <FormItem
- v-for="item in formData.special"
- :key="item.id"
- :label="item.key + ':'"
- >
- <Input
- type="text"
- size="small"
- :disabled="isChecked"
- v-model="item.value"
- placeholder="请输入"
- style="width: 200px"
- />
- </FormItem>
- <FormItem
- v-if="formSetTableData.filter((v) => v.key == 'remark')[0].is_show"
- :label="formSetTableData.filter((v) => v.key == 'remark')[0].title"
- >
- <Input
- type="textarea"
- :disabled="isChecked"
- size="small"
- v-model="formData.remark"
- placeholder=""
- style="width: 200px"
- />
- </FormItem>
- </Form>
- </div>
- <div
- class="addArea"
- v-for="(areaItem, areaIndex) in formData.list"
- :key="areaItem.areaIndex"
- >
- <div class="addAreaBtn">
- <Button
- @click="handleAreaAdd(formData.list, areaIndex)"
- :disabled="isChecked"
- size="small"
- type="primary"
- style="margin-right: 10px"
- >新增区域</Button
- >
- <Button
- @click="handleAreaDele(areaIndex)"
- type="error"
- size="small"
- v-show="areaIndex != 0"
- :disabled="isChecked"
- style="margin-right: 10px"
- >删除区域</Button
- >
- <Button
- @click="handleAreaAddPDT(areaItem, areaIndex)"
- :disabled="isChecked"
- size="small"
- style="margin-right: 10px"
- v-show="
- type == 1 ||
- (type == 2 && !areaItem.id) ||
- (type == 2 && areaItem.isCurrencyArea)
- "
- type="primary"
- >新增产品
- </Button>
- <Button
- @click="handleShowCurrencyArea(areaItem, areaIndex)"
- ghost
- size="small"
- v-show="type != 1 && areaItem.id && !areaItem.isCurrencyArea"
- type="primary"
- >展示产品
- </Button>
- </div>
- <div class="addAreaForm">
- <Form :label-width="100" :model="areaItem" style="width: 60%">
- <FormItem
- v-if="areaSetTableData.filter((v) => v.key == 'num')[0].is_show"
- :label="areaSetTableData.filter((v) => v.key == 'num')[0].title"
- >
- <Input
- type="text"
- size="small"
- :disabled="isChecked"
- v-model="areaItem.num"
- :placeholder="
- '请输入' +
- areaSetTableData.filter((v) => v.key == 'num')[0].title
- "
- style="width: 120px"
- />
- </FormItem>
- <FormItem
- v-if="areaSetTableData.filter((v) => v.key == 'title')[0].is_show"
- :label="areaSetTableData.filter((v) => v.key == 'title')[0].title"
- >
- <Input
- type="text"
- size="small"
- :disabled="isChecked"
- v-model="areaItem.title"
- :placeholder="
- '请输入' +
- areaSetTableData.filter((v) => v.key == 'title')[0].title
- "
- style="width: 120px"
- />
- </FormItem>
- <FormItem
- v-if="areaSetTableData.filter((v) => v.key == 'unit')[0].is_show"
- :label="areaSetTableData.filter((v) => v.key == 'unit')[0].title"
- >
- <Input
- type="text"
- size="small"
- :disabled="isChecked"
- v-model="areaItem.unit"
- :placeholder="
- '请输入' +
- areaSetTableData.filter((v) => v.key == 'unit')[0].title
- "
- style="width: 120px"
- />
- </FormItem>
- <FormItem
- v-if="
- areaSetTableData.filter((v) => v.key == 'quantity')[0].is_show
- "
- :label="
- areaSetTableData.filter((v) => v.key == 'quantity')[0].title
- "
- >
- <Input
- type="text"
- size="small"
- v-model="areaItem.quantity"
- :disabled="isChecked"
- :placeholder="
- '请输入' +
- areaSetTableData.filter((v) => v.key == 'quantity')[0].title
- "
- style="width: 120px"
- />
- </FormItem>
- <FormItem
- v-if="
- areaSetTableData.filter((v) => v.key == 'house_type')[0].is_show
- "
- :label="
- areaSetTableData.filter((v) => v.key == 'house_type')[0].title
- "
- >
- <Input
- type="text"
- size="small"
- :disabled="isChecked"
- v-model="areaItem.house_type"
- :placeholder="
- '请输入' +
- areaSetTableData.filter((v) => v.key == 'house_type')[0].title
- "
- style="width: 120px"
- />
- </FormItem>
- <FormItem
- v-for="item in areaItem.special"
- :key="item.id"
- :label="item.key + ':'"
- >
- <Input
- type="text"
- size="small"
- :disabled="isChecked"
- v-model="item.value"
- placeholder="请输入"
- style="width: 120px"
- />
- </FormItem>
- <FormItem
- v-if="areaSetTableData.filter((v) => v.key == 'remark')[0].is_show"
- :label="areaSetTableData.filter((v) => v.key == 'remark')[0].title"
- >
- <Input
- type="text"
- :disabled="isChecked"
- size="small"
- v-model="areaItem.remark"
- :placeholder="
- '请输入' +
- areaSetTableData.filter((v) => v.key == 'remark')[0].title
- "
- style="width: 120px"
- />
- </FormItem>
- </Form>
- </div>
- <div class="addAreaTable">
- <Table
- v-show="areaItem.product && areaItem.product.length > 0"
- :columns="tableColumns"
- :data="areaItem.product"
- max-height="600"
- border
- >
- <template slot="Set" slot-scope="{ row, index }">
- <a
- style="margin: 0 5px"
- v-show="$route.query.type != 3"
- @click="handleSet(row, index, 3, areaItem.product, areaIndex)"
- >编辑</a
- >
- <a
- style="margin: 0 5px; color: red"
- v-show="$route.query.type != 3"
- @click="handleSet(row, index, 4, areaItem.product)"
- >删除</a
- >
- </template>
- </Table>
- </div>
- </div>
- <li v-show="false" v-for="item in formData.list" :key="item.id"></li>
- <!-- 项目辅料弹窗 -->
- <Modal title="项目辅料" v-model="showSupModal" :width="400">
- <div>
- <div class="supModalBtn">
- <Button @click="handleAddSup" type="primary">新增</Button>
- </div>
- <Table :columns="supTableColumns" :data="supTableData" border>
- <template slot="combine" slot-scope="{ index }">
- <Select
- v-model="supTableData[index].id"
- @on-change="handlechange"
- size="small"
- >
- <Option
- v-for="item in combineList"
- :value="item.id"
- :key="item.id"
- :label="item.title"
- ></Option>
- </Select>
- </template>
- <template slot="supSet" slot-scope="{ row, index }">
- <a
- style="margin: 0 5px; color: red"
- v-show="$route.query.type != 3"
- @click="handleSupSet(row, index)"
- >删除</a
- >
- </template>
- </Table>
- </div>
- <div class="modal-footer" slot="footer">
- <Button @click="showSupModal = false">取消</Button>
- <Button type="primary" @click="showSupModal = false">确认</Button>
- </div>
- </Modal>
- <!-- 新增产品弹窗 -->
- <Modal
- title="新增产品"
- v-model="showPDTModal"
- :mask-closable="false"
- class="addPDTFormModal"
- :width="1000"
- >
- <div
- class="addPDTForm"
- v-for="(tempItem, tempIndex) in tempPDTList"
- :key="tempItem.id"
- >
- <Form :label-width="100" :model="tempItem">
- <FormItem label="产品名称:">
- <Input
- type="text"
- size="small"
- placeholder="请输入"
- v-model="tempItem.title"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="数量">
- <Input
- type="text"
- size="small"
- v-model="tempItem.num"
- placeholder="请输入"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="图号:">
- <Input
- type="text"
- size="small"
- placeholder="请输入"
- v-model="tempItem.url_number"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="图纸">
- <div class="product-img">
- <div class="product-add">
- <div
- class="items"
- v-for="(_item, _index) of tempItem.url"
- :key="_index"
- >
- <img
- @click="looks(_item)"
- :src="$store.state.ip + _item"
- alt=""
- />
- <Icon
- size="20"
- @click="delItems(_index, tempItem.url)"
- class="delete-img"
- type="ios-close-circle"
- />
- </div>
- <div class="add-items">
- <div class="_item">
- <Icon size="50" type="ios-add" />
- </div>
- <input
- @change="changeIpt($event, tempItem.url)"
- type="file"
- class="ipt"
- />
- </div>
- </div>
- </div>
- </FormItem>
- <FormItem label="左右式">
- <Select
- v-model="tempItem.left_right_mode"
- placeholder="请选择"
- style="width: 120px"
- size="small"
- >
- <Option :value="1" label="左式" />
- <Option :value="2" label="右式" />
- </Select>
- </FormItem>
- <FormItem label="产品分类">
- <Select
- v-model="tempItem.type_id"
- placeholder="请选择"
- style="width: 120px"
- @on-change="(e) => hanndleAddPDTTypeChange(tempItem, e)"
- size="small"
- >
- <Option
- v-for="item in PDTTypeList"
- :value="item.value"
- :key="item.value"
- >{{ item.label }}</Option
- >
- </Select>
- </FormItem>
- <div
- style="display: contents"
- v-for="el in tempItem.tempPDTTypeList"
- :key="el"
- >
- <FormItem
- :label="_item.title"
- v-for="_item in tempItem.tempMeasureList"
- v-show="el == _item.id"
- :key="_item.id"
- >
- <Input
- type="text"
- size="small"
- v-model="tempItem[_item.e_title]"
- placeholder="请输入"
- style="width: 120px"
- />
- </FormItem>
- </div>
- <FormItem label="价格:">
- <Input
- type="text"
- size="small"
- v-model="tempItem.price"
- placeholder="请输入价格"
- style="width: 120px"
- />
- </FormItem>
- <FormItem
- :label="item.key + ':'"
- v-for="item in productSpecValueList"
- :key="item.id"
- >
- <Input
- type="text"
- size="small"
- v-model="tempItem[item.key]"
- placeholder="请输入"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="备注:">
- <Input
- type="text"
- size="small"
- v-model="tempItem.remark"
- placeholder="请输入备注"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="工艺属性">
- <Button
- @click="handleProcessAdd(tempItem, tempIndex)"
- size="small"
- type="text"
- style="color: #57a3f3"
- >添加属性</Button
- >
- </FormItem>
- </Form>
- <div class="addPDTProcess">
- <div
- v-for="(_item, _index) in tempItem.addPDTProcessAttrList"
- :key="_item.id"
- >
- <span>属性{{ _index + 1 }}</span>
- <Select
- v-model="_item.id"
- size="small"
- transfer
- @on-change="
- (value) => handleAddPDTAttrChange(_item, _index, value)
- "
- style="width: 80px"
- >
- <Option
- v-for="__item in PDTProcessAttrList"
- :key="__item.id"
- :value="__item.id"
- :label="__item.title"
- >
- </Option>
- </Select>
- <Select
- v-model="_item.process_detail"
- filterable
- clearable
- transfer
- label-in-value
- @on-change="
- (value) => handleAddPDTAttrDetailChange(_item, _index, value)
- "
- size="small"
- style="width: 140px"
- >
- <Option
- v-for="__item in _item.PDTProcessAttrDetailList"
- :key="__item.id"
- :value="__item.id"
- :label="__item.title"
- />
- </Select>
- <div class="dele_icon">
- <!-- v-show="tempItem.addPDTProcessAttrList.length!=1" -->
- <Icon
- type="ios-trash"
- @click="
- handleAddPDTDetailDele(tempItem.addPDTProcessAttrList, _index)
- "
- />
- </div>
- </div>
- </div>
- <div class="addPDTBtn">
- <Button
- type="primary"
- style="margin-right: 10px"
- @click="handleAddPDTCopy(tempItem, tempIndex)"
- >复制</Button
- >
- <Button
- type="primary"
- style="margin-right: 10px"
- @click="handleAddPDTAdd(tempIndex, tempItem)"
- >添加</Button
- >
- <Button
- type="error"
- v-show="tempIndex != 0"
- style="margin-right: 10px"
- @click="handleAddPDTDele(tempIndex)"
- >删除</Button
- >
- </div>
- </div>
- <div class="modal-footer" slot="footer">
- <Button @click="showPDTModal = false">取消</Button>
- <Button type="primary" @click="handleAddPDTConfirm">确认</Button>
- </div>
- </Modal>
- <!-- 编辑产品弹窗 -->
- <Modal
- title="编辑产品"
- v-model="showPDTEditModal"
- :mask-closable="false"
- class="addPDTFormModal"
- :width="1000"
- >
- <div class="addPDTForm">
- <Form :label-width="100" :model="PDTEdit">
- <FormItem label="产品名称:">
- <Input
- type="text"
- size="small"
- placeholder="请输入"
- v-model="PDTEdit.title"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="数量">
- <Input
- type="text"
- size="small"
- v-model="PDTEdit.num"
- placeholder="请输入"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="图号:">
- <Input
- type="text"
- size="small"
- placeholder="请输入"
- v-model="PDTEdit.url_number"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="图纸">
- <div class="product-img">
- <div class="product-add">
- <div
- class="items"
- v-for="(_item, _index) of PDTEdit.url"
- :key="_index"
- >
- <img
- @click="looks(_item)"
- :src="$store.state.ip + _item"
- alt=""
- />
- <Icon
- size="20"
- @click="delItems(_index, PDTEdit.url)"
- class="delete-img"
- type="ios-close-circle"
- />
- </div>
- <div class="add-items">
- <div class="_item">
- <Icon size="50" type="ios-add" />
- </div>
- <input
- @change="changeIpt($event, PDTEdit.url)"
- type="file"
- class="ipt"
- />
- </div>
- </div>
- </div>
- </FormItem>
- <FormItem label="左右式">
- <Select
- v-model="PDTEdit.left_right_mode"
- placeholder="请选择"
- style="width: 120px"
- size="small"
- >
- <Option :value="1" label="左式" />
- <Option :value="2" label="右式" />
- </Select>
- </FormItem>
- <FormItem label="产品分类">
- <Select
- v-model="PDTEdit.type_id"
- placeholder="请选择"
- style="width: 120px"
- @on-change="(e) => hanndleAddPDTTypeChange(PDTEdit, e)"
- size="small"
- >
- <Option
- v-for="item in PDTEditTypeList"
- :value="item.value"
- :key="item.value"
- >{{ item.label }}</Option
- >
- </Select>
- </FormItem>
- <div
- style="display: contents"
- v-for="el in PDTEdit.tempPDTTypeList"
- :key="el"
- >
- <FormItem
- :label="_item.title"
- v-for="_item in PDTEdit.tempMeasureList"
- v-show="el == _item.id"
- :key="_item.id"
- >
- <Input
- type="text"
- size="small"
- v-model="PDTEdit[_item.e_title]"
- placeholder="请输入"
- style="width: 120px"
- />
- </FormItem>
- </div>
- <!-- <div style="display: contents">
- <FormItem
- :label="_item.title"
- v-for="_item in PDTEdit.tempMeasureList"
- :key="_item.id"
- >
- <Input
- type="text"
- size="small"
- v-model="PDTEdit[_item.e_title]"
- placeholder="请输入"
- style="width: 120px"
- />
- </FormItem>
- </div> -->
- <FormItem label="价格:">
- <Input
- type="text"
- size="small"
- v-model="PDTEdit.price"
- placeholder="请输入价格"
- style="width: 120px"
- />
- </FormItem>
- <FormItem
- :label="item.key + ':'"
- v-for="item in productSpecValueList"
- :key="item.id"
- >
- <Input
- type="text"
- size="small"
- v-model="PDTEdit[item.key]"
- placeholder="请输入"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="备注:">
- <Input
- type="text"
- size="small"
- v-model="PDTEdit.remark"
- placeholder="请输入备注"
- style="width: 120px"
- />
- </FormItem>
- <FormItem label="工艺属性">
- <Button
- @click="handleEditProcessAdd()"
- size="small"
- type="text"
- style="color: #57a3f3"
- >添加属性</Button
- >
- </FormItem>
- </Form>
- <div class="addPDTProcess">
- <div
- v-for="(_item, _index) in PDTEdit.addPDTProcessAttrList"
- :key="_item.id"
- >
- <span>属性{{ _index + 1 }}</span>
- <Select
- v-model="_item.id"
- size="small"
- transfer
- @on-change="
- (value) => handleAddPDTAttrChange(_item, _index, value)
- "
- style="width: 80px"
- >
- <Option
- v-for="__item in PDTProcessAttrList"
- :key="__item.id"
- :value="__item.id"
- :label="__item.title"
- >
- </Option>
- </Select>
- <Select
- v-model="_item.process_detail"
- filterable
- clearable
- label-in-value
- transfer
- @on-change="
- (value) => handleAddPDTAttrDetailChange(_item, _index, value)
- "
- size="small"
- style="width: 140px"
- >
- <Option
- v-for="__item in _item.PDTProcessAttrDetailList"
- :key="__item.id"
- :value="__item.id"
- :label="__item.title"
- />
- </Select>
- <div class="dele_icon">
- <!-- v-show="PDTEdit.addPDTProcessAttrList.length!=1" -->
- <Icon
- type="ios-trash"
- @click="
- handleAddPDTDetailDele(PDTEdit.addPDTProcessAttrList, _index)
- "
- />
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer" slot="footer">
- <Button @click="showPDTEditModal = false">取消</Button>
- <Button type="primary" @click="handlePDTEditConfirm">确认</Button>
- </div>
- </Modal>
- <!-- 特殊字段弹窗 -->
- <Modal
- title="特殊字段"
- v-model="showAddInputModal"
- :mask-closable="false"
- class="addInputClassModal"
- :width="600"
- >
- <div class="addInputClass">
- <Tabs value="name1">
- <TabPane label="订单特殊字段" name="name1">
- <div style="display: flex; justify-content: center">
- <span
- class="dele_icon"
- @click="handleSpecValueAdd('', 1)"
- style="text-align: center; width: 50px"
- >添加
- </span>
- </div>
- <div class="addInputClassTab">
- <div v-for="(item, index) in contactSpecValueList" :key="index">
- <span>特殊字段名:</span>
- <Input
- type="text"
- size="small"
- v-model="item.key"
- placeholder="请输入"
- style="width: 120px"
- />
- <span class="dele_icon" style="margin-right: 5px">
- <Icon type="md-add" @click="handleSpecValueAdd(item, 1)" />
- </span>
- <span class="dele_icon">
- <Icon
- type="md-remove"
- @click="handleSpecValueDele(index, 1)"
- />
- </span>
- </div>
- </div>
- </TabPane>
- <TabPane label="区域特殊字段" name="name2">
- <div style="display: flex; justify-content: center">
- <span
- class="dele_icon"
- @click="handleSpecValueAdd('', 2)"
- style="text-align: center; width: 50px"
- >添加
- </span>
- </div>
- <div class="addInputClassTab">
- <div v-for="(item, index) in areaSpecValueList" :key="index">
- <span>特殊字段名:</span>
- <Input
- type="text"
- size="small"
- v-model="item.key"
- placeholder="请输入"
- style="width: 120px"
- />
- <span class="dele_icon" style="margin-right: 5px">
- <Icon type="md-add" @click="handleSpecValueAdd(item, 2)" />
- </span>
- <span class="dele_icon">
- <Icon
- type="md-remove"
- @click="handleSpecValueDele(index, 2)"
- />
- </span>
- </div>
- </div>
- </TabPane>
- <TabPane label="产品特殊字段" name="name3">
- <div style="display: flex; justify-content: center">
- <span
- class="dele_icon"
- @click="handleSpecValueAdd('', 3)"
- style="text-align: center; width: 50px"
- >添加
- </span>
- </div>
- <div class="addInputClassTab">
- <div v-for="(item, index) in productSpecValueList" :key="index">
- <span>特殊字段名:</span>
- <Input
- type="text"
- size="small"
- v-model="item.key"
- placeholder="请输入"
- style="width: 120px"
- />
- <span class="dele_icon" style="margin-right: 5px">
- <Icon type="md-add" @click="handleSpecValueAdd(item, 3)" />
- </span>
- <span class="dele_icon">
- <Icon
- type="md-remove"
- @click="handleSpecValueDele(index, 3)"
- />
- </span>
- </div>
- </div>
- </TabPane>
- </Tabs>
- <!-- <Form :label-width="100">
- <FormItem label="请输入字段名:">
- <Input type="text"
- size="small"
- v-model="addInputName"
- placeholder="请输入"
- style="width: 200px" />
- </FormItem>
- </Form> -->
- </div>
- <div class="modal-footer" slot="footer">
- <Button @click="showAddInputModal = false">返回</Button>
- <Button type="primary" @click="handleAddInputConfirm">确认</Button>
- </div>
- </Modal>
- <!-- 表单设置 -->
- <Modal
- v-model="showForms"
- @on-ok="postForms(1)"
- class-name="vertical-center-modal"
- style="max-height: 700px; overflow: hidden; overflow-y: auto"
- title="表单设置"
- >
- <Tabs value="form1">
- <TabPane label="订单表单设置" name="form1">
- <Table
- :max-height="600"
- border
- :columns="formSetTableColumns"
- :data="post_formSetTableData"
- >
- </Table>
- </TabPane>
- <TabPane label="区域表单设置" name="form2">
- <Table
- :max-height="600"
- border
- :columns="areaSetTableColumns"
- :data="post_areaSetTableData"
- >
- </Table>
- </TabPane>
- <TabPane label="产品表头设置" name="form3">
- <Table
- :max-height="600"
- border
- :columns="productSetTableColumns"
- :data="post_productSetTableData"
- >
- </Table>
- </TabPane>
- </Tabs>
- </Modal>
- </div>
- </template>
- <script>
- // 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
- // 例如:import 《组件名称》 from '《组件路径》';
- export default {
- name: "BidSystemContractEdit",
- components: {},
- props: {},
- // import引入的组件需要注入到对象中才能使用
- data() {
- // 这里存放数据
- return {
- showSupModal: false,
- showPDTModal: false,
- showPDTEditModal: false,
- options: {
- disabledDate(date) {
- return date && date.valueOf() < Date.now() - 86400000;
- },
- },
- formData: {
- order_no: "",
- residential_name: "",
- client_name: "",
- address: "",
- mobile: "",
- pay_state: "",
- warning_state: "",
- salesman: "",
- remark: "",
- start_time: "",
- end_time: "",
- type: "",
- special: [],
- head: [],
- //区域列表
- list: [
- {
- areaIndex: null,
- num: "",
- title: "",
- unit: "",
- quantity: "",
- house_type: "",
- remark: "",
- order_no: "",
- product: [],
- },
- ],
- },
- tableColumns: [
- { title: "序号", key: "index", align: "center", minWidth: 80 },
- {
- title: "产品名称",
- key: "title",
- align: "center",
- tooltip: true,
- minWidth: 100,
- },
- { title: "数量", key: "num", align: "center", minWidth: 80 },
- { title: "价格", key: "price", align: "center", minWidth: 80 },
- {
- title: "规格",
- key: "measure",
- align: "center",
- tooltip: true,
- minWidth: 140,
- },
- {
- title: "工艺属性",
- key: "process_property",
- align: "center",
- tooltip: true,
- minWidth: 120,
- },
- {
- title: "图纸",
- align: "center",
- key: "url",
- minWidth: 100,
- render: (h, params) => {
- const { row } = params;
- let url = row.url ? row.url : [];
- return h("img", {
- attrs: {
- src: this.$store.state.ip + url[0],
- style:
- "max-width:50px;max-height:50px;position:relative;top:3px;",
- },
- on: {
- click: () => {
- // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
- // row.imgs = res.data
- let list = [];
- row.url.forEach((el) => {
- list.push({ img_url: el });
- });
- this.$previewImg({
- list,
- baseUrl: this.$store.state.ip,
- baseImgField: "img_url",
- baseTitleField: "",
- });
- // })
- },
- },
- });
- },
- },
- {
- title: "左右式",
- key: "left_right_mode",
- align: "center",
- tooltip: true,
- minWidth: 80,
- render: (h, params) => {
- return h(
- "span",
- {},
- params.row.left_right_mode == 1
- ? "左式"
- : params.row.left_right_mode == 2
- ? "右式"
- : ""
- );
- },
- },
- {
- title: "图号",
- key: "url_number",
- align: "center",
- tooltip: true,
- minWidth: 80,
- },
- { title: "备注", key: "remark", align: "center", minWidth: 80 },
- {
- title: "操作",
- key: "set",
- align: "center",
- slot: "Set",
- minWidth: 120,
- },
- ],
- supTableColumns: [
- { title: "序号", type: "index", align: "center", minWidth: 100 },
- {
- title: "辅料名称",
- key: "title",
- align: "center",
- slot: "combine",
- minWidth: 150,
- },
- { title: "操作", align: "center", slot: "supSet", minWidth: 100 },
- ],
- supTableData: [], //项目辅料→辅料名称列表
- PDTTypeList: [], // 产品分类列表
- PDTEditTypeList: [], // 产品分类列表
- combineList: [], //业务员列表
- salesmanList: [],
- tempPDTIndex: "", // 新增产品暂存
- tempPDTList: [
- {
- url: [],
- process_property: "",
- process_properties: [],
- tempPDTTypeList: [],
- measure: "",
- //新增产品工艺属性列表
- addPDTProcessAttrList: [
- {
- showValue: "",
- showId: "",
- PDTProcessAttrDetailList: [],
- },
- ],
- },
- ],
- PDTEdit: {
- url: [],
- process_property: "",
- process_properties: [],
- tempPDTTypeList: [],
- measure: "",
- //新增产品工艺属性列表
- addPDTProcessAttrList: [
- {
- showValue: "",
- showId: "",
- PDTProcessAttrDetailList: [],
- },
- ],
- },
- //是否查看
- isChecked: false,
- PDTProcessAttrList: [],
- // 测量字段列表
- measureList: [],
- contactForm: [],
- addInputTitle: "",
- showAddInputModal: false,
- addInputName: "",
- contactSpecValueList: [],
- areaSpecValueList: [],
- productSpecValueList: [],
- warningList: [],
- clientList: [],
- clientDetailList: [],
- type: this.$route.query.type,
- showForms: false,
- formSetTableData: [
- {
- is_show: true,
- key: "order_no",
- value: "订单编号",
- title: "订单编号",
- },
- {
- is_show: true,
- key: "residential_name",
- value: "项目名称",
- title: "项目名称",
- },
- {
- is_show: true,
- key: "custom_id",
- value: "客户姓名",
- title: "客户姓名",
- },
- {
- is_show: true,
- key: "warning_state",
- value: "紧急程度",
- title: "紧急程度",
- },
- {
- is_show: true,
- key: "front_money",
- value: "项目定金",
- title: "项目定金",
- },
- {
- is_show: true,
- key: "custom_detail_id",
- value: "详细地址",
- title: "详细地址",
- },
- {
- is_show: true,
- key: "custom_detail_id",
- value: "手机号",
- title: "手机号",
- },
- {
- is_show: true,
- key: "start_time",
- value: "开始日期",
- title: "开始日期",
- },
- {
- is_show: true,
- key: "end_time",
- value: "结束日期",
- title: "结束日期",
- },
- {
- is_show: true,
- key: "salesman",
- value: "业务员",
- title: "业务员",
- },
- {
- is_show: true,
- key: "remark",
- value: "备注",
- title: "备注",
- },
- ],
- areaSetTableData: [
- {
- is_show: true,
- key: "num",
- value: "区域编码",
- title: "区域编码",
- },
- {
- is_show: true,
- key: "title",
- value: "区域名称",
- title: "区域名称",
- },
- {
- is_show: true,
- key: "unit",
- value: "单位",
- title: "单位",
- },
- {
- is_show: true,
- key: "quantity",
- value: "工程量",
- title: "工程量",
- },
- {
- is_show: true,
- key: "house_type",
- value: "户型",
- title: "户型",
- },
- {
- is_show: true,
- key: "remark",
- value: "备注",
- title: "备注",
- },
- ],
- productSetTableData: [
- {
- is_show: true,
- key: "index",
- value: "序号",
- title: "序号",
- },
- {
- is_show: true,
- key: "title",
- value: "产品名称",
- title: "产品名称",
- },
- {
- is_show: true,
- key: "num",
- value: "数量",
- title: "数量",
- },
- {
- is_show: true,
- key: "price",
- value: "价格",
- title: "价格",
- },
- {
- is_show: true,
- key: "measure",
- value: "规格",
- title: "规格",
- },
- {
- is_show: true,
- key: "process_property",
- value: "工艺属性",
- title: "工艺属性",
- },
- {
- is_show: true,
- key: "url",
- value: "图纸",
- title: "图纸",
- },
- {
- is_show: true,
- key: "left_right_mode",
- value: "左右式",
- title: "左右式",
- },
- {
- is_show: true,
- key: "url_number",
- value: "图号",
- title: "图号",
- },
- {
- is_show: true,
- key: "remark",
- value: "备注",
- title: "备注",
- },
- {
- is_show: true,
- key: "set",
- value: "操作",
- title: "操作",
- },
- ],
- formSetTableColumns: [
- {
- title: "是否展示",
- align: "center",
- key: "is_show",
- minWidth: 120,
- render: (h, params) => {
- const { index } = params;
- const currentRow = JSON.parse(
- JSON.stringify(this.post_formSetTableData[index])
- );
- return h("Checkbox", {
- props: {
- value: currentRow.is_show,
- // disabled:
- // currentRow.key == "fax_price" ||
- // currentRow.key == "remark",
- },
- on: {
- "on-change": (e) => {
- currentRow.is_show = e;
- this.post_formSetTableData.splice(index, 1, currentRow);
- },
- },
- });
- },
- },
- {
- title: "字段名",
- align: "center",
- key: "value",
- minWidth: 180,
- },
- {
- title: "展示名称",
- align: "center",
- key: "title",
- minWidth: 180,
- render: (h, params) => {
- const { index } = params;
- const currentRow = JSON.parse(
- JSON.stringify(this.post_formSetTableData[index])
- );
- return h("Input", {
- props: {
- value: currentRow.title,
- type: "text",
- },
- on: {
- "on-change": (e) => {
- currentRow.title = e.target.value;
- this.post_formSetTableData.splice(index, 1, currentRow);
- },
- },
- });
- },
- },
- ],
- areaSetTableColumns: [
- {
- title: "是否展示",
- align: "center",
- key: "is_show",
- minWidth: 120,
- render: (h, params) => {
- const { index } = params;
- const currentRow = JSON.parse(
- JSON.stringify(this.post_areaSetTableData[index])
- );
- return h("Checkbox", {
- props: {
- value: currentRow.is_show,
- // disabled:
- // currentRow.key == "fax_price" ||
- // currentRow.key == "remark",
- },
- on: {
- "on-change": (e) => {
- currentRow.is_show = e;
- this.post_areaSetTableData.splice(index, 1, currentRow);
- },
- },
- });
- },
- },
- {
- title: "字段名",
- align: "center",
- key: "value",
- minWidth: 180,
- },
- {
- title: "展示名称",
- align: "center",
- key: "title",
- minWidth: 180,
- render: (h, params) => {
- const { index } = params;
- const currentRow = JSON.parse(
- JSON.stringify(this.post_areaSetTableData[index])
- );
- return h("Input", {
- props: {
- value: currentRow.title,
- type: "text",
- },
- on: {
- "on-change": (e) => {
- currentRow.title = e.target.value;
- this.post_areaSetTableData.splice(index, 1, currentRow);
- },
- },
- });
- },
- },
- ],
- productSetTableColumns: [
- {
- title: "是否展示",
- align: "center",
- key: "is_show",
- minWidth: 120,
- render: (h, params) => {
- const { index } = params;
- const currentRow = JSON.parse(
- JSON.stringify(this.post_productSetTableData[index])
- );
- return h("Checkbox", {
- props: {
- value: currentRow.is_show,
- // disabled:
- // currentRow.key == "fax_price" ||
- // currentRow.key == "remark",
- },
- on: {
- "on-change": (e) => {
- currentRow.is_show = e;
- this.post_productSetTableData.splice(index, 1, currentRow);
- },
- },
- });
- },
- },
- {
- title: "字段名",
- align: "center",
- key: "value",
- minWidth: 180,
- },
- {
- title: "展示名称",
- align: "center",
- key: "title",
- minWidth: 180,
- render: (h, params) => {
- const { index } = params;
- const currentRow = JSON.parse(
- JSON.stringify(this.post_productSetTableData[index])
- );
- return h("Input", {
- props: {
- value: currentRow.title,
- type: "text",
- },
- on: {
- "on-change": (e) => {
- currentRow.title = e.target.value;
- this.post_productSetTableData.splice(index, 1, currentRow);
- },
- },
- });
- },
- },
- ],
- post_formSetTableData: [],
- post_areaSetTableData: [],
- post_productSetTableData: [],
- };
- },
- // 生命周期 - 创建完成(可以访问当前this实例)
- created() {
- //2编辑 3详情 1新增
- this.$route.query.type == 3 ? (this.isChecked = true) : "";
- this.$route.query.order_no
- ? (this.formData.order_no = this.$route.query.order_no)
- : "";
- // 获取工艺属性
- this.axios("/api/basics_properties_index").then((res) => {
- this.PDTProcessAttrList = res.data.data;
- });
- // 获取紧急程度
- this.axios.get("/api/warning_list").then((res) => {
- this.warningList = res.data.data;
- });
- // 获取客户列表
- this.axios.get("/api/custom_list").then((res) => {
- this.clientList = res.data.data;
- });
- this.get_forms();
- },
- // 生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- this.$route.query.type == 3 || this.$route.query.type == 2
- ? this.initData(this.$route.query.order_no)
- : "";
- //获取操作员
- this.axios("/api/user").then((res) => (this.salesmanList = res.data.data));
- //获取产品分类下拉列表
- this.axios("/api/parts_product_list").then((res) => {
- this.PDTTypeList = res.data;
- this.PDTTypeList.forEach((el) => {
- el.value = el.id;
- el.label = el.title;
- });
- this.PDTEditTypeList = this.PDTTypeList;
- });
- //获取基础测量字段列表
- this.axios("/api/basics_measure_index").then((res) => {
- this.measureList = res.data.data;
- });
- // 获取项目辅料列表
- this.axios("/api/material_combination").then((res) => {
- this.combineList = res.data.data;
- });
- },
- methods: {
- handlechange(val) {
- console.log("val :>> ", val);
- },
- handleStartTimeChange(value) {
- this.formData.start_time = value;
- },
- handleEndTimeChange(value) {
- this.formData.end_time = value;
- },
- initData(order_no) {
- this.axios({
- method: "get",
- url: "/api/order_area_list",
- params: {
- order_no,
- type: 1,
- },
- }).then((res) => {
- this.formData = res.data;
- this.supTableData = res.data.ext;
- if (this.formData.list.length == 0) {
- this.formData.list.push({
- areaIndex: 1,
- num: "",
- title: "",
- unit: "",
- quantity: "",
- house_type: "",
- remark: "",
- order_no: "",
- special: [],
- head: [],
- // product: [
- // {
- // title: "",
- // num: "",
- // measure: "",
- // process_property: "",
- // special: [],
- // url: [],
- // url_number: "",
- // remark: "",
- // },
- // ],
- });
- }
- this.formData.start_time = this.func.replaceDateNoHMS(
- this.formData.start_time
- );
- this.formData.end_time = this.func.replaceDateNoHMS(
- this.formData.end_time
- );
- // 产品特殊字段→ 弹窗窗口,table表头
- let arr = [];
- res.data.head[3] &&
- res.data.head[3].length > 0 &&
- res.data.head[3].forEach((item) => {
- // ele[key] = item.key
- arr.push({
- title: item.key,
- key: item.key,
- align: "center",
- minWidth: 80,
- });
- });
- this.tableColumns = [
- { title: "序号", key: "index", align: "center", minWidth: 80 },
- {
- title: "产品名称",
- key: "title",
- align: "center",
- tooltip: true,
- minWidth: 100,
- },
- { title: "数量", key: "num", align: "center", minWidth: 80 },
- { title: "价格", key: "price", align: "center", minWidth: 80 },
- {
- title: "规格",
- key: "measure",
- align: "center",
- tooltip: true,
- minWidth: 140,
- },
- {
- title: "工艺属性",
- key: "process_property",
- align: "center",
- tooltip: true,
- minWidth: 120,
- },
- {
- title: "图纸",
- align: "center",
- key: "url",
- minWidth: 100,
- render: (h, params) => {
- const { row } = params;
- let url = row.url ? row.url : [];
- return h("img", {
- attrs: {
- src: this.$store.state.ip + url[0],
- style:
- "max-width:50px;max-height:50px;position:relative;top:3px;",
- },
- on: {
- click: () => {
- // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
- // row.imgs = res.data
- let list = [];
- row.url.forEach((el) => {
- list.push({ img_url: el });
- });
- this.$previewImg({
- list,
- baseUrl: this.$store.state.ip,
- baseImgField: "img_url",
- baseTitleField: "",
- });
- // })
- },
- },
- });
- },
- },
- {
- title: "左右式",
- key: "left_right_mode",
- align: "center",
- tooltip: true,
- minWidth: 80,
- render: (h, params) => {
- return h(
- "span",
- {},
- params.row.left_right_mode == 1
- ? "左式"
- : params.row.left_right_mode == 2
- ? "右式"
- : ""
- );
- },
- },
- {
- title: "图号",
- key: "url_number",
- align: "center",
- tooltip: true,
- minWidth: 80,
- },
- ...arr,
- { title: "备注", key: "remark", align: "center", minWidth: 80 },
- {
- title: "操作",
- key: "remark",
- align: "center",
- slot: "Set",
- minWidth: 120,
- },
- ];
- // 订单特殊字段
- this.formData.special &&
- this.formData.special.length > 0 &&
- this.formData.special.forEach((element) => {
- this.formData.head[1].forEach((item) => {
- if (element.head_id == item.id) {
- element = Object.assign(element, item);
- this.contactSpecValueList.push(element);
- }
- });
- });
- this.contactForm = this.formData.head[1] ? this.formData.head[1] : [];
- // 区域特殊字段
- this.formData.list.forEach((element, index) => {
- element.special &&
- element.special.length > 0 &&
- element.special.forEach((ele) => {
- this.formData.head[2].forEach((item) => {
- if (ele.head_id == item.id) {
- ele = Object.assign(ele, item);
- this.areaSpecValueList.push(ele);
- }
- });
- });
- if (index == 0) {
- element.isCurrencyArea = true;
- //编辑进入页面是展示第一条区域的产品
- element.id &&
- this.axios
- .get("/api/order_area_list_product", {
- params: {
- order_no: this.$route.query.order_no,
- area_id: element.id,
- type: 1,
- },
- })
- .then((res) => {
- if (res.code == 200) {
- if (!element.product) {
- element.product = [];
- }
- element.product = res.data;
- element.product.forEach((pdt, index) => {
- if (!pdt.url) {
- pdt.url = [];
- }
- pdt.index = index + 1;
- pdt.special &&
- pdt.special.length > 0 &&
- pdt.special.forEach((_pdt) => {
- this.formData.head[3].forEach((element) => {
- if (_pdt.head_id == element.id) {
- _pdt = Object.assign(_pdt, element);
- pdt[_pdt.key] = _pdt.value;
- this.productSpecValueList.push(_pdt);
- }
- });
- });
- });
- this.$forceUpdate();
- }
- });
- } else {
- element.isCurrencyArea = false;
- }
- });
- this.areaSpecValueList = this.formData.head[2]
- ? this.formData.head[2]
- : [];
- this.productSpecValueList = this.formData.head[3]
- ? this.formData.head[3]
- : [];
- //获取客户信息
- this.axios
- .get("/api/custom_detail", { params: { id: res.data.custom_id } })
- .then((res) => {
- this.clientDetailList = res.data.list;
- // this.fax = res.data.detail.fax;
- });
- });
- },
- postData() {
- this.formData.list.map((list) => {
- list.product &&
- list.product.length > 0 &&
- list.product.map((product) => {
- product.special &&
- product.special.map((value) => {
- value.value = product[value.key];
- });
- });
- });
- //1新增 2编辑
- let ip;
- if (this.type == 1) {
- ip = "order_area_add";
- this.axios({
- method: "post",
- url: "/api/" + ip,
- data: {
- ...this.formData,
- ext: this.supTableData,
- head: { 3: this.productSpecValueList },
- },
- }).then((res) => {
- if (res.code == 200) {
- this.$Message.success(res.msg);
- this.goback();
- }
- });
- } else if (this.type == 2) {
- ip = "order_area_edit";
- // const curObj = this.formData.list.filter((item) => item.isCurrencyArea);
- let curObj;
- //去当前展开项区域
- this.formData.list.forEach((element) => {
- if (element.isCurrencyArea) {
- curObj = element;
- }
- });
- curObj.product.forEach((element) => {
- if (!element.url) {
- element.url = [];
- }
- });
- this.axios
- .post("/api/order_area_product_edit", {
- order_no: this.$route.query.order_no,
- area_id: curObj.id || "",
- type: 1,
- // num:curObj.num,
- // title:curObj.title,
- // unit:curObj.unit,
- // quantity:curObj.quantity,
- // house_type:curObj.house_type,
- product: curObj.product,
- })
- .then((res) => {
- if (res.code == 200) {
- curObj.id = res.data.area_id;
- this.axios
- .post("/api/" + ip, {
- ...this.formData,
- ext: this.supTableData,
- head: { 3: this.productSpecValueList },
- })
- .then((re) => {
- if (re.code == 200) {
- this.$Message.success(re.msg);
- this.goback();
- }
- });
- }
- });
- }
- },
- // 操作table数据 3编辑 4删除
- handleSet(row, index, type, table, areaIndex) {
- switch (type) {
- case 3:
- this.PDTEdit = row;
- if (!this.PDTEdit.url) {
- this.PDTEdit.url = [];
- }
- this.PDTEditAreaIndex = areaIndex;
- this.PDTEditIndex = index;
- this.PDTEdit.addPDTProcessAttrList
- ? this.PDTEdit.addPDTProcessAttrList.forEach((element) => {
- element.type_id ? (element.id = element.type_id) : "";
- element.process_detail = element.showId * 1;
- })
- : (this.PDTEdit.addPDTProcessAttrList = []);
- this.$route.query.type == 2 &&
- (this.PDTEdit.tempMeasureList = JSON.parse(
- JSON.stringify(this.measureList)
- ));
- //获取属性
- let newmeasureList = row.measure.split("*");
- // for (let i in newmeasureList) {
- // for (let j in this.measureList) {
- // if (
- // newmeasureList[i].indexOf(this.measureList[j].e_title) != -1
- // ) {
- // this.PDTEdit[this.measureList[j].e_title] = newmeasureList[
- // i
- // ].substring(1);
- // }
- // }
- // }
- this.axios("/api/basics_product_index", {
- params: { type_id: this.PDTEdit.type_id },
- }).then((res) => {
- this.PDTEdit.tempPDTTypeList = res.data.data[0].measure_id.split(
- ","
- );
- this.PDTEdit.tempMeasureList = JSON.parse(
- JSON.stringify(this.measureList)
- );
- this.PDTEdit.tempMeasureList.forEach((el) => {
- for (const i in newmeasureList) {
- const item = newmeasureList[i];
- if (item.indexOf(el.e_title) != -1) {
- this.PDTEdit[el.e_title] = item.substring(1);
- }
- }
- // this.PDTEdit[el.e_title] = "";
- });
- this.PDTEdit = JSON.parse(JSON.stringify(this.PDTEdit));
- this.$forceUpdate();
- });
- this.showPDTEditModal = true;
- break;
- case 4:
- table.splice(index, 1);
- this.$forceUpdate();
- break;
- }
- },
- //新增产品复制
- handleAddPDTCopy(item, index) {
- const temp = JSON.parse(JSON.stringify(item));
- this.tempPDTList.splice(index + 1, 0, temp);
- },
- //新增产品添加
- handleAddPDTAdd(index, row) {
- this.tempPDTList.splice(index + 1, 0, {
- addPDTProcessAttrList: [],
- measure: "",
- measures: [],
- process_property: "",
- url: [],
- tempPDTTypeList: [],
- process_properties: [],
- });
- },
- //新增产品删除
- handleAddPDTDele(index) {
- this.tempPDTList.splice(index, 1);
- },
- //新增产品→新增区域确认
- handleAddPDTConfirm() {
- this.tempPDTList.forEach((element) => {
- element.addPDTProcessAttrList.forEach((el) => {
- element.process_property += el.showValue + ",";
- element.process_properties += el.showId + ",";
- });
- element.process_property = element.process_property.substring(
- 0,
- element.process_property.length - 1
- );
- if (
- element.process_properties &&
- element.process_properties.length > 0
- ) {
- element.process_properties = element.process_properties.substring(
- 0,
- element.process_properties.length - 1
- );
- }
- element.tempMeasureList &&
- element.tempMeasureList.length > 0 &&
- element.tempMeasureList.forEach((el) => {
- element[el.e_title] &&
- (element.measure += `${el.e_title ? el.e_title : 0}${
- element[el.e_title]
- }*`);
- });
- element.measure = element.measure.substring(
- 0,
- element.measure.length - 1
- );
- });
- if (!this.formData.list[this.tempPDTIndex].product) {
- this.formData.list[this.tempPDTIndex].product = [];
- }
- this.formData.list[this.tempPDTIndex].product.push(...this.tempPDTList);
- this.$nextTick(() => {
- //开辟新栈空间,更改指针
- this.formData.list = JSON.parse(JSON.stringify(this.formData.list));
- this.formData.list[this.tempPDTIndex].product.forEach((el, index) => {
- el.index = index + 1;
- });
- // 置空新增产品对象
- this.tempPDTList = [
- {
- url: [],
- process_property: "",
- process_properties: [],
- tempPDTTypeList: [],
- measure: "",
- //新增产品工艺属性列表
- addPDTProcessAttrList: [
- {
- showValue: "",
- showId: "",
- PDTProcessAttrDetailList: [],
- },
- ],
- },
- ];
- this.showPDTModal = false;
- });
- },
- get_forms() {
- this.axios
- .post("/api/update/get_table", { id: "ContractList_edit" })
- .then((res) => {
- if (Array.isArray(res.data)) {
- this.post_formSetTableData = JSON.parse(
- JSON.stringify(this.formSetTableData)
- );
- this.post_areaSetTableData = JSON.parse(
- JSON.stringify(this.areaSetTableData)
- );
- this.post_productSetTableData = JSON.parse(
- JSON.stringify(this.productSetTableData)
- );
- } else {
- if (res.data.table.formSet && res.data.table.formSet.length > 0) {
- this.formSetTableData = JSON.parse(
- JSON.stringify(res.data.table.formSet)
- );
- this.post_formSetTableData = JSON.parse(
- JSON.stringify(res.data.table.formSet)
- );
- } else {
- this.post_formSetTableData = JSON.parse(
- JSON.stringify(this.formSetTableData)
- );
- }
- if (res.data.table.areaSet && res.data.table.areaSet.length > 0) {
- this.areaSetTableData = JSON.parse(
- JSON.stringify(res.data.table.areaSet)
- );
- this.post_areaSetTableData = JSON.parse(
- JSON.stringify(res.data.table.areaSet)
- );
- } else {
- this.post_areaSetTableData = JSON.parse(
- JSON.stringify(this.areaSetTableData)
- );
- }
- }
- });
- },
- postForms(n) {
- this.post_formSetTableData.forEach((element, index) => {
- element.sort = index;
- });
- this.axios({
- method: "post",
- url: "/api/update/table",
- data: {
- id: "ContractList_edit",
- result: {
- formSet: this.post_formSetTableData,
- areaSet: this.post_areaSetTableData,
- },
- },
- }).then((res) => {
- if (res.code == 200) {
- this.$Message.success(res.msg);
- this.get_forms();
- }
- });
- },
- // 编辑产品→确认
- handlePDTEditConfirm() {
- this.PDTEdit.process_property = "";
- this.PDTEdit.process_properties = "";
- this.PDTEdit.measure = "";
- this.PDTEdit.tempMeasureList.forEach((element) => {
- element.value = this.PDTEdit[element.e_title];
- });
- this.PDTEdit.addPDTProcessAttrList.forEach((el) => {
- this.PDTEdit.process_property += el.showValue + ",";
- this.PDTEdit.process_properties += el.showId + ",";
- });
- this.PDTEdit.process_property = this.PDTEdit.process_property.substring(
- 0,
- this.PDTEdit.process_property.length - 1
- );
- this.PDTEdit.process_properties = this.PDTEdit.process_properties.substring(
- 0,
- this.PDTEdit.process_properties.length - 1
- );
- this.PDTEdit.tempMeasureList.forEach((el) => {
- this.PDTEdit[el.e_title] &&
- (this.PDTEdit.measure += `${el.e_title}${this.PDTEdit[el.e_title]}*`);
- });
- this.PDTEdit.measure = this.PDTEdit.measure.substring(
- 0,
- this.PDTEdit.measure.length - 1
- );
- this.formData.list[this.PDTEditAreaIndex].product[
- this.PDTEditIndex
- ] = this.PDTEdit;
- //强制更新视图
- this.formData.list = JSON.parse(JSON.stringify(this.formData.list));
- this.showPDTEditModal = false;
- },
- //添加工艺属性
- handleProcessAdd(item, index) {
- this.tempPDTList[index].addPDTProcessAttrList.push({
- PDTProcessAttrDetailList: [],
- });
- },
- // 编辑添加工艺属性
- handleEditProcessAdd() {
- this.$nextTick(() => {
- !this.PDTEdit.addPDTProcessAttrList &&
- (this.PDTEdit.addPDTProcessAttrList = []);
- this.PDTEdit.addPDTProcessAttrList.push({
- PDTProcessAttrDetailList: [],
- });
- this.$forceUpdate();
- });
- },
- //选择工艺属性
- handleAddPDTAttrChange(item, index, value) {
- item.id = value;
- this.axios("/api/properties_index", { params: { id: value } }).then(
- (res) => {
- item.PDTProcessAttrDetailList = res.data.data;
- }
- );
- },
- //选择工艺属性细节
- handleAddPDTAttrDetailChange(item, index, value) {
- item.showValue = value.label;
- item.showId = value.value;
- },
- // 删除工艺属性
- handleAddPDTDetailDele(arr, index) {
- this.$nextTick(() => {
- arr.splice(index, 1);
- this.$forceUpdate();
- });
- },
- //新增产品
- handleAreaAddPDT(item, index) {
- this.showPDTModal = true;
- // this.tempPDTList = item
- this.tempPDTList = [
- {
- url: [],
- process_property: "",
- process_properties: [],
- tempPDTTypeList: [],
- measure: "",
- measures: [],
- //新增产品工艺属性列表
- addPDTProcessAttrList: [
- {
- showValue: "",
- showId: "",
- PDTProcessAttrDetailList: [],
- },
- ],
- },
- ];
- this.tempPDTIndex = index;
- },
- //新增区域
- handleAreaAdd(target, index) {
- const obj = {
- areaIndex: target.length + 1,
- num: "",
- title: "",
- unit: "",
- quantity: "",
- house_type: "",
- remark: "",
- order_no: "",
- special: [...this.areaSpecValueList],
- };
- // target.push(obj)
- // this.$set(this.formData, 'list', [...this.formData.list, obj])
- this.formData.list.splice(index + 1, 0, obj);
- },
- //删除区域
- handleAreaDele(index) {
- this.formData.list.splice(index, 1);
- },
- // 展示区域产品
- handleShowCurrencyArea(item, index) {
- const preObj = this.formData.list.filter((item) => item.isCurrencyArea);
- // 判断当前打开是否与上一个是否一致
- if (preObj[0].id != item.id) {
- // 1.保存上一个展开的区域及产品
- this.axios
- .post("/api/order_area_product_edit", {
- order_no: this.$route.query.order_no,
- area_id: preObj[0].id || "",
- product: preObj[0].product,
- type: 1,
- })
- .then((result) => {
- if (result.code == 200) {
- preObj[0].id = result.data.area_id;
- // 1.1移除上一个展开区域及产品
- this.formData.list.forEach((element) => {
- element.product = [];
- if (element.id == preObj[0].id) {
- element.isCurrencyArea = false;
- }
- });
- // 2.获取当前展开区域及产品
- item.isCurrencyArea = true;
- this.axios
- .get("/api/order_area_list_product", {
- params: {
- order_no: this.$route.query.order_no,
- area_id: item.id,
- type: 1,
- },
- })
- .then((res) => {
- if (res.code == 200) {
- if (!item.product) {
- item.product = [];
- }
- item.product = res.data;
- item.product.forEach((pdt, index) => {
- pdt.index = index + 1;
- pdt.special &&
- pdt.special.length > 0 &&
- pdt.special.forEach((element) => {
- this.formData.head[3].forEach((item) => {
- if (element.head_id == item.id) {
- element = Object.assign(element, item);
- pdt[element.key] = element.value;
- this.productSpecValueList.push(element);
- }
- });
- });
- });
- this.$forceUpdate();
- }
- });
- }
- });
- } else {
- // 2.获取当前展开区域及产品
- item.isCurrencyArea = true;
- this.axios
- .get("/api/order_area_list_product", {
- params: {
- order_no: this.$route.query.order_no,
- area_id: item.id,
- type: 1,
- },
- })
- .then((res) => {
- if (res.code == 200) {
- if (!item.product) {
- item.product = [];
- }
- item.product = res.data;
- item.product.forEach((pdt, index) => {
- pdt.index = index + 1;
- pdt.special &&
- pdt.special.length > 0 &&
- pdt.special.forEach((element) => {
- this.formData.head[3].forEach((item) => {
- if (element.head_id == item.id) {
- element = Object.assign(element, item);
- pdt[element.key] = element.value;
- this.productSpecValueList.push(element);
- }
- });
- });
- });
- this.$forceUpdate();
- }
- });
- }
- },
- handleClientChange(id) {
- id &&
- this.axios({
- method: "get",
- url: "/api/custom_detail",
- params: { id },
- }).then((res) => {
- this.clientDetailList = res.data.list;
- this.formData.service_id = res.data.detail.service_id;
- this.formData.custom_detail_id = this.clientDetailList[0].id || 0;
- this.fax = res.data.detail.fax;
- });
- },
- handleClientDetailChange(value) {
- if (value) {
- let row = this.clientDetailList.filter((item) => item.id == value);
- this.formData.address = row[0].address;
- this.formData.mobile = row[0].mobile;
- this.$forceUpdate();
- }
- },
- //项目辅料新增
- handleAddSup() {
- this.supTableData.push({ id: "" });
- // this.supTableData.forEach((element, index) => {
- // element.index = index + 1;
- // });
- },
- //项目辅料删除
- handleSupSet(row, index) {
- this.supTableData.splice(index, 1);
- // this.supTableData.forEach((element, index) => {
- // element.index = index + 1
- // });
- },
- goback() {
- this.$router.go(-1);
- },
- looks(img) {
- const array = [{ img_url: img }];
- this.$previewImg({
- list: array,
- baseUrl: this.$store.state.ip,
- baseImgField: "img_url",
- baseTitleField: "",
- });
- },
- delItems(n, arr) {
- arr.splice(n, 1);
- },
- changeIpt(e, row) {
- let file = e.target.files[0];
- this.postImg(file, row);
- e.target.value = null;
- },
- postImg(file, row) {
- let formData = new FormData();
- formData.append("file", file);
- this.axios.post("/api/upload_pic", formData).then((res) => {
- this.$nextTick(() => {
- row.push(res.data.url);
- this.$forceUpdate();
- });
- });
- },
- // 产品分类选择→对应不同测量字段
- hanndleAddPDTTypeChange(item, e) {
- e &&
- this.axios("/api/basics_product_index", {
- params: { type_id: e },
- }).then((res) => {
- item.tempPDTTypeList = res.data.data[0].measure_id.split(",");
- item.tempMeasureList = JSON.parse(JSON.stringify(this.measureList));
- item.tempMeasureList.forEach((el) => {
- item[el.e_title] = "";
- });
- this.$forceUpdate();
- });
- // basics_measure_index
- },
- // 添加特殊字段
- handleAddInputConfirm() {
- this.formData.special = JSON.parse(
- JSON.stringify(this.contactSpecValueList)
- );
- this.formData.list.length > 0 &&
- this.formData.list.forEach((element) => {
- element.special = JSON.parse(JSON.stringify(this.areaSpecValueList));
- element.product &&
- element.product.length > 0 &&
- element.product.forEach((ele) => {
- ele.special = JSON.parse(
- JSON.stringify(this.productSpecValueList)
- );
- });
- });
- let arr = [];
- this.productSpecValueList.length > 0 &&
- this.productSpecValueList.forEach((element) => {
- arr.push({
- title: element.key,
- key: element.key,
- align: "center",
- minWidth: 80,
- });
- });
- this.tableColumns = [
- { title: "序号", key: "index", align: "center", minWidth: 80 },
- {
- title: "产品名称",
- key: "title",
- align: "center",
- tooltip: true,
- minWidth: 100,
- },
- { title: "数量", key: "num", align: "center", minWidth: 80 },
- { title: "价格", key: "price", align: "center", minWidth: 80 },
- {
- title: "规格",
- key: "measure",
- align: "center",
- tooltip: true,
- minWidth: 140,
- },
- {
- title: "工艺属性",
- key: "process_property",
- align: "center",
- tooltip: true,
- minWidth: 120,
- },
- {
- title: "图纸",
- align: "center",
- key: "url",
- minWidth: 100,
- render: (h, params) => {
- const { row } = params;
- let url = row.url ? row.url : [];
- return h("img", {
- attrs: {
- src: this.$store.state.ip + url[0],
- style:
- "max-width:50px;max-height:50px;position:relative;top:3px;",
- },
- on: {
- click: () => {
- // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
- // row.imgs = res.data
- let list = [];
- row.url.forEach((el) => {
- list.push({ img_url: el });
- });
- this.$previewImg({
- list,
- baseUrl: this.$store.state.ip,
- baseImgField: "img_url",
- baseTitleField: "",
- });
- // })
- },
- },
- });
- },
- },
- {
- title: "左右式",
- key: "left_right_mode",
- align: "center",
- tooltip: true,
- minWidth: 80,
- render: (h, params) => {
- return h(
- "span",
- {},
- params.row.left_right_mode == 1
- ? "左式"
- : params.row.left_right_mode == 2
- ? "右式"
- : ""
- );
- },
- },
- {
- title: "图号",
- key: "url_number",
- align: "center",
- tooltip: true,
- minWidth: 80,
- },
- ...arr,
- { title: "备注", key: "remark", align: "center", minWidth: 80 },
- {
- title: "操作",
- key: "remark",
- align: "center",
- slot: "Set",
- minWidth: 120,
- },
- ];
- this.showAddInputModal = false;
- },
- // 添加特殊字段
- handleSpecValueAdd(item, type) {
- switch (type) {
- case 1:
- this.contactSpecValueList.push({ key: "", value: "" });
- break;
- case 2:
- this.areaSpecValueList.push({ key: "", value: "" });
- break;
- case 3:
- this.productSpecValueList.push({ key: "", value: "" });
- break;
- }
- },
- // 删除特殊字段
- handleSpecValueDele(index, type) {
- switch (type) {
- case 1:
- this.contactSpecValueList.splice(index, 1);
- break;
- case 2:
- this.areaSpecValueList.splice(index, 1);
- break;
- case 3:
- this.productSpecValueList.splice(index, 1);
- break;
- }
- },
- },
- // 监听属性 类似于data概念
- computed: {},
- // 监控data中的数据变化
- watch: {},
- beforeCreate() {}, // 生命周期 - 创建之前
- beforeMount() {}, // 生命周期 - 挂载之前
- beforeUpdate() {}, // 生命周期 - 更新之前
- updated() {}, // 生命周期 - 更新之后
- beforeDestroy() {}, // 生命周期 - 销毁之前
- destroyed() {}, // 生命周期 - 销毁完成
- activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
- };
- </script>
- <style lang="scss" scoped>
- .BidSystemContractEdit {
- overflow: hidden;
- overflow-y: auto;
- position: relative;
- top: 20px;
- height: 85%;
- padding-bottom: 20px;
- }
- .top_search {
- padding: 20px 0;
- width: 100%;
- .top_search_form {
- // width: 800px;
- // display: flex;
- // justify-content: space-around;
- /deep/ .ivu-form-item {
- display: inline-block;
- width: 300px;
- }
- }
- }
- .addArea {
- position: relative;
- padding: 15px;
- margin-bottom: 30px;
- border-radius: 5px;
- box-shadow: 1px 1px 5px 1px #999;
- .addAreaBtn {
- position: absolute;
- right: 20px;
- top: 20px;
- }
- /deep/ .ivu-form-item {
- display: inline-block;
- width: 220px;
- }
- }
- .addPDTFormModal {
- .addPDTForm {
- width: 100%;
- position: relative;
- border-bottom: 1px solid #e8eaec;
- margin-bottom: 30px;
- /deep/ .ivu-form {
- padding-bottom: 30px;
- }
- /deep/ .ivu-form-item {
- display: inline-block;
- width: 300px;
- }
- .addPDTBtn {
- position: absolute;
- right: 10px;
- bottom: 25px;
- }
- }
- /deep/ .ivu-modal-body {
- display: flex;
- justify-content: center;
- flex-wrap: wrap;
- max-height: 700px;
- overflow: hidden;
- overflow-y: auto;
- }
- }
- .addPDTProcess {
- width: 300px;
- padding-bottom: 15px;
- div {
- display: flex;
- justify-content: space-around;
- padding: 5px 0;
- span {
- padding-top: 6px;
- }
- }
- .dele_icon {
- width: 10px;
- /deep/ .ivu-icon {
- padding-top: 5px;
- }
- }
- }
- .product-img {
- padding-top: 10px;
- }
- .product-add {
- display: flex;
- flex-wrap: wrap;
- .ipt {
- position: absolute;
- width: 100%;
- height: 100%;
- opacity: 0;
- cursor: pointer;
- outline: none;
- top: 0;
- left: 0;
- }
- .add-items {
- width: 40px;
- height: 40px;
- border: 1px dotted #e7e7e7;
- border-radius: 5px;
- display: flex;
- justify-content: center;
- align-items: center;
- overflow: hidden;
- position: relative;
- flex-direction: column;
- background: #f4f5f7;
- .item {
- width: 46px;
- height: 46px;
- background: #3764ff;
- opacity: 0.6;
- display: flex;
- justify-content: center;
- align-items: center;
- border-radius: 50%;
- color: #fff;
- }
- }
- .items {
- width: 40px;
- height: 40px;
- margin-bottom: 10px;
- display: flex;
- justify-content: center;
- align-items: center;
- background: #e7e7e7;
- margin-right: 10px;
- border-radius: 5px;
- position: relative;
- img {
- max-width: 40px;
- max-height: 40px;
- }
- }
- }
- .supModalBtn {
- display: flex;
- justify-content: flex-end;
- margin-bottom: 10px;
- }
- /deep/.ivu-modal-body {
- display: flex;
- justify-content: center;
- .addInputClass {
- display: flex;
- justify-content: center;
- width: 500px;
- .dele_icon {
- cursor: pointer;
- width: 10px;
- /deep/ .ivu-icon {
- padding-top: 5px;
- }
- }
- }
- }
- .addInputClassTab {
- display: flex;
- justify-content: center;
- align-items: center;
- flex-wrap: wrap;
- div {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 100%;
- padding: 5px;
- .dele_icon {
- i {
- font-size: 20px;
- }
- }
- }
- }
- /deep/.ivu-tabs-nav-scroll {
- display: flex;
- justify-content: center;
- }
- /deep/ .ivu-table-wrapper {
- overflow: visible;
- }
- /deep/.ivu-table-fixed-body {
- padding-bottom: 20px;
- }
- </style>
|